LlamaIndex
Definição
LlamaIndex focuses on connecting LLMs to your data: ingestion, indexing, and querying. It provides flexible RAG pipelines, multiple index types, and evaluation tools.
Ele complementa o LangChain: LlamaIndex enfatiza a camada de dados (documentos, embeddings, vector stores, indexing strategies). Use quando your priority is robust RAG over your own docs, APIs, or databases, with control over chunking, recuperação, and synthesis. Also supports agents and query engines.
Como funciona
Carregar dados de documentos, APIs ou bancos de dados em um formato de documento unificado. Construir índices: índice vetorial (embeddings + vector store), keyword index, or hybrid; you choose node parsers (chunking), embedding model, and index type. Query engines run recuperação (optionally with reranking) and then synthesis (the LLM answers from retrieved nodes). You can customize retrievers, node parsers, and response synthesis (por ex. tree summarization, simple concatenation). Evaluation tools (por ex. faithfulness, relevance) help tune chunking and recuperação for production RAG. Agents can use LlamaIndex query engines as tools inside LangChain or native agent loops.
Casos de uso
LlamaIndex fits when you need flexible RAG indexing, query engines, and evaluation over your own data and APIs.
- RAG and document Q&A with flexible indexing and query engines
- Connecting LLMs to internal data (docs, APIs, databases)
- Evaluating and tuning recuperação and synthesis for production RAG