RetrievalQualityCheckerOptions
Properties
Section titled “Properties”highThreshold?
Section titled “highThreshold?”optional highThreshold?: number;Minimum top-result score to consider quality “high”. Default: 0.5.
These defaults are calibrated for post-reranker scores (e.g., Cohere Rerank v3.5 which returns absolute [0,1] relevance). Without a reranker, FusionRetriever’s min-max normalization produces scores near 1.0 for the top result, making these thresholds effectively inert. If you are not using a reranker, either tune these thresholds to your score distribution or skip quality checking.
mediumThreshold?
Section titled “mediumThreshold?”optional mediumThreshold?: number;Minimum top-result score to consider quality “medium”. Default: 0.3.
reformulate?
Section titled “reformulate?”optional reformulate?: QueryReformulator;Optional query reformulator. When provided and quality is “low”, the checker rewrites the query and returns the reformulated version.
For voice agents: this should be wired to the PredictivePreFetcher to reformulate in the background, not in the hot path.