- 内部知识库问答:数据源混杂(PDF、Notion、Postgres)时,连接器和索引抽象省掉大量胶水代码;自己拼 LangChain 的 loader 加向量库要重写一遍同样的东西
- 离线批量跑评测:索引和查询是分离的两步,可以先 persist 到 ./storage 再反复换 prompt、换模型重跑,不用每次重新嵌入
- 原型期验证 RAG 可行性:五行 API 能在一两天内判断「这套文档到底能不能被检索出来」,判断不成立就不用继续投入
- 需要把检索结果喂给 agent 做多步查询:它自带 query engine 和 agent 抽象,比在裸向量库上自己编排工具调用省事
llama_index
run-llamaMIT活跃维护 有专家点评面向 AI 应用的文档处理与 RAG 框架,把私有数据接入大模型,支持构建检索增强、智能体和多智能体应用。
LlamaIndex is the document processing platform for AI
专家点评
上手难度:进阶更新于 2026-11-11把散落的 PDF、SQL、API 数据整理成 LLM 可检索的索引层,替代自己手写切分、嵌入、召回管线
适用场景
踩坑
- 默认全在内存里,不显式调 storage_context.persist() 就什么都不落盘;跑长任务或容器里重启一次,索引全丢,这个坑在文档里只是一句带过
- 核心包是空壳,LLM、嵌入、向量库全要另装集成包(llama-index-llms-ollama、llama-index-embeddings-huggingface 等),版本组合对不上时会报 import 错;issue 里 pydantic v2 默认化、Bedrock 原生支持这类请求长期挂着,说明集成层的一致性不是它优先保证的
- 检索质量出问题时排查成本高:issue 里有「答案来自文档之外」这类反馈,说明召回和生成的边界不总是可控,需要自己加引用校验,别指望框架兜底
同类对比
LangChain 生态更宽但抽象更碎,做纯 RAG 管线时 LlamaIndex 的索引/查询分层更直接;如果只是要一个向量库加几十行检索代码,直接用 Qdrant、pgvector 加嵌入模型比引入整个框架更可控。
pip install llama-index-core
pip install llama-index-llms-openaiREADME 未说明显存或 GPU 要求;示例支持通过 Ollama 调用本地模型、用 HuggingFaceEmbedding 做本地嵌入,也可改用 OpenAI 等云端 LLM。
项目说明
由 README 自动翻译提炼开源数据框架,把私有数据接入 LLM,快速搭建 RAG 与智能体应用
面向 AI 应用的文档处理与 RAG 框架,把私有数据接入大模型,支持构建检索增强、智能体和多智能体应用。
核心能力
- 用数据连接器接入 API、PDF、文档、SQL 等数据源
- 用索引与图结构组织数据,便于 LLM 检索使用
- 提供检索与查询接口,输入提示返回知识增强结果
- 高层 API 五行代码完成数据导入与查询
- 可与 LangChain、Flask、Docker 等外部框架集成
容易踩的坑
默认数据存在内存中,需调用 storage_context.persist() 才会持久化到 ./storage;用 OpenAI 需先设置 OPENAI_API_KEY 环境变量;核心包需按需另装 LLM、嵌入等集成包,如 llama-index-llms-ollama、llama-index-embeddings-huggingface。
- v0.14.25最新正式版2026-09-21 · 2026-09-21 16:22 UTC
Release Notes
[2026-09-21]
llama-index-agent-agentmesh [0.3.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-agent-azure [0.4.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-argilla [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-arize-phoenix [0.8.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-honeyhive [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-langfuse [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-literalai [1.5.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-openinference [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-opik [1.4.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-promptlayer [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-uptrain [0.7.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-callbacks-wandb [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-core [0.14.25]
- Remove deprecated ipex-llm and optimum-intel IPEX integrations (#22406)
- fix(core): fall back when metadata replacement target value is None (#22773)
- test(core): cover empty arguments in streamed tool calls (#22825)
- Fix: restore compact and refine streaming (#22836)
- fix(core): avoid retrying failed function tools (#22841)
- feat(core): add native async support to StructuredLLMRerank (#22842)
- fix: resolve a ton of security alerts (#22855)
llama-index-embeddings-adapter [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-embeddings-alephalpha [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-embeddings-alibabacloud-aisearch [0.5.0]
- fix: resolve a ton of security alerts (#22855)
- chore: re-lock the 93 manifests with stuck Dependabot alerts (#22921)
llama-index-embeddings-anyscale [0.6.0]
- fix: resolve a ton of security alerts (#22855)
llama-index-embeddings-autoembeddings [0.4.0]
- fix: resolve a ton of security alerts (#22855)
- chore: re-lock the 93 manifests with stuck Dependabot alerts (#22921)
llama-index-embeddings-azure-inference [0.6.0]
- v0.14.242026-08-19 · 2026-08-19 18:48 UTC
查看更新说明
Release Notes
[2026-08-19]
llama-index-core [0.14.24]
- fix: close HotpotQA evaluator file handles (#22113)
- fix(core): preserve oversized leaf nodes in CodeSplitter (#22119)
- fix: preserve multiblock chat history writes (#22124)
- fix(core): skip empty nodes in HTMLNodeParser (#22125)
- fix(core): respect mmr_threshold=0 in MMR embedding search (#22126)
- fix: keep all nodes per document in IngestionPipeline upserts (re-submit of #22046, not a dup of #21456) (#22133)
- fix: don't mark *args/**kwargs as required tool parameters (#22135)
- fix(core): default MetadataFilters condition to AND when None (#22155)
- fix: honor agent structured_output_fn/output_cls inside AgentWorkflow (#22162)
- fix(core): use word tokenization for stopword removal in SemanticDoubleMergingSplitterNodeParser (#22167)
- fix(core): restore prompt helper fallback to supplied LLM metadata (#22177)
- populate response text on streaming chat response when writing to memory (#22179)
- feat(property_graph): add raise_on_error to LLM path extractors (#22195)
- Clarify FactExtractionMemoryBlock condense prompt to return a full snapshot (#22213)
- fix a few typos (#22512)
- fix(core): give each CitationQueryEngine citation node its own id and offsets (#22537)
- fix(core): persist SimpleChatStore without escaping non-ascii (#22538)
- feat(core): allow Memory to accept any AsyncDBChatStore (#22541)
- test(node_parser): enable pytest discovery for sentence_window tests (#22545)
- Implement async for LLMRerank (#22597)
llama-index-embeddings-bedrock [0.8.3]
- fix: make aioboto3 optional in llama-index-embeddings-bedrock (#21915)
- fix(embeddings): validate non-empty Bedrock embedding payload before AWS call (#22527)
llama-index-embeddings-voyageai [0.6.1]
- fix: set chunk_size=32000 and fix input format for contextualizedembeddings (#22144)
llama-index-graph-stores-falkordb [0.6.0]
- fix(falkordb): correct schema, vector ranking, filters and batching in property graph store (#22522)
llama-index-indices-managed-dashscope [0.5.1]
- fix(dashscope): send query_history in retriever payload (#22212)
llama-index-indices-managed-lancedb [0.3.2]
llama-index-llms-anthropic [0.11.10]
- feat(anthropic): Add support for Claude Sonnet 5 (#22202)
- Fix/sonnet 5 function calling ([#22217](https://github.com/run-llama/llama
- v0.14.232026-06-24 · 2026-06-24 19:36 UTC
查看更新说明
Release Notes
[2026-06-24]
llama-index-callbacks-argilla [0.5.0]
- chore(deps): bump the uv group across 32 directories with 3 updates (#21664)
- chore(deps): bump the uv group across 29 directories with 3 updates (#21665)
- chore(deps): bump the uv group across 31 directories with 3 updates (#21668)
- chore(deps): bump the pip group across 35 directories with 4 updates (#21714)
- chore(deps): bump the uv group across 32 directories with 5 updates (#21717)
- chore(deps): bump the uv group across 31 directories with 5 updates (#21719)
- chore(deps): bump the uv group across 31 directories with 5 updates (#21720)
- chore(deps): bump the uv group across 30 directories with 5 updates (#21721)
- chore(deps): bump the uv group across 30 directories with 5 updates (#21722)
- chore(deps): bump the pip group across 12 directories with 4 updates (#21724)
- chore(deps): bump the uv group across 21 directories with 3 updates (#21725)
- chore(deps): bump the pip group across 11 directories with 4 updates (#21726)
- chore(deps): bump the uv group across 17 directories with 3 updates (#21727)
- chore(deps): bump the uv group across 18 directories with 4 updates (#21733)
- chore(deps): bump the uv group across 7 directories with 6 updates (#21736)
llama-index-core [0.14.23]
- feat(core): Multimodal synthesis part 2 (#21561)
- fix(core): add DocumentBlock and VideoBlock to FunctionTool._parse_tool_output (#21678)
- fix(prompt_helper): guard against ZeroDivisionError on empty input sequences (#21707)
- Preserve URL-backed video and document memory blocks (#21728)
- fix: add explicit encoding='utf-8' to llama-index-core text-mode file I/O (#21729)
- Add tool calling mock LLM (#21732)
- make tests green again (#21737)
- Fix refresh_ref_docs kwargs reuse (#21752)
- perf: use a set instead of a list for within-batch dedup in Ingestion… (#21755)
- fix: use running loop in ingestion pipeline (#21765)
- fix(core): preserve IndexNode obj during model dump (#21776)
- fix(workflow): deep copy initial_state to prevent mutation leaks across runs (#21780)
- Multimodal query engines (#21784)
- fix(core): match missing metadata for NE and NIN filters (#21785)
- fix: preserve TreeSelectLeafRetriever source nodes (#21787)
- Fix RecursionError in TokenTextSplitter & SentenceSplitter for units larger than chunk_size ([#21900](
- v0.14.222026-05-14 · 2026-05-14 20:22 UTC
查看更新说明
Release Notes
[2026-05-14]
llama-index-agent-agentmesh [0.2.0]
- mass uv lock --upgrade (#21638)
llama-index-callbacks-agentops [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-aim [0.4.1]
- mass uv lock --upgrade (#21638)
llama-index-callbacks-argilla [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
llama-index-callbacks-arize-phoenix [0.7.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-honeyhive [0.5.0]
- mass uv lock --upgrade (#21638)
llama-index-callbacks-langfuse [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-literalai [1.4.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-openinference [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-opik [1.3.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-promptlayer [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-uptrain [0.6.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-callbacks-wandb [0.5.0]
- chore(deps): bump the pip group across 55 directories with 3 updates (#21435)
- mass uv lock --upgrade (#21638)
llama-index-core [0.14.22]
- fix(instrumentation): let SparseEmbeddingStartEvent inherit EmbeddingStartEvent (#21119)
- fix: remove stale exports from public all lists (#21133)
- Preserve cache writes from multiprocessing workers in IngestionPipeline (#21301)
- feat(core): Multimodal synthesis (#21374)
- fix: avoid mutating response.raw in LLM event model_dump methods (#21424)
- fix(memory): handle DocumentBlock in Memory._estimate_token_count (#21529)
- fix: propagate contextvars in sync_to_async for FunctionTool (#21558)
- mass uv lock --upgrade ([#21638](https:
- v0.14.212026-04-21 · 2026-04-21 00:18 UTC
查看更新说明
Release Notes
[2026-04-21]
llama-index-callbacks-honeyhive [0.5.0]
- chore(deps): bump the pip group across 87 directories with 2 updates (#21382)
- chore(deps): bump the pip group across 68 directories with 2 updates (#21394)
llama-index-core [0.14.21]
- fix(core): prevent
KeyErrorinDocumentSummaryIndex.delete_nodeswhen invalid node ID is provided (#21067) - fix(core): handle
ValueErrorandTypeErrorfrom structured output failures (#21090) - fix: add explicit UTF-8 encoding to persistence layer fs.open() calls (#21111)
- Fix Breaking Change in Message Block Buffer Resolution (#21339)
- chore(deps): bump the pip group across 87 directories with 2 updates (#21382)
- chore(deps): bump the pip group across 68 directories with 2 updates (#21394)
llama-index-embeddings-huggingface-optimum [0.4.1]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-nvidia [0.5.1]
- feat(embeddings-nvidia): add http client support (#21046)
llama-index-embeddings-oracleai [0.4.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-premai [0.5.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
- chore(deps): bump the pip group across 87 directories with 2 updates (#21382)
- chore(deps): bump the pip group across 68 directories with 2 updates (#21394)
llama-index-embeddings-text-embeddings-inference [0.5.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-textembed [0.4.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-together [0.5.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-upstage [0.6.1]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
- chore(deps): bump the pip group across 87 directories with 2 updates (#21382)
- chore(deps): bump the pip group across 68 directories with 2 updates (#21394)
llama-index-embeddings-vertex [0.5.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-vertex-endpoint [0.4.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-vllm [0.1.1]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-voyageai [0.6.0]
- chore(deps): bump the pip group across 96 directories with 2 updates (#21381)
llama-index-embeddings-xinference [0.4.0]
- chore(deps)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🗂️ LlamaIndex Framework 🦙
[!NOTE] The current focus of LlamaIndex is to build the best AI-powered engine for document parsing and extraction. LlamaParse is our enterprise platform for agentic OCR, parsing, extraction, indexing and more. LiteParse represents our efforts to build the best free, fast, cheap text parser in the market. ParseBench and ExtractBench represent our commitment towards open benchmarking for parsing and extraction.
The company itself has undergone an evolution since when this OSS framework first launched 3 years ago in 2023. Since the early days, the framework has consisted of a broad set of orchestration tools enabling developers to build various RAG and agent applications.
While we still have the OSS framework available as an open toolkit that you're welcome to use, our primary focus has shifted towards LlamaParse, along with liteparse and our benchmarking efforts. We have a strong belief that agents are the new consumers of documents, and they fundamentally need the right tools to unlock context from the world's hardest documents accurately/cheaply at scale. Whether you're an AI startup processing documents or an enterprise looking to automate document workflows, come talk to us.
LlamaIndex Framework (by LlamaIndex, the company behind LlamaParse) is an open-source framework to build agentic applications. You can use LlamaParse with this framework or on its own; see LlamaParse below for signup and product links.
📚 Documentation:
Building with LlamaIndex typically involves working with LlamaIndex core and a chosen set of integrations (or plugins). There are two ways to start building with LlamaIndex in Python:
-
Starter:
llama-index. A starter Python package that includes core LlamaIndex as well as a selection of integrations. -
Customized:
llama-index-core. Install core LlamaIndex and add your chosen LlamaIndex integration packages from the integrations page that are required for your application. There are over 300 LlamaIndex integration packages that work seamlessly with core, allowing you to build with your preferred LLM, embedding, and vector store providers.
The LlamaIndex Python library is namespaced such that import statements which
include core imply that the core package is being used. In contrast, those
statements without core imply that an integration package is being used.
# typical pattern
from llama_index.core.xxx import ClassABC # core submodule xxx
from llama_index.xxx.yyy import (
SubclassABC,
) # integration yyy for submodule xxx
# concrete example
from llama_index.core.llms import LLM
from llama_index.llms.openai import OpenAI
LlamaParse (document agent platform)
LlamaParse is its own platform—focused on document agents and agentic OCR. It includes Parse (parsing), LlamaAgents (deployed document agents), Extract (structured extraction), and Index (ingest and RAG). You can use it with the LlamaIndex framework or standalone.
- Sign up for LlamaParse — Create an account and get your API key.
- Parse — Agentic OCR and document parsing (130+ formats). Docs
- Extract — Structured data extraction from documents. Docs
- Index — Ingest, index, and RAG pipelines. Docs
- Split — Split large documents into subcategories. Docs
- Agents — Build end-to-end document agents with
Workflowsand Agent Builder. Docs
Important Links
🚀 Overview
NOTE: This README is not updated as frequently as the documentation. Please check out the documentation above for the latest updates!
Context
- LLMs are a phenomenal piece of technology for knowledge generation and reasoning. They are pre-trained on large amounts of publicly available data.
- How do we best augment LLMs with our own private data?
We need a comprehensive toolkit to help perform this data augmentation for LLMs.
Proposed Solution
That's where LlamaIndex comes in. LlamaIndex is a "data framework" to help you build LLM apps. It provides the following tools:
- Offers data connectors to ingest your existing data sources and data formats (APIs, PDFs, docs, SQL, etc.).
- Provides ways to structure your data (indices, graphs) so that this data can be easily used with LLMs.
- Provides an advanced retrieval/query interface over your data: Feed in any LLM input prompt, get back retrieved context and knowledge-augmented output.
- Allows easy integrations with your outer application framework (e.g. with LangChain, Flask, Docker, ChatGPT, or anything else).
LlamaIndex provides tools for both beginner users and advanced users. Our high-level API allows beginner users to use LlamaIndex to ingest and query their data in 5 lines of code. Our lower-level APIs allow advanced users to customize and extend any module (data connectors, indices, retrievers, query engines, reranking modules), to fit their needs.
💡 Contributing
Interested in contributing? Contributions to LlamaIndex core as well as contributing integrations that build on the core are both accepted and highly encouraged! See our Contribution Guide for more details.
New integrations should meaningfully integrate with existing LlamaIndex framework components. At the discretion of LlamaIndex maintainers, some integrations may be declined.
📄 Documentation
Full documentation can be found here
Please check it out for the most up-to-date tutorials, how-to guides, references, and other resources!
💻 Example Usage
# custom selection of integrations to work with core
pip install llama-index-core
pip install llama-index-llms-openai
pip install llama-index-llms-ollama
pip install llama-index-embeddings-huggingface
Examples are in the docs/examples folder. Indices are in the indices folder (see list of indices below).
To build a simple vector store index using OpenAI:
import os
os.environ["OPENAI_API_KEY"] = "YOUR_OPENAI_API_KEY"
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("YOUR_DATA_DIRECTORY").load_data()
index = VectorStoreIndex.from_documents(documents)
To build a simple vector store index using non-OpenAI LLMs, e.g. LLMs hosted through Ollama:
from llama_index.core import Settings, VectorStoreIndex, SimpleDirectoryReader
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
from llama_index.llms.ollama import Ollama
from transformers import AutoTokenizer
# set the LLM
Settings.llm = Ollama(
model="llama-3.1:latest",
request_timeout=360.0,
)
# set tokenizer to match LLM
Settings.tokenizer = AutoTokenizer.from_pretrained(
"meta-llama/Llama-3.1-8B-Instruct"
)
# set the embed model
Settings.embed_model = HuggingFaceEmbedding(
model_name="BAAI/bge-small-en-v1.5"
)
documents = SimpleDirectoryReader("YOUR_DATA_DIRECTORY").load_data()
index = VectorStoreIndex.from_documents(
documents,
)
To query:
query_engine = index.as_query_engine()
query_engine.query("YOUR_QUESTION")
By default, data is stored in-memory.
To persist to disk (under ./storage):
index.storage_context.persist()
To reload from disk:
from llama_index.core import StorageContext, load_index_from_storage
# rebuild storage context
storage_context = StorageContext.from_defaults(persist_dir="./storage")
# load index
index = load_index_from_storage(storage_context)
A note on Verification of Build Assets
By default, llama-index-core includes a _static folder that contains the nltk and tiktoken cache that is included with the package installation. This ensures that you can easily run llama-index in environments with restrictive disk access permissions at runtime.
To verify that these files are safe and valid, we use the github attest-build-provenance action. This action will verify that the files in the _static folder are the same as the files in the llama-index-core/llama_index/core/_static folder.
To verify this, you can run the following script (pointing to your installed package):
#!/bin/bash
STATIC_DIR="venv/lib/python3.13/site-packages/llama_index/core/_static"
REPO="run-llama/llama_index"
find "$STATIC_DIR" -type f | while read -r file; do
echo "Verifying: $file"
gh attestation verify "$file" -R "$REPO" || echo "Failed to verify: $file"
done
📖 Citation
Reference to cite if you use LlamaIndex in a paper:
@software{Liu_LlamaIndex_2022,
author = {Liu, Jerry},
doi = {10.5281/zenodo.1234},
month = {11},
title = {{LlamaIndex}},
url = {https://github.com/jerryjliu/llama_index},
year = {2022}
}