This page covers knowledge retrieval. For knowledge acquisition (how to learn from repos, papers, etc.), see Knowledge System.
Available Backends
| Backend | Description | Best For |
|---|---|---|
kg_graph_search | Weaviate embeddings + LLM reranking + Neo4j graph | Recommended - Best quality results |
kg_llm_navigation | Neo4j + LLM-guided navigation | Complex multi-hop exploration |
KG Graph Search (Recommended)
Uses OpenAI embeddings for semantic search in Weaviate, optional LLM reranking for improved relevance, and Neo4j for graph relationship enrichment.Search Flow
Quick Start
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
embedding_model | str | text-embedding-3-large | OpenAI model for embeddings |
weaviate_collection | str | KGWikiPages | Weaviate collection name |
use_llm_reranker | bool | True | Enable LLM-based reranking |
reranker_model | str | gpt-4.1-mini | LLM model for reranking |
include_connected_pages | bool | True | Include graph connections in results |
Configuration Presets
Usage Examples
LLM Reranker
The reranker uses an LLM to improve result ordering based on query relevance:- Semantic search returns 2x
top_kcandidates - LLM analyzes each candidate’s relevance to the query
- Reranks based on direct relevance, page type appropriateness, specificity
- Returns top
top_kresults with adjusted scores
- Direct relevance: Does the page answer the query?
- Page type: Workflows for “how to”, Principles for theory, etc.
- Specificity: Specific pages over general ones
Environment Variables
Docker Setup
KG LLM Navigation Search (Legacy)
Uses LLM-guided graph traversal starting from keyword matches.How It Works
- Keyword search finds initial nodes matching the problem
- LLM navigation selects relevant neighbors to explore
- Aggregation collects content from all visited nodes
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
search_top_k | int | 1 | Number of starting nodes |
navigation_steps | int | 3 | Depth of navigation |
expansion_limit | int | 3 | Max nodes per step |
search_node_type | string | specialization | Node type to start from |