Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
run-llama avatar

Retrieve Relevant Information Through Rag

  • 3 installs
  • 177 repo stars
  • Updated November 3, 2025
  • run-llama/vibe-llama

Builds RAG retrieval over a LlamaCloud index using LlamaCloudIndex and LlamaCloudRetriever with dense/sparse and reranking settings.

About

Shows how to create or connect to a LlamaCloud index and configure managed retrieval and query engines for Retrieval Augmented Generation. A developer uses it when adding RAG over documents with LlamaCloud.

  • Creates index with managed OpenAI embeddings and connects existing indexes
  • Retriever settings for dense/sparse top-k, reranking, and alpha weighting

Retrieve Relevant Information Through Rag by the numbers

  • 3 all-time installs (skills.sh)
  • Ranked #13,677 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/run-llama/vibe-llama --skill retrieve-relevant-information-through-rag

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3
repo stars177
Last updatedNovember 3, 2025
Repositoryrun-llama/vibe-llama

What it does

Builds RAG retrieval over a LlamaCloud index using LlamaCloudIndex and LlamaCloudRetriever with dense/sparse and reranking settings.

Files

SKILL.mdMarkdownGitHub ↗

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, 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.

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="..."

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.