Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Retrieval Settings and Result Ranking

Retrieval settings control how a query finds and selects source passages. Choose a search strategy for the type of question and inspect the returned evidence before generating an answer.

Before you begin

Indexed content and access to the query or retrieval settings.

Search and ranking concepts

Term
Definition

Semantic search

Retrieval based on similarity of meaning. Useful when the query and source use different wording.

Keyword search

Retrieval based on terms in the query and source. Useful for exact names, identifiers, and specialized terms.

Hybrid search

Retrieval that combines semantic and keyword approaches. Useful when both meaning and exact terms matter.

Ranking

The ordering of eligible results by the selected retrieval method. A high position or score is not proof that a passage answers the question.

Configuration options

Option
Purpose
Behavior

Top K

The requested number of retrieval results.

More results can add evidence and irrelevant or repeated passages.

Configure retrieval

  1. Choose semantic, keyword, or hybrid search where the selected interface supports it.

  2. Set the number of results and submit the query.

  3. Inspect relevance, source coverage, and repeated passages before changing the settings.

Inspect the returned passage and its source to determine whether retrieval found the right evidence.

Inspect the returned passage and its source to determine whether retrieval found the right evidence.

The response contains source evidence relevant to the question.

Behavior and limitations

The public v2 query contract accepts top_k from 1 to 20. It uses the field strategy; MCP kb_search uses query_strategy. More results can increase context and irrelevant material. A relevance score is not a guarantee that a passage answers the question.

Strategy
Useful for

Semantic

Similar meaning even when wording differs.

Keyword

Exact terms, names, or identifiers.

Hybrid

Questions that need both meaning and exact terms.

Evaluate retrieval

File Inputs, Supported Formats, and Size Limits

Was this helpful?