Repository navigation
Guard AI sizing estimates against run-to-run jumps; Monte Carlo varies AI ranges - #65
Merged
Merged
Conversation
…s AI ranges - New equipment estimate guard: each item's first AI-derived size is anchored with a digest of its M&E. A later AI size more than 25% away for the same M&E is held for review and the anchored estimate is priced; a changed M&E, a changed size unit or any user input re-anchors instead. Drift is measured and recorded with the last proposals. - AI sizing assumptions now carry the engineering low/high for the service (units converted, order checked); Monte Carlo already varies saved ranges. Disagreement between two AI estimates widens that range. - Equipment page: "AI estimate check" shows both sizes and the drift; the user keeps the anchored estimate or uses the new one. - Monte Carlo discovery tolerates a price basis saved with a null currency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the same M&E, the reactor came out at 15.6 m³, 125 m³ and 156 m³ on different runs. The AI re-estimated its sizing inputs on later runs (a pricing repair, a model change, a cleared row) and nothing compared the new size with the earlier one. Monte Carlo also never varied AI guesses, because they were saved without a range.
Guardrail (
backend/blocks/equipment/estimate_guard.py)Each item's first AI-derived size is anchored together with a digest of its M&E data (the item and its connected streams). Every later AI size is measured against that anchor:
Monte Carlo varies AI predictions
low/high: the engineering range for that service, not a fixed percentage. Units are converted, and the range is dropped if the value falls outside it.…-27-assumption-ranges, so older cached answers aren't reused.Live check (real AI, the user's workbook, a copy of the database)
Tests
test_estimate_guard.py(8 tests) covers:tscOK, node tests 64/64 (held list, keep and use),next buildOK.Not covered
🤖 Generated with Claude Code