Retrieve relevant information through RAG
БесплатноБез исполняемых скриптовНе проверенLeverage Retrieval Augmented Generation to retrieve relevant information from a a LlamaCloud Index. Requires the llama_cloud_services package and…
Об этом скилле
Information Retrieval
Quick start
You can create an index on LlamaCloud using the following code. By default, new indexes use managed embeddings (OpenAI text-embedding-3-small, 1536 dimensions, 1 credit/page):
import os
from llama_index.core import SimpleDirectoryReader
from llama_cloud_services import LlamaCloudIndex
# create a new index (uses managed embeddings by default)
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:
# from the existing index
index.as_retriever()
# from scratch
from llama_cloud_services import LlamaCloudRetriever
retriever = LlamaCloudRetriever("my_first_index", project_name="default")
# perform retrieval
result = retriever.retrieve("What is the capital of France?")
And of course, you can use other index shortcuts to get use out of your new managed index:
query_engine = index.as_query_engine(llm=llm)
# perform retrieval and generation
result = query_engine.query("What is the capital of France?")
Retriever Settings
A full list of retriever settings/kwargs is below:
dense_similarity_top_k: Optional[int] -- If greater than 0, retrieveknodes using dense retrievalsparse_similarity_top_k: Optional[int] -- If greater than 0, retrieveknodes using sparse retrievalenable_reranking: Optional[bool] -- Whether to enable reranking or not. Sacrifices some speed for accuracyrerank_top_n: Optional[int] -- The number of nodes to return after reranking initial retrieval resultsalphaOptional[float] -- The weighting between dense and sparse retrieval. 1 = Full dense retrieval, 0 = Full sparse retrieval.
Requirements
The llama_cloud_services and llama-index-core packages must be installed in your environment:
pip install llama-index-core llama_cloud_services
And the LLAMA_CLOUD_API_KEY must be available as an environment variable:
export LLAMA_CLOUD_API_KEY="..."
Установить Retrieve relevant information through RAG в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Retrieve relevant information through RAG?
Leverage Retrieval Augmented Generation to retrieve relevant information from a a LlamaCloud Index. Requires the llama_cloud_services package and LLAMA_CLOUD_API_KEY as an environment variable.
Как установить скилл Retrieve relevant information through RAG?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Retrieve relevant information through RAG запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic