A user proposes an architecture for a multi-agent system where LLM agents validate outputs against a structured API to prevent hallucinations. They seek feedback on the grounding layer and its efficiency.
Working on a multi-agent system where two LLM agents with opposing objectives debate outputs before presenting them to the user. The twist is a grounding layer that validates every generated recommendation against a structured API (Google Places) before it reaches the user. The pipeline: 1. User provides input parameters 2. Agent A generates recommendations optimised for one objective 3. Agent B challenges each recommendation and proposes alternatives 4. Both sets of recommendations pass through a validation layer - Google Places API checks whether each location exists, is currently open, and returns real ratings/distances/hours 5. Anything unverified gets flagged or dropped 6. Final output includes a "hallucination scorecard" - X/Y recommendations verified The domain I'm applying this to is travel planning (where current AI tools have roughly a 10% success rate on complex benchmarks), but the architecture should generalise to any domain where LLM outputs can be validated against structured data. A few technical questions: * For the adversarial debate - is it better to do multiple rounds of back-and-forth or a single challenge-response pass? Worried about latency vs quality trade-off. * For the grounding layer - doing a Places API call per recommendation gets expensive fast. Anyone tried batching or caching strategies for this? * Fine-tuning a smaller model on domain-specific preference data vs prompting a larger model - which approach tends to win for structured output tasks like this? Would appreciate any feedback on the architecture or pointers to similar approaches.