A Python toolkit for building LLM-powered agents over your data
open sourceMITself-hostablefree
LlamaIndex is an MIT-licensed Python framework for building RAG and agent applications over your own data: data connectors (with LlamaHub to find more), indexes and vector stores, query and chat engines, agents and tools, and event-driven workflows, with a high-level API that indexes a folder in a few lines and lower-level modules you can replace. Core (llama-index-core) is extended by more than 300 integration packages for LLMs, embedding models and vector stores, or you start from the llama-index bundle. Its evaluation module judges answers for faithfulness, relevancy, correctness and guideline adherence with an LLM, and scores retrievers with RetrieverEvaluator (hit rate and MRR) on question and context pairs that generate_question_context_pairs writes from your documents with an LLM, or on a set you label yourself. The company behind it now concentrates on LlamaParse, its hosted parsing, extraction and indexing platform (formerly LlamaCloud), and keeps the framework available as an open toolkit; the TypeScript port, LlamaIndex.TS, is deprecated.
Problems it solves
- load PDFs, docs and database rows and ask an LLM questions about them with citations in a few lines of Python
- build a retrieval pipeline over our private documents and swap the vector store or LLM later without a rewrite
- measure hit rate and MRR for my retriever on a set of questions with known relevant chunks
- generate synthetic question and context pairs from my document chunks to test retrieval without hand-labelling
- check whether answers from our document chatbot are faithful to the retrieved passages using an LLM judge
- compare two chunk sizes or embedding models on the same retrieval benchmark before switching
- give an agent a search tool over my company's knowledge base alongside its other tools
- write a multi-step LLM workflow with branching, retries and a human review step as plain Python
- pull typed fields out of documents into Pydantic models with an LLM
- ask questions of a SQL database or CSV file in plain English from Python
- a chatbot over our docs that remembers the conversation and cites its sources
- run a RAG app fully locally with Ollama and a Hugging Face embedding model instead of OpenAI
- find a ready-made loader for the API or file format my documents live in instead of writing one for my LLM app
- persist a vector index to disk and reload it instead of re-embedding every document on each start
Features
- data connectors and LlamaHub for loading files, APIs and databases
- indexes and vector stores, persisted to disk or to an external store
- query engines and chat engines with memory over your data
- agents with tools, state and streamed progress; a RAG pipeline can be one tool among many
- event-driven Workflows with branching, retries and human review, deployable as services
- structured extraction into Pydantic models
- multi-modal retrieval over text, images, tables and charts
- text-to-SQL and CSV querying
- response evaluation: correctness, semantic similarity, faithfulness, context relevancy, answer relevancy, guideline adherence
- retrieval evaluation: RetrieverEvaluator with hit rate and MRR, single queries or whole datasets
View 4 more
- generate_question_context_pairs: synthetic (question, context) datasets from your nodes with an LLM
- integrations with evaluation tools: UpTrain, Tonic Validate, DeepEval, Ragas, RAGChecker, Cleanlab
- over 300 integration packages for LLMs, embedding models and vector stores
- callbacks and instrumentation for observability
Limitations
- Doesn't support TypeScript or JavaScript any more: LlamaIndex.TS is deprecated and no longer maintained1
Capabilities
| Takes plugins | plan not known |
|---|
Alternatives
The same job
These do what LlamaIndex does.
- R2R Agentic Retrieval-Augmented Generation (RAG) with a RESTful API
- Haystack Open-source AI orchestration framework for building production-ready LLM applications in Python
- GraphRAG A modular graph-based Retrieval-Augmented Generation (RAG) system
- LangChain A framework for building agents and LLM-powered applications
- LangGraph Low-level orchestration framework for building stateful agents
- LightRAG Simple and Fast Retrieval-Augmented Generation