# 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/48/24/43680d8c1b73b5a2a2f61dbb0cd5fbade5638600088ea9eea980e683267c/llama_index_indices_managed_llama_cloud-0.6.2.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.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "65700151ac0c275dcc8cf8398ba79a8fef59f3061d0694262630a5970ab5fc6f",
"md5": "f5b70bc8ef29fdbb2fca04f76d268ae0",
"sha256": "ef292cb0e8bd25f382a8fdf01fae01aca2d48b25816a786215082ab231bd467c"
},
"downloads": -1,
"filename": "llama_index_indices_managed_llama_cloud-0.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f5b70bc8ef29fdbb2fca04f76d268ae0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 11078,
"upload_time": "2024-11-19T16:36:49",
"upload_time_iso_8601": "2024-11-19T16:36:49.280688Z",
"url": "https://files.pythonhosted.org/packages/65/70/0151ac0c275dcc8cf8398ba79a8fef59f3061d0694262630a5970ab5fc6f/llama_index_indices_managed_llama_cloud-0.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "482443680d8c1b73b5a2a2f61dbb0cd5fbade5638600088ea9eea980e683267c",
"md5": "fad3fa42da5af6de1e4b29186d7c29c5",
"sha256": "498481c6a98afce5e816bc7b7f5249fe97c1555e997e23e057dd175a543b651d"
},
"downloads": -1,
"filename": "llama_index_indices_managed_llama_cloud-0.6.2.tar.gz",
"has_sig": false,
"md5_digest": "fad3fa42da5af6de1e4b29186d7c29c5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 10500,
"upload_time": "2024-11-19T16:36:50",
"upload_time_iso_8601": "2024-11-19T16:36:50.214810Z",
"url": "https://files.pythonhosted.org/packages/48/24/43680d8c1b73b5a2a2f61dbb0cd5fbade5638600088ea9eea980e683267c/llama_index_indices_managed_llama_cloud-0.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 16:36:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-indices-managed-llama-cloud"
}