# 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.9",
"maintainer_email": null,
"keywords": null,
"author": "Logan Markewich",
"author_email": "logan@llamaindex.ai",
"download_url": "https://files.pythonhosted.org/packages/ce/58/29afa6086e2080ae27da79949e319f77f08cb7d1b2bd26e56a676dab1338/llama_index_indices_managed_llama_cloud-0.6.3.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.6.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43c6ebb53a15e63c8da3633a595f53fc965509e8c6707da6a8b1bfa9b7923236",
"md5": "da5de44cf8f96fdec9670ace0b6a47c4",
"sha256": "7f125602f624a2d321b6a4130cd98df35eb8c15818a159390755b2c13068f4ce"
},
"downloads": -1,
"filename": "llama_index_indices_managed_llama_cloud-0.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "da5de44cf8f96fdec9670ace0b6a47c4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 11077,
"upload_time": "2024-11-27T15:29:10",
"upload_time_iso_8601": "2024-11-27T15:29:10.398092Z",
"url": "https://files.pythonhosted.org/packages/43/c6/ebb53a15e63c8da3633a595f53fc965509e8c6707da6a8b1bfa9b7923236/llama_index_indices_managed_llama_cloud-0.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ce5829afa6086e2080ae27da79949e319f77f08cb7d1b2bd26e56a676dab1338",
"md5": "9c142b56779c5b70fd0442056a236008",
"sha256": "f09e4182cbc2a2bd75ae85cebb1681075247f0d91b931b094cac4315386ce87a"
},
"downloads": -1,
"filename": "llama_index_indices_managed_llama_cloud-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "9c142b56779c5b70fd0442056a236008",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 10483,
"upload_time": "2024-11-27T15:29:11",
"upload_time_iso_8601": "2024-11-27T15:29:11.312104Z",
"url": "https://files.pythonhosted.org/packages/ce/58/29afa6086e2080ae27da79949e319f77f08cb7d1b2bd26e56a676dab1338/llama_index_indices_managed_llama_cloud-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-27 15:29:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-indices-managed-llama-cloud"
}