llama-index-indices-managed-llama-cloud


Namellama-index-indices-managed-llama-cloud JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
Summaryllama-index indices llama-cloud integration
upload_time2024-09-24 18:53:16
maintainerNone
docs_urlNone
authorLogan Markewich
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LlamaCloud Index + Retriever

LlamaCloud is a new generation of managed parsing, ingestion, and retrieval services, designed to bring production-grade context-augmentation to your LLM and RAG applications.

Currently, LlamaCloud supports

- Managed Ingestion API, handling parsing and document management
- Managed Retrieval API, configuring optimal retrieval for your RAG system

## Access

We are opening up a private beta to a limited set of enterprise partners for the managed ingestion and retrieval API. If you’re interested in centralizing your data pipelines and spending more time working on your actual RAG use cases, come [talk to us.](https://www.llamaindex.ai/contact)

If you have access to LlamaCloud, you can visit [LlamaCloud](https://cloud.llamaindex.ai) to sign in and get an API key.

## Setup

First, make sure you have the latest LlamaIndex version installed.

**NOTE:** If you are upgrading from v0.9.X, we recommend following our [migration guide](../../../docs/docs/getting_started/v0_10_0_migration.md), as well as uninstalling your previous version first.

```
pip uninstall llama-index  # run this if upgrading from v0.9.x or older
pip install -U llama-index --upgrade --no-cache-dir --force-reinstall
```

The `llama-index-indices-managed-llama-cloud` package is included with the above install, but you can also install directly

```
pip install -U llama-index-indices-managed-llama-cloud
```

## Usage

You can create an index on LlamaCloud using the following code:

```python
import os

os.environ[
    "LLAMA_CLOUD_API_KEY"
] = "llx-..."  # can provide API-key in env or in the constructor later on

from llama_index.core import SimpleDirectoryReader
from llama_index.indices.managed.llama_cloud import LlamaCloudIndex

# create a new index
index = LlamaCloudIndex.from_documents(
    documents,
    "my_first_index",
    project_name="default",
    api_key="llx-...",
    verbose=True,
)

# connect to an existing index
index = LlamaCloudIndex("my_first_index", project_name="default")
```

You can also configure a retriever for managed retrieval:

```python
# from the existing index
index.as_retriever()

# from scratch
from llama_index.indices.managed.llama_cloud import LlamaCloudRetriever

retriever = LlamaCloudRetriever("my_first_index", project_name="default")
```

And of course, you can use other index shortcuts to get use out of your new managed index:

```python
query_engine = index.as_query_engine(llm=llm)

chat_engine = index.as_chat_engine(llm=llm)
```

## Retriever Settings

A full list of retriever settings/kwargs is below:

- `dense_similarity_top_k`: Optional[int] -- If greater than 0, retrieve `k` nodes using dense retrieval
- `sparse_similarity_top_k`: Optional[int] -- If greater than 0, retrieve `k` nodes using sparse retrieval
- `enable_reranking`: Optional[bool] -- Whether to enable reranking or not. Sacrifices some speed for accuracy
- `rerank_top_n`: Optional[int] -- The number of nodes to return after reranking initial retrieval results
- `alpha` Optional[float] -- The weighting between dense and sparse retrieval. 1 = Full dense retrieval, 0 = Full sparse retrieval.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-indices-managed-llama-cloud",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Logan Markewich",
    "author_email": "logan@llamaindex.ai",
    "download_url": "https://files.pythonhosted.org/packages/cf/82/7597547f339209d2abbf17717bea6208f9b380427bd765aee460403a576d/llama_index_indices_managed_llama_cloud-0.4.0.tar.gz",
    "platform": null,
    "description": "# LlamaCloud Index + Retriever\n\nLlamaCloud is a new generation of managed parsing, ingestion, and retrieval services, designed to bring production-grade context-augmentation to your LLM and RAG applications.\n\nCurrently, LlamaCloud supports\n\n- Managed Ingestion API, handling parsing and document management\n- Managed Retrieval API, configuring optimal retrieval for your RAG system\n\n## Access\n\nWe are opening up a private beta to a limited set of enterprise partners for the managed ingestion and retrieval API. If you\u2019re interested in centralizing your data pipelines and spending more time working on your actual RAG use cases, come [talk to us.](https://www.llamaindex.ai/contact)\n\nIf you have access to LlamaCloud, you can visit [LlamaCloud](https://cloud.llamaindex.ai) to sign in and get an API key.\n\n## Setup\n\nFirst, make sure you have the latest LlamaIndex version installed.\n\n**NOTE:** If you are upgrading from v0.9.X, we recommend following our [migration guide](../../../docs/docs/getting_started/v0_10_0_migration.md), as well as uninstalling your previous version first.\n\n```\npip uninstall llama-index  # run this if upgrading from v0.9.x or older\npip install -U llama-index --upgrade --no-cache-dir --force-reinstall\n```\n\nThe `llama-index-indices-managed-llama-cloud` package is included with the above install, but you can also install directly\n\n```\npip install -U llama-index-indices-managed-llama-cloud\n```\n\n## Usage\n\nYou can create an index on LlamaCloud using the following code:\n\n```python\nimport os\n\nos.environ[\n    \"LLAMA_CLOUD_API_KEY\"\n] = \"llx-...\"  # can provide API-key in env or in the constructor later on\n\nfrom llama_index.core import SimpleDirectoryReader\nfrom llama_index.indices.managed.llama_cloud import LlamaCloudIndex\n\n# create a new index\nindex = LlamaCloudIndex.from_documents(\n    documents,\n    \"my_first_index\",\n    project_name=\"default\",\n    api_key=\"llx-...\",\n    verbose=True,\n)\n\n# connect to an existing index\nindex = LlamaCloudIndex(\"my_first_index\", project_name=\"default\")\n```\n\nYou can also configure a retriever for managed retrieval:\n\n```python\n# from the existing index\nindex.as_retriever()\n\n# from scratch\nfrom llama_index.indices.managed.llama_cloud import LlamaCloudRetriever\n\nretriever = LlamaCloudRetriever(\"my_first_index\", project_name=\"default\")\n```\n\nAnd of course, you can use other index shortcuts to get use out of your new managed index:\n\n```python\nquery_engine = index.as_query_engine(llm=llm)\n\nchat_engine = index.as_chat_engine(llm=llm)\n```\n\n## Retriever Settings\n\nA full list of retriever settings/kwargs is below:\n\n- `dense_similarity_top_k`: Optional[int] -- If greater than 0, retrieve `k` nodes using dense retrieval\n- `sparse_similarity_top_k`: Optional[int] -- If greater than 0, retrieve `k` nodes using sparse retrieval\n- `enable_reranking`: Optional[bool] -- Whether to enable reranking or not. Sacrifices some speed for accuracy\n- `rerank_top_n`: Optional[int] -- The number of nodes to return after reranking initial retrieval results\n- `alpha` Optional[float] -- The weighting between dense and sparse retrieval. 1 = Full dense retrieval, 0 = Full sparse retrieval.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index indices llama-cloud integration",
    "version": "0.4.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8bf3c1986159e047306ebdfb32555ef667fe8305ef6ab772f0624ada7537440",
                "md5": "6f3b94ce00d4f937ee51e45dd4e2c227",
                "sha256": "c2c54821f1bf17a7810e6c013fbe7ddfef4154b7e5b100f7bf8673098f8004e4"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_llama_cloud-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f3b94ce00d4f937ee51e45dd4e2c227",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 10365,
            "upload_time": "2024-09-24T18:53:14",
            "upload_time_iso_8601": "2024-09-24T18:53:14.998636Z",
            "url": "https://files.pythonhosted.org/packages/a8/bf/3c1986159e047306ebdfb32555ef667fe8305ef6ab772f0624ada7537440/llama_index_indices_managed_llama_cloud-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf827597547f339209d2abbf17717bea6208f9b380427bd765aee460403a576d",
                "md5": "d5c52ef955cb6fdff42a2ffbb64adab2",
                "sha256": "fbebff7876a219b6ab96892ae7c432a9299195fab8f67d4a4a0ebf6da210b242"
            },
            "downloads": -1,
            "filename": "llama_index_indices_managed_llama_cloud-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d5c52ef955cb6fdff42a2ffbb64adab2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 9800,
            "upload_time": "2024-09-24T18:53:16",
            "upload_time_iso_8601": "2024-09-24T18:53:16.461184Z",
            "url": "https://files.pythonhosted.org/packages/cf/82/7597547f339209d2abbf17717bea6208f9b380427bd765aee460403a576d/llama_index_indices_managed_llama_cloud-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-24 18:53:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-indices-managed-llama-cloud"
}
        
Elapsed time: 0.47133s