#4985·OpenViking

[Feature]: make the retrieval score threshold (min_score, default 0.35) configurable via ov.conf

Author: somewhere1994Created Sep 13, 2026Updated Sep 17, 2026
Labelsagent-plugins

Summary

The retrieval score threshold (min_score, default 0.35) is hard-coded as a function-signature default in the server (server/mcp_endpoint.py, min_score: float = 0.35; the recall preset layer only applies a threshold when one is explicitly provided). There is no ov.conf key to change it, and none of the client integrations pass it per-call — so on a default deployment the recall/precision tradeoff cannot be tuned at all.

Environment

OpenViking server 0.4.19 (dev mode, single machine, six client agents).

Current state

  • ov.conf has no threshold key (the memory section carries only custom_templates_dir; the only retrieval-related key is retrieval.recall_intent_timeout_s, which is a different concern).
  • Client integrations (auto-recall hooks/plugins) do not pass min_score per call, so the hard-coded default governs every automatic recall.
  • Per-call override exists at the API level (find/search accept min_score), but that only helps ad-hoc queries, not the automatic recall path.

Motivation (production data)

On a production deployment with six agents, the retrieval observer reports a 73.9% zero-result rate over ~3.7k queries at the default threshold. We cannot tell how much of that is corpus gap vs. threshold strictness, because the threshold cannot be lowered experimentally without patching server code. A config key would make this tunable per deployment and enable data-driven tuning (in our case: try 0.30 and observe).

Suggested fix

Add a server config key (e.g. retrieval.recall_min_score, default preserved at 0.35) consumed by the MCP/search endpoints and the recall preset when no explicit per-call value is provided.

Related: #4480 (configurable search result limits — same theme, different knob) and #2880 (rerank batch limits).