Configuring retrieval settings
Knowledge Hub is an Early Access release. Refer to the Early Access disclaimer for details.
Retrieval settings control how Knowledge Hub matches an AI agent's query to content in the Knowledge Base. You configure these settings at the Knowledge Base level. Individual AI agents can override them per request.
Retrieval settings overview
| Setting | Description |
|---|---|
| Retrieval mode | The algorithm used to match query text to indexed chunks. Options: Semantic, Lexical, or Hybrid. |
| Top-K | The maximum number of chunks returned in a single retrieval response. |
Retrieval modes
Knowledge Hub supports three retrieval modes: Semantic, Lexical, and Hybrid. Refer to Retrieval modes for a full explanation of each mode, when to use it, and its limitations.
Procedure
- Open Knowledge Hub, select the repository, then select the Knowledge Base.
- Select the Retrieval tab.
- Under Retrieval Mode, select Semantic, Lexical, or Hybrid.
- Under Top-K, enter the number of chunks to return per query (default: 5, maximum: 50).
- Select Save and Publish.
The tab also shows Effective runtime behavior: the retrieval mode and Top-K value agents are currently using for this Knowledge Base.
- Changes take effect immediately for all agent queries. No reingestion is required.
- AI agents calling the Knowledge Hub retrieval API can override both the retrieval mode and Top-K value per request. The settings you configure here serve as defaults when no override is provided.
Choosing a Top-K value
Higher Top-K values return more context to the AI agent but increase latency and token usage. Start with the default value of five and increase it only if agents consistently return incomplete answers on multi-faceted questions.