What is LlamaIndex?

Aerial view of a highway of Los Angeles

Authors

Vanna Winland

AI Advocate & Technology Writer

What is LlamaIndex?

LlamaIndex is an open source framework and a broader ecosystem of tools for building AI applications that work with documents and private data. Originally focused on data orchestration for retrieval-augmented generation (RAG), the LlamaIndex ecosystem has expanded to include document parsing, extraction, indexing, retrieval and agentic workflows. Its current product focus is AI-powered document parsing and extraction, designed to help developers turn unstructured documents into structured, actionable data for large language models (LLMs).

3D design of balls rolling on a track

The latest AI News + Insights 


Discover expertly curated insights and news on AI, cloud and more in the weekly Think Newsletter. 

How LlamaIndex works

At its core, LlamaIndex connects LLMs to documents and private data through a process called context augmentation—supplying external information to the model at inference time rather than retraining it. The framework addresses a fundamental limitation of LLMs: although these models are pretrained on large datasets, their pretrained weights do not inherently contain an organization’s private data or information created after training.

LlamaIndex provides mechanisms for supplying that external information at inference time—ingesting documents, parsing them into a format that LLMs can reason over, and retrieving the most relevant content at query time.

As LlamaIndex has expanded beyond its early focus on RAG, document processing has become an increasingly important part of the ecosystem. High-quality parsing helps preserve the structure and context that downstream retrieval and AI applications depend on.

Think Keynotes

How enterprises excel in the AI era

Move beyond AI hype to measurable value. See how IBM is transforming into an AI-first enterprise and turning agentic AI into productivity, reinvestment and real business impact.

The LlamaIndex ecosystem

The LlamaIndex ecosystem is organized around three components:

  • LlamaIndex framework (open source): Core Python and TypeScript framework for building agents and RAG applications over external data.
  • LiteParse (open source): Standalone local document parser built in Rust for fast, lightweight, on-device parsing.
  • LlamaParse (hosted and cloud): Enterprise platform for agentic OCR, document parsing, extraction, indexing and agent deployment.

LlamaIndex framework (open source)

The LlamaIndex open source library—available in Python and TypeScript—is the foundation for building LLM-powered applications. Available through pip install llama-index  or the modular llama-index-core , the framework provides over 300 integration packages through LlamaHub, covering LLM providers, embedding models, vector stores and data connectors.

The framework is centered on the following core abstractions:

  • Documents and nodes. Data ingested from any source—PDFs, APIs, SQL databases, Markdown files, images—is loaded as Document objects. Documents are then split into Node  objects, where each node represents a chunk of a source document.
  • Indexes. Nodes are organized into index structures, most commonly a VectorStoreIndex , to enable semantic retrieval—search based on meaning rather than keyword matching. LlamaIndex supports multiple index types suited to different querying strategies, including vector store, summary and knowledge graph indexes.
  • Query engines. Query engines accept natural language queries and return context-rich responses by retrieving the most relevant nodes and combining them with the LLM prompt.
  • Workflows. Event-driven abstractions that chain together agent steps, prompt calls and tool use for complex, multi-step tasks.

LlamaIndex integrates with a wide range of LLM and embedding providers, including OpenAI, Ollama, IBM® Granite® and others. Furthermore, it can be combined with frameworks such as LangChain. LlamaIndex integration packages are installed individually from LlamaHub, keeping dependencies lean.

LlamaParse (enterprise cloud platform)

LlamaParse is LlamaIndex’s enterprise platform for agentic OCR and document processing. It is designed for production document pipelines that require high-fidelity parsing of complex, real-world documents: dense tables, multi-column layouts, charts, handwritten text and scanned PDFs.

LlamaParse supports over 130 document formats and exposes its capabilities through a Python SDK (pip install llama_cloud ) and a TypeScript SDK (npm install @llamaindex/llama-cloud ). The platform provides capabilities across document parsing, extraction, indexing, retrieval, splitting and agentic workflows:

  • Parse: Agentic OCR and document parsing across 130+ formats. It handles complex layout elements that simpler parsers miss.
  • Extract: Structured data extraction that pulls tables, figures, key fields and named entities from documents into structured outputs.
  • Index: Managed ingestion, embedding and retrieval. It connects parsed documents to RAG pipelines.
  • Split: Splits large documents into meaningful subcategories for more granular downstream processing.
  • Agents: Build and deploy end-to-end document agents by using the workflows abstraction and agent builder.

Document parsing: choosing a parser

Document parsing—converting raw files into clean, LLM-readable text—is now central to LlamaIndex’s value proposition. The ecosystem provides two complementary tools for this task, designed for different use cases and complexity levels.

LiteParse (open source, local)

LiteParse is a stand-alone, open source PDF and document parsing library built for fast, lightweight, local parsing. Written in Rust and released under the Apache 2.0 license, LiteParse runs entirely on-device with no cloud dependency or proprietary LLM requirements.

LiteParse is available for multiple environments:

  • Python —pip install liteparse
  • Node.js/TypeScript —npm i @llamaindex/liteparse
  • Rust —cargo add liteparse
  • Browser (WASM) —npm i @llamaindex/liteparse-wasm

LiteParse accepts PDFs, DOCX, XLSX, PPTX and image files, producing output in Markdown, JSON or plain text. Its Markdown output reconstructs document structure—headings, tables, lists, images and links—from spatial layout analysis, making it well suited for feeding documents into LLMs and RAG pipelines.

Key capabilities include:

  • Spatial text parsing. Uses PDFium for precise text extraction with bounding boxes, enabling layout-aware document understanding.
  • Flexible OCR. Built-in Tesseract OCR ships with the library at zero configuration. For more demanding use cases, LiteParse supports plug-in HTTP-based OCR servers (such as EasyOCR or PaddleOCR) through a standard OCR API specification.
  • Complexity detection. Before running a full parse, LiteParse can cheaply estimate whether a document requires OCR or heavier processing—enabling intelligent routing, cost estimation or early rejection of documents that exceed a complexity threshold.
  • Screenshot generation. Produces high-quality page screenshots suitable for multimodal LLM agents that reason over visual document content.
  • Worker pool mode. Python and Node.js bindings support persistent worker processes for true parallelism and per-parse timeouts, ensuring that malformed documents do not stall production pipelines.

LiteParse is a strong choice for high-volume, latency-sensitive or air-gapped environments. Its complexity detection feature—which checks whether a document needs OCR or heavier processing before committing to a full parse—makes it easy to route documents intelligently: simple documents stay local, complex ones get escalated.

For documents that exceed what local parsing can handle—scanned PDFs, intricate tables, dense multi-column layouts or handwritten content—LlamaParse’s cloud parsing service is the recommended upgrade path. It applies agentic OCR to reconstruct document content with high fidelity regardless of layout complexity. Developers typically begin with LiteParse for fast local iteration and route-specific document types to LlamaParse when quality requirements demand it.

How documents move through a RAG pipeline

Whether using LiteParse locally or LlamaParse in the cloud, a RAG pipeline that feeds a LlamaIndex application can follow this general pattern:

  1. Parse. Raw documents (PDFs, Word files, spreadsheets, images) are converted into clean, structured text with preserved layout semantics.
  2. Chunk. Parsed text is split into coherent chunks, called Node  objects in the LlamaIndex framework, suitable for embedding.
  3. Embed. Each chunk is encoded into a vector embedding—a numerical representation of the chunk’s semantic content.
  4. Index. Chunks and their representations are organized in an index so they can be efficiently retrieved at query time.
  5. Retrieve. Relevant chunks are retrieved from the index based on the configured retrieval strategy.
  6. Respond. The retrieved context is combined with the user’s query and sent to the LLM, which generates a grounded response.

This pipeline supports both simple question-answering over documents and complex agentic workflows where AI agents autonomously navigate, extract and reason over large document collections.

Retrieval-augmented generation (RAG)

Retrieval-augmented generation (RAG) remains one of the primary use patterns for LlamaIndex. A RAG application allows an LLM to retrieve relevant information from a private knowledge base at inference time rather than relying solely on its pretrained weights. The retrieved information is then supplied as context to the model, subject to the model’s context window limits.

This approach is critical for generative AI applications where the relevant data—financial reports, contracts, internal documentation, research papers—was not available at training time or changes frequently.

LlamaIndex streamlines every step of the RAG pipeline with high-level APIs:

  • Loading. LlamaHub integrations provide data connectors for APIs, databases, cloud storage services and document formats.
  • Indexing. The VectorStoreIndex  handles chunking and embedding automatically, with support for multiple vector store backends.
  • Querying. Query engines accept natural language questions and handle retrieval, optional post-processing (reranking, filtering) and response synthesis transparently.

LlamaIndex also supports structured data querying, including text-to-SQL for relational databases and text-to-Pandas for tabular data. Vector store backends are available through LlamaHub integrations, covering a range of vector databases.

Agentic AI with LlamaIndex

Beyond retrieval, LlamaIndex enables agentic applications—systems where an LLM autonomously plans and executes multi-step tasks.

Agents and workflows

The LlamaIndex framework supports building agents that operate through a reasoning loop: they assess what they know, select an appropriate tool, observe the result and decide what to do next—repeating this cycle until the task is complete. LlamaIndex supports multiple agent architectures, including ReAct-style agents that iteratively select and invoke tools, as well as more structured workflow-based pipelines.

Two important building blocks for agentic applications in LlamaIndex are tools and workflows:

  • Tools. FunctionTool  converts any Python function into a tool that the agent can call. QueryEngineTool  wraps a query engine, giving the agent access to a searchable knowledge base.
  • Workflows. The workflows abstraction provides event-driven orchestration of multi-step agent pipelines, enabling complex document processing tasks to be expressed as composable, reusable pipelines. The processing tasks can include: ingesting a batch of contracts, extracting key clauses and writing structured summaries, and so on.

LlamaParse’s Agents service extends this with a hosted environment for building and deploying document agents without managing infrastructure.

Use cases

LlamaIndex’s document-centric architecture supports a wide range of enterprise and developer use cases:

Document question-answering. Ask targeted questions against large document collections—PDFs, contracts, research papers, internal knowledge bases—and return grounded responses.

Conversational applications. Build chatbots and multi-turn chat experiences that maintain a conversational state while retrieving information from private data by using LlamaIndex’s chat engine abstractions.

Structured data extraction. Use the “Extract” service to pull tables, named entities, dates, figures and custom schemas from documents at scale—converting unstructured content into database-ready records.

Agentic document workflows. Deploy agents that autonomously process document pipelines: ingesting incoming files, classifying content, extracting fields, routing outputs to downstream systems and flagging exceptions for human review.

Multimodal document understanding. Combine LiteParse’s screenshot generation with multimodal LLMs to reason over documents that mix text, charts, diagrams and images.

Benchmarking and evaluation. LlamaIndex publishes ParseBench and ExtractBench, open benchmarks for measuring the accuracy of document parsing and structured extraction pipelines across tools.

Related solutions
IBM watsonx Orchestrate®

Easily design scalable AI assistants and agents, automate repetitive tasks and simplify complex processes with IBM watsonx Orchestrate.

Explore watsonx Orchestrate
IBM Bob

Accelerate software delivery with Bob, your AI partner for secure, intent-aware development.

Explore IBM Bob
Artificial intelligence solutions

Put AI to work in your business with IBM’s industry-leading AI expertise and portfolio of solutions at your side.

Explore AI solutions
Take the next step

Discover how you can scale and govern your AI with watsonx Orchestrate, the control plane that helps you streamline operations, automate workflows, and manage intelligent agents with ease.

  1. Discover watsonx Orchestrate
  2. Explore IBM Bob