RAG and workflow

Open sourceMITUpdated July 2026

LlamaIndex Data Framework for RAG, Retrieval, and Document Agents

LlamaIndex is an MIT-licensed Python and TypeScript framework for connecting language models to private data through loaders, parsers, nodes, ingestion pipelines, indexes, retrievers, query engines, rerankers, workflows, and agents.

Intermediate · Python or TypeScript package; integrates into any application server, notebook, or serverless function

Editorial review

Reviewed byOpenSourcesAI EditorialLast updatedJuly 2026SourcesLlamaIndex GitHub, LlamaIndex OSS documentation, LlamaIndex GitHub repository, LlamaIndex ingestion documentation, LlamaIndex querying documentation

Tool categories, pricing, source status, deployment options, and product claims can change quickly. Verify the official source before production or commercial use.

OpenSourcesAI verdict

LlamaIndex is a leading framework when data ingestion and retrieval are central to an AI application. It offers useful high-level defaults while exposing the components required for custom RAG and document-agent systems. Its flexibility can also produce fragile applications if developers accept default chunking, retrieval, persistence, and agent behavior without evaluation, security controls, and version discipline.

Best for

Developers building custom RAG, semantic search, structured extraction, document agents, or knowledge workflows who need configurable ingestion, retrieval, synthesis, evaluation, and integrations rather than a finished end-user workspace.

Why use it

Use LlamaIndex when the application must control how private data becomes model context. It provides abstractions for reading sources, converting content into nodes, transforming and embedding data, storing indexes, retrieving candidates, reranking evidence, synthesizing answers, and orchestrating agent or workflow logic.

Core package and integration packages

LlamaIndex can be installed through the starter llama-index package or assembled from llama-index-core plus chosen integration packages. The modular approach reduces unnecessary dependencies and makes provider choices explicit, but it requires careful version management across a large integration ecosystem.

The open-source framework is distinct from commercial LlamaCloud and LlamaParse services. LlamaParse, Extract, Index, and hosted agent products can integrate with the framework, but using the MIT-licensed library does not imply those hosted services are free or self-hosted.

Documents, nodes, metadata, and ingestion

Loaders produce Documents that are transformed into Nodes, typically text chunks with metadata and relationships. An ingestion pipeline can apply parsing, splitting, metadata extraction, embeddings, deduplication, and storage in a repeatable sequence.

Chunking is an application decision, not cleanup. Chunk size, overlap, document structure, headings, tables, metadata, and parent-child relationships affect what can be retrieved and cited. Important sources should be parsed and inspected before indexing at scale.

Use stable document identifiers and a deletion or refresh strategy. Without one, re-ingestion can create duplicates, stale chunks, or orphaned vectors even when the pipeline appears to run successfully.

Indexes, retrievers, query engines, and reranking

An index organizes nodes for retrieval, often through an external vector store. A retriever selects candidates, a reranker can reorder or filter them, and a response synthesizer asks a model to answer from the resulting context. A query engine packages these components into a callable interface.

High-level constructors make a demonstration possible in a few lines, but production systems should configure the embedding model, storage, top-k values, filters, prompts, response mode, reranker, and citation behavior explicitly. Defaults are starting points rather than quality guarantees.

Workflows and agents

LlamaIndex Workflows provide event-driven orchestration for multi-step processes. Agents can select tools such as query engines, retrievers, functions, or external services and can be composed into document-oriented workflows.

Older QueryPipeline material is in feature-freeze or deprecation in favor of Workflows, so new orchestration should follow current guidance rather than copying older examples. Agent safety, tool authorization, retries, and termination conditions remain responsibilities of the hosting application.

Storage, persistence, evaluation, and operations

Simple examples may keep data in memory or persist local storage, while real applications often use an external vector database, document store, index store, cache, and model or embedding services. Backups and migrations must cover every system needed to reconstruct the index.

Retrieval and response evaluation should use representative questions, expected sources, and negative cases. Measure whether the correct evidence was retrieved separately from whether the model produced a good answer. Observability integrations can help trace ingestion, retrieval, model calls, tools, and latency.

Key features

  • Data loaders and integrations for files, APIs, databases, storage systems, vector stores, models, and embedding providers.
  • Documents, nodes, metadata, relationships, transformations, and ingestion pipelines for repeatable indexing.
  • Vector, summary, keyword, property-graph, and external-store integrations with customizable retrievers.
  • Query engines and response synthesizers that combine retrieval, reranking, prompts, and language models.
  • Event-driven Workflows and agent components for multi-step, tool-using, and document-oriented applications.
  • Evaluation modules and observability integrations for retrieval, response, faithfulness, and experiment analysis.

Common AI use cases

  • Build custom RAG over documents, databases, APIs, and enterprise data sources.
  • Create semantic search with metadata filters and reranking.
  • Develop document agents that select among several knowledge tools.
  • Extract structured information from complex documents.
  • Combine vector retrieval with knowledge graphs, SQL, or other query engines.
  • Create ingestion and indexing jobs with explicit refresh and deletion behavior.

Business use cases

  • Internal knowledge and support systems with custom authorization and retrieval.
  • Document-processing pipelines for contracts, reports, policies, or technical records.
  • Research assistants that combine several databases and source types.
  • Vertical AI products requiring domain-specific retrieval and citation behavior.
  • Agentic workflows that reason across documents and business tools.

How AI builders can use it

  • Start with llama-index-core and only the integrations required by the application.
  • Define source identifiers, parsing, metadata, chunking, refresh, and deletion semantics.
  • Choose and version embedding, vector-store, reranker, and model components.
  • Build separate retrieval and answer-quality evaluation sets.
  • Trace the full request path and inspect sources for representative failures.
  • Add Workflows or agents only after a deterministic retrieval path is reliable.

Who should use it

  • Python or TypeScript developers building a custom data-aware AI application.
  • Teams that need control over ingestion, retrieval, reranking, prompts, and synthesis.
  • Applications integrating several data sources, vector stores, and model providers.
  • Developers building document agents and event-driven AI workflows.

Who should not use it

  • Users who want a finished document-chat product without writing and operating code.
  • Teams unwilling to maintain a modular dependency and integration ecosystem.
  • Applications without a plan for data refresh, deletion, evaluation, and access control.
  • Developers expecting a five-line quickstart to be a production RAG architecture.

Evaluation checklist

  • Which sources, formats, loaders, and parsing services are required?
  • How will documents and nodes receive stable identifiers, metadata, and access fields?
  • What chunking and relationship strategy preserves the source structure?
  • Which embedding, index, vector store, retriever, reranker, and model are versioned together?
  • How will updates, deletions, duplicate prevention, and reindexing work?
  • Which tests measure retrieval quality separately from answer quality?
  • What tools may agents invoke, and what authentication and approval controls surround them?
  • How will storage, traces, costs, backups, and package upgrades be managed?

Security and admin notes

  • LlamaIndex is a library intended to run inside a trusted application environment; network authentication and authorization belong to the hosting service.
  • Validate user-supplied text, URLs, file paths, SQL, metadata filters, model parameters, and tool inputs.
  • Apply tenant and document permissions during retrieval, not only after an answer is generated.
  • Treat loaders, integration packages, parsers, models, vector stores, and tools as supply-chain and data-exposure boundaries.
  • Prevent prompt injection in retrieved content from authorizing tools or overriding system policy.
  • Protect provider credentials and trace data and test deletion across all backing stores.

Pricing notes

LlamaIndex OSS is MIT-licensed. Costs come from model and embedding APIs, parsing services, vector databases, compute, storage, observability, and engineering. LlamaParse and other LlamaCloud products have separate commercial pricing and data-handling terms.

Tradeoffs

LlamaIndex provides exceptional control over data-aware AI systems, but it can make a prototype look production-ready before retrieval, persistence, deletion, authorization, and evaluation are solved. Its modular ecosystem is powerful and version-sensitive. The framework is most valuable when a team needs custom behavior and has the engineering discipline to test each layer.

Recommended workflow

  • Build a minimal ingestion pipeline with explicit identifiers and metadata.
  • Inspect produced nodes before indexing.
  • Create a deterministic retriever and a labeled evaluation set.
  • Add reranking and synthesis with versioned prompts.
  • Persist and restore every required store.
  • Introduce Workflows and agents with constrained tools and trace coverage.

Pros

  • Rich abstractions for ingestion, retrieval, synthesis, workflows, and agents.
  • Large integration ecosystem with modular core packages.
  • Supports simple prototypes and deeply customized production paths.
  • Strong fit for document-heavy and retrieval-centric applications.
  • MIT-licensed open-source framework.

Cons

  • Large and fast-moving integration surface.
  • Defaults can hide important retrieval and storage decisions.
  • Production security and web controls are outside the library.
  • Data refresh and deletion require application design.
  • Commercial LlamaCloud products are distinct from the OSS framework.

Alternatives

  • LangChain may be better when the application is primarily an agent or general LLM orchestration system.
  • Haystack may be better for teams preferring pipeline-oriented search and RAG components.
  • AnythingLLM may be better when a finished document workspace is needed instead of a framework.
  • Dify may be better for a visual application-building and deployment workflow.

FAQ

Is LlamaIndex a vector database?

No. It is a framework that can create and query indexes and integrate with vector databases, document stores, models, parsers, and other data systems.

Is LlamaIndex only for RAG?

No. It also supports ingestion, extraction, structured data, query engines, workflows, agents, and several index and graph patterns, but data-connected applications remain its core strength.

What is the difference between LlamaIndex and LlamaParse?

LlamaIndex is the open-source framework. LlamaParse is a separate hosted document parsing and agent platform that can be used with the framework or independently.

Should new projects use QueryPipeline?

Current documentation places QueryPipeline in feature-freeze or deprecation and recommends Workflows for orchestration.

Does LlamaIndex provide application security?

The library provides components, not a complete secure web application. Authentication, authorization, validation, rate limiting, and safe tool execution belong to the hosting system.

Official verification sources

Direct official links used to verify pricing, features, security claims, and product packaging.

CategoryRAG and workflowLicenseMITDeploymentPython or TypeScript package; integrates into any application server, notebook, or serverless functionModeCode framework
LlamaIndex GitHub

OpenSourcesAI ecosystem connections

Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.