The Index Hierarchy: Vector, Tree, Keyword
Compare VectorStoreIndex (default), TreeIndex (summarization), and KeywordTableIndex (sparse).
Indexes in LlamaIndex
LlamaIndex calls its retrieval data structures "Indexes". There are several types, each suited to different tasks.
VectorStoreIndex (Default)
The standard embedding-based index — your daily driver:
from llama_index.core import VectorStoreIndex
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
print(query_engine.query('What is in the handbook?'))All lessons in this course
- Document Loaders and Parsers
- The Index Hierarchy: Vector, Tree, Keyword
- Query Engines and Response Synthesis
- Sub-Question Decomposition Strategy