Skip to main content
Feedback

Configuring retrieval settings

note

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

SettingDescription
Retrieval modeThe algorithm used to match query text to indexed chunks. Options: Semantic, Lexical, or Hybrid.
Top-KThe 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

  1. Open Knowledge Hub, select the repository, then select the Knowledge Base.
  2. Select the Retrieval tab.
  3. Under Retrieval Mode, select Semantic, Lexical, or Hybrid.
  4. Under Top-K, enter the number of chunks to return per query (default: 5, maximum: 50).
  5. 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.

note
  • 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.

On this Page