← All questions
AgentsVery Hard· Tool Call Architecture· Citation Assurance· Agent Policy

A staff peer wants to delete the retrieval pipeline and...

This dispute centers on return types and execution flow rather than mutually exclusive requirements. Both viewpoints can be satisfied by exposing retrieval as an agent tool, provided that the tool is strictly typed to return passages along with their unique source IDs, allowing the generator to preserve downstream citation requirements.

However, migrating from a rigid, deterministic retrieval pipeline to an agent tool-calling loop trades guaranteed execution for flexibility. Exposing retrieval as a tool converts a fixed pipeline step into a learned ‘when-to-retrieve’ policy controlled by the LLM. This introduces failure modes where the model decides to decline retrieving relevant context or hallucinates answers without triggering the search tool. To safely ship this transition, system performance must be validated by measuring explicit citation coverage before and after the migration rather than assuming citation guarantees hold.

Code playground (Python)