Retriever Modes
Here we show the mapping from retriever_mode configuration to the selected retriever class.
Note that
retriever_modecan mean different thing for different index classes.
Vector Index
Section titled “Vector Index”Specifying retriever_mode has no effect (silently ignored).
vector_index.as_retriever(...) always returns a VectorIndexRetriever.
Summary Index
Section titled “Summary Index”default: SummaryIndexRetrieverembedding: SummaryIndexEmbeddingRetrieverllm: SummaryIndexLLMRetriever
Tree Index
Section titled “Tree Index”select_leaf: TreeSelectLeafRetrieverselect_leaf_embedding: TreeSelectLeafEmbeddingRetrieverall_leaf: TreeAllLeafRetrieverroot: TreeRootRetriever
Keyword Table Index
Section titled “Keyword Table Index”default: KeywordTableGPTRetrieversimple: KeywordTableSimpleRetrieverrake: KeywordTableRAKERetriever
Knowledge Graph Index
Section titled “Knowledge Graph Index”keyword: KGTableRetrieverembedding: KGTableRetrieverhybrid: KGTableRetriever
Document Summary Index
Section titled “Document Summary Index”llm: DocumentSummaryIndexLLMRetrieverembedding: DocumentSummaryIndexEmbeddingRetrievers
Note for AI agents: this documentation is built for programmatic access.
- Overview of all docs: https://developers.llamaindex.ai/llms.txt
- Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md
- Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters.
- A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/python/shared/mcp/