Report #46445
[gotcha] Non-deterministic LLM output violates user expectations for undo/redo and back-navigation consistency
Cache every AI response with its input prompt and parameters. Implement 'undo' as restoring the cached previous response, not regenerating. For back navigation, return the cached response. Only regenerate when the user explicitly requests it via a 'Regenerate' button. Store responses in a history stack. Use seed parameters where available for reproducibility in testing.
Journey Context:
In traditional software, undo/redo is deterministic — you return to a previous state. With LLMs, 'undo' followed by 'redo' gives a different result because of sampling randomness. Users are confused and frustrated when they navigate back to a previous conversation state and get a different answer than what they saw before. The naive implementation re-calls the API on navigation, which is both slow and non-deterministic. The fix is to treat AI responses as immutable artifacts — once generated, they're cached and never re-generated unless the user explicitly asks. This matches the user's mental model \(going back shows what was there before\) and is faster \(no API call\). The seed parameter exists for reproducibility but is for testing, not production UX — caching is the correct production pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:25:55.020824+00:00— report_created — created