Dashboard
DocsUser GuideRAG Settings

RAG Settings

Fine-tune how Opentrace retrieves and processes information from your documents. These settings are configured per-project in the Knowledge Base > Settings tab.

Complete Settings Reference

SettingTypeDefaultDescription
rag_strategyEnumbasicRetrieval strategy: basic, hybrid, multi_query_vector, or multi_query_hybrid. See RAG Strategies.
agent_typeEnumsimpleAgent type: simple (RAG only) or agentic (supervisor with web search). See Agent Types.
embedding_modelStringtext-embedding-3-largeOpenAI embedding model used for vectorization. Determines the embedding dimensions.
num_chunksInteger5Number of chunks to retrieve per search query.
final_context_sizeInteger5Number of top chunks to include in the final LLM context after ranking.
similarity_thresholdFloat0.3Minimum cosine similarity score for a chunk to be considered relevant. Range: 0.0 – 1.0.
use_rerankingBooleanfalseWhether to rerank retrieved chunks using a cross-encoder model before final selection.
multi_query_countInteger3Number of query variations to generate (only for multi-query strategies).
vector_weightFloat0.7Weight of vector similarity in hybrid search RRF fusion. Range: 0.0 – 1.0.
keyword_weightFloat0.3Weight of keyword (full-text) search in hybrid search RRF fusion. Range: 0.0 – 1.0.
Tip

Start simple, then optimise: Begin with defaults (Basic strategy, 5 chunks). Only increase complexity if you're not getting the answers you expect. Multi-query hybrid with reranking gives the best results but is the slowest and most expensive.

Tuning Tips

Increase num_chunks if…

  • The AI misses relevant information that you know is in your documents
  • Your documents cover broad topics and the answer might be spread across many sections

Lower similarity_threshold if…

  • Too few chunks are being returned and the AI says it can't find information
  • Your queries use different vocabulary than the documents

Enable reranking if…

  • The initial retrieval returns relevant chunks but they're not in the best order
  • You want higher precision at the cost of slightly more processing time

Switch to Hybrid if…

  • You have technical documents with specific terminology or acronyms
  • You want to match exact keywords as well as semantic meaning
Was this page helpful?