Reference · Glossary
LlamaIndex
Last updated
A framework focused on **connecting LLMs to your data** — loaders for files/APIs/databases, chunking and indexing strategies, and query engines that wrap the retrieve-then-generate pattern so you write less RAG plumbing by hand.
#When to use
RAG apps with varied data sources (PDFs, Notion, SQL, APIs) where you want ready-made loaders and indexing strategies instead of writing every chunking/retrieval step yourself.
#When not to
A tiny 5-document demo — a hand-rolled chunk-and-embed loop (like in `build-mini-rag`) is easier to fully understand first. Add a framework once the plumbing repeats across projects.
#Example
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
docs = SimpleDirectoryReader("./data").load_data()
index = VectorStoreIndex.from_documents(docs)
query_engine = index.as_query_engine()
print(query_engine.query("What is the refund window?"))