Capability · Framework — rag

LlamaIndex

LlamaIndex is the leading framework for the 'get your data into the LLM' half of any AI application. It ships 160+ document loaders, a query-engine abstraction that combines keyword, vector, and knowledge-graph retrieval, and a commercial Llama Cloud for hosted parsing and indexing. When RAG is the core problem, LlamaIndex is the short path.

Framework facts

Category
rag
Language
Python / TypeScript
License
MIT
Repository
https://github.com/run-llama/llama_index

Install

pip install llama-index
# or
npm install llamaindex

Quickstart

from llama_index.core import VectorStoreIndex, SimpleDirectoryReader

docs = SimpleDirectoryReader('./data').load_data()
index = VectorStoreIndex.from_documents(docs)
qe = index.as_query_engine()
print(qe.query('what is our placement policy?'))

Alternatives

  • LangChain — broader, less RAG-opinionated
  • Haystack — enterprise pipelines
  • txtai — lightweight embeddings + retrieval
  • RAGatouille — late-interaction retrieval (ColBERT)

Frequently asked questions

What is LlamaIndex used for?

LlamaIndex is used for building retrieval-augmented generation (RAG) applications — ingesting documents, chunking them, embedding, indexing, and querying with an LLM-friendly query engine.

LlamaIndex or LangChain?

They overlap but are complementary. LlamaIndex is more opinionated and more complete for RAG. LangChain is broader for agents and orchestration. Many teams use LlamaIndex for the retrieval layer and LangChain for the agent layer.

Sources

  1. LlamaIndex — docs — accessed 2026-04-20