All Questions
Agents And Tool Use hard

An invoice pipeline processes 10,000 invoices a day, always with the same four steps: extract fields, validate totals, look up the vendor, post to the ledger. It runs as a ReAct loop in which the model chooses each next step. Cost and latency vary widely, and about 1 in 500 runs skips validation. What should you change?

  1. A Keep the ReAct loop but add few-shot examples showing the four steps in order, so the model follows the sequence reliably.
  2. B Encode the fixed sequence as workflow code, calling the model only for judgment steps like extraction, and keep ReAct for open tasks.
  3. C Switch to plan-and-execute, where the model drafts the four-step plan up front for each invoice and then executes that plan step by step.
  4. D Split into four step agents coordinated by an orchestrator agent that decides which specialist should handle each invoice next.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions