Principle:Infiniflow Ragflow Retrieval Configuration
| Knowledge Sources | |
|---|---|
| Domains | RAG, Information_Retrieval |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
A configuration pattern that tunes hybrid retrieval parameters including similarity thresholds, vector/keyword weighting, and reranking.
Description
Retrieval Configuration controls how the RAG system searches for relevant chunks at chat time. Key parameters include similarity_threshold (minimum score to include), vector_similarity_weight (balance between vector and keyword search), top_n (chunks returned to LLM context), top_k (initial pool size), and optional rerank_id (cross-encoder reranking model).
Usage
Configure when tuning chat application retrieval quality. Lower thresholds increase recall but may include less relevant chunks; higher vector weights favor semantic matching over exact keyword matching.
Theoretical Basis
Retrieval quality is the primary determinant of RAG answer quality. The key trade-offs are:
- Precision vs Recall: Similarity threshold controls the cutoff
- Semantic vs Lexical: Vector weight balances dense and sparse retrieval
- Reranking: Cross-encoder reranking improves precision at the cost of latency