AI / LlamaIndex Interview Questions
What are the types of indices in LlamaIndex?
LlamaIndex ships several index types, each organizing Nodes differently depending on how you plan to query them.
- VectorStoreIndex - embeds Nodes and retrieves by similarity search; the default choice for most RAG use cases.
- SummaryIndex (formerly ListIndex) - stores Nodes as a simple sequential list; good for small corpora or when you need to summarize everything rather than search selectively.
- TreeIndex - builds a hierarchical tree of summaries over the Nodes, useful for large documents where you want to traverse from a high-level summary down to details.
- KeywordTableIndex - extracts keywords from Nodes and retrieves via keyword matching instead of embeddings.
- KnowledgeGraphIndex and the newer PropertyGraphIndex - extract entities and relationships into a graph structure for relationship-heavy queries.
Choosing the right index depends on the query pattern: pinpoint fact lookup favors VectorStoreIndex, holistic summarization favors SummaryIndex or TreeIndex, and relationship questions favor a graph index.
More Related questions...