Search settings¶
Retrieving relevant documents from a Knowledge Bank for RAG can be customized through three main settings: Filtering, Search type and Search mode. They can be configured in Augmented LLMs and Knowledge Bank Search Tools.
Filtering¶
The Filtering settings define which subset of the Knowledge Bank is available for retrieval. They can be used to narrow down the scope of the search to a specific segment of the stored knowledge.
Static filtering: Restricts the search to a fixed subset of the Knowledge Bank. The filter condition is defined once and remains the same for all queries.
Dynamic filtering: Allows the filter condition to vary for each query.
Search type¶
The Search type defines how DSS selects documents from the Knowledge Bank. It includes several retrieval strategies such as similarity-based search, threshold filtering, hybrid search, and diversity enhancement.
When diversity is enabled, DSS uses the MMR (Maximal Marginal Relevance) algorithm to balance relevance and variety among retrieved documents.
Hybrid search combines similarity and keyword retrieval to improve coverage.
Note
Supported only by Azure AI Search and Elasticsearch, and not compatible with the diversity option.
Search mode¶
The Search mode defines when and how DSS queries the Knowledge Bank. It is mainly useful in chat-based contexts, where the system decides dynamically whether to retrieve new information for each user message.
Raw mode: Always queries the Knowledge Bank with the full query history in chat mode.
Smart mode: First evaluates whether retrieval would add value and can automatically reformulate the query to optimize results.
Reranking¶
Reranking reorders or prioritizes documents retrieved by the search step before being sent to the model.
This feature is available only when using Azure AI Search or Elasticsearch vector stores and requires a compatible subscription with these providers.
Vector Store |
Advanced Reranking |
|---|---|
Azure AI search |
Uses Azure AI proprietary Semantic Ranker. |
Elasticsearch |
Uses advanced reranking leveraging RRF (Reciprocal Ranking Fusion). This accepts two parameters: Rank constant and Rank window size |