Skip to content

0006 Follow-up freshness is the agent's decision

Status

Accepted

Context

The old flow ran a separate "reuse or reformulate" LLM call (decideFreshness()) before every follow-up turn to decide whether prior sources were still relevant.

Decision

The agent sees the full threaded conversation history and decides for itself whether to call rag_search again on a given turn. When it doesn't call the tool, the previous turn's sources are reused for the reference list and the citation range.

Consequences

  • One fewer LLM round-trip per follow-up turn compared to the old flow.
  • Freshness quality is now a property of the underlying agent model's judgment rather than a deterministic check the module controls.
  • Accepted gap: a first question (no prior turns) is always forced through rag_search directly (see ADR 0001), so it can never be ungrounded — but a follow-up that drifts to a new sub-topic can still have the agent wrongly decide the held sources already cover it, skip retrieval, and answer the new part ungrounded while the stale reference list still renders as if it were cited. This has a softer landing than the first-question case (there are always some sources to fall back on, just possibly the wrong ones), so it's accepted rather than fixed: forcing a full re-retrieval on every follow-up is expensive and mostly redundant, since most follow-ups genuinely don't need a new search. If this needs closing later, the intended fix is a cheap topic/entity-drift gate in front of the agent's own tool-call decision, not an unconditional forced re-search.