What this thread does
Do first: Import the reader and index from llama_index.core, then load ./data.
Short answer
Loading produces documents; indexing embeds their chunks. A query engine retrieves context and generates a response.
What to do
| Item | Value / action |
|---|---|
| Reader | from llama_index.core import SimpleDirectoryReader |
| Load | documents = SimpleDirectoryReader("./data").load_data() |
| Index | from llama_index.core import VectorStoreIndex; index = VectorStoreIndex.from_documents(documents) |
| Progress | Pass show_progress set to True to from_documents to display progress. |
| Query | query_engine = index.as_query_engine(); then call query_engine.query(...) with your question. |
| Save | index.storage_context.persist(persist_dir="<persist_dir>"); replace the destination placeholder. |
Limits and open questions
Embedding generation can take time and incur provider charges. These pages do not prescribe a package version. Retrieval count and similarity thresholds in the querying tutorial are examples, not defaults.
Not for: LangChain document loaders and vector stores.
Sources
Checked
2026-11-16; read Loading Data (Ingestion), Introduction to RAG, Indexing, Querying, Storing; no command was run.
Started from a post by @run-llama, packaged by the editor. Original post