← All open source projects

LlamaIndex

run-llama/llama_index

LlamaIndex is a framework for connecting LLM applications to external data, indexes, and tools.

Forks 7,642
Author run-llama
Language Python
License MIT
Synced 2026-06-27

What it is

LlamaIndex is a framework for LLM applications that need company or user data. It handles loading, indexing, retrieval, and passing context to a model.

It became known during the rise of RAG: instead of fine-tuning a model for every knowledge base, an app retrieves relevant fragments and sends them with the query.

What is inside

The repository includes data loaders, indexes, retrievers, vector store integrations, agents, evaluation tools, and examples.

It supports more than simple document search: data can be chunked, indexed, retrieved, combined, and passed to a model in an answer-ready form.

How it is used

Common scenarios include documentation chat, internal knowledge search, analyst assistants, PDF answers, and connecting LLMs to tables or services.

Quality depends on chunking, index freshness, permissions, filters, and factual checks, not only on the model.

Strengths and limits

Its strength is a rich set of building blocks for data-aware LLM apps.

The limit is configuration complexity as sources and permission rules grow.

For LlamaIndex, the boundary between retrieval and answer generation is crucial. If retrieval returns weak fragments, even a strong model answers from a weak base. Index quality, document metadata, and access filters become part of the product.

The project is useful not only as library classes but also as a vocabulary for architecture. It helps teams discuss loaders, retrievers, indexes, evaluation, and agents as separate layers instead of one large block around a model.

For teams, the repository is often the beginning of a data-quality conversation. The model can only use what retrieval gives it, so indexing choices, permissions, and freshness need ownership.

This is why evaluation examples are important: teams need to know whether retrieval improved the answer, not only whether the model produced fluent text.

Example

Indexing documents

This shows the basic path: load documents, build an index, and ask a question through a query engine.

Language: Python
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex

documents = SimpleDirectoryReader("docs").load_data()
index = VectorStoreIndex.from_documents(documents)

query_engine = index.as_query_engine()
print(query_engine.query("What does the documentation describe?"))