LLMs, GenAI, RAG, agents, evaluation · insight-1561
Split a high-impact tool into preview and commit, with the commit bound to the previewed state
- Evidence type
- practitioner heuristic
- Difficulty
- medium
- Roles
- ML engineer, Applied AI
- Industries
- aviation, banking
Summary: situation, action, reason, boundary
Situation
An agent can change many records at once, such as a bulk fare correction or mass rebooking.
Action
Offer a preview call that computes the exact changes without applying them and returns a diff and a token, and make the commit call accept only that token, rejecting it if the underlying data changed since.
Reason
The reviewer and the executor then see the same computed change set, and a stale preview cannot be applied to altered data.
Boundary
Bulk or financially significant actions where a human or a policy check reviews the change.
Symptom or risk
The model's description of the change differs from what executes, and a reviewer approves a summary rather than the real effect.
Exceptions
Small, reversible single-record edits do not justify two calls.
Trade-offs
More tools and latency; previews need storage until committed.
Pitfalls
Letting the model re-supply parameters at commit time, which can differ from the preview.