Retrieval Configuration

Fine-tune how your agent retrieves and uses knowledge

Retrieval Configuration#

Control how your agent searches and uses its knowledge base when answering questions.


What is Retrieval?#

When a user asks a question:

  1. Search: The agent searches the knowledge base
  2. Retrieve: Relevant content is retrieved
  3. Rank: Content is ranked by relevance
  4. Generate: Agent uses top content to answer

Retrieval Configuration lets you tune each step.


Accessing Settings#

  1. Go to your agent dashboard
  2. Navigate to SettingsRetrieval Config
  3. Adjust settings as needed
  4. Save changes

Configuration Options#

Chunk Limits#

Control how much content is retrieved:

SettingDescriptionDefault
Docs Max ChunksKnowledge base content5
Examples Max ChunksExample responses3
Style Max ChunksLearned style content2
Conversation Max ChunksPast conversation context3

Priority Weights#

Control which content types are prioritized. Each content type (docs, examples, style, conversation) has an adjustable priority weight. Higher priority means content is more likely to be retrieved.

Similarity Threshold#

Minimum relevance score for retrieved content:

  • Higher: Only very relevant content (fewer results, more precise)
  • Lower: Include somewhat related content (more results, broader coverage)

Advanced Options#

Combine semantic and keyword search:

  • Vector Weight: How much weight to give semantic understanding
  • BM25 Weight: How much weight to give exact keyword matching

Reranking#

Re-score results after initial search:

  • Enable Reranking: Use secondary scoring
  • Top K: How many to rerank

Multi-Query#

Generate multiple search queries for better coverage:

  • Enable Multi-Query: Search with variations
  • Query Count: Number of variations (2-5)

Presets#

Quick configurations for common scenarios:

PresetDescription
BalancedDefault settings for most use cases
PreciseHigher threshold, fewer but more accurate results
BroadLower threshold, more comprehensive coverage
FAQ-focusedPrioritize Q&A examples

When to Adjust#

Increase chunks if:

  • Agent misses relevant information
  • Questions span multiple topics
  • Knowledge base is large

Decrease chunks if:

  • Responses include irrelevant info
  • Agent mixes up topics
  • Responses are too long

Raise threshold if:

  • Agent uses unrelated content
  • Answers wander off-topic

Lower threshold if:

  • Agent says "I don't know" too often
  • Related content isn't being found

Best Practices#

  1. Start with defaults: Adjust only if needed
  2. Test changes: Verify with sample questions
  3. Document changes: Track what you modified
  4. Reset if unsure: Use presets to restore defaults
Retrieval Configuration | AlonChat Docs