Repository navigation
Add criteria and process graph images to the developer documentation - #317
Merged
Merged
Conversation
scripts/generate_criteria_graphs.py builds the criteria graph for one example of each graph shape, the same way evaluation_function does but without generating feedback, and draws it twice: with graphviz straight from the graph's nodes, and from CriteriaGraph.to_mermaid with mermaid-cli. dev.md gets a "Criteria graphs" section that explains the node kinds and shows each graph, with the mermaid version collapsed under it. Also removes a stray "=======" line at the top of dev.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each example is run through evaluation_function while recording the stages it logs and the app and lambdafeedback functions it calls, and drawn with graphviz: the stages with the criteria graph path taken, and the function calls in each stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
app/docs/criteria_graphs/): one example of each shape of criteria graph the contexts build (symbolic equality of expressions, equations and sets;where;written as; other; physical quantitymatchesand order). Each graph is built the wayevaluation_functionbuilds it and drawn twice: with graphviz straight from the graph's evaluation, criterion and output nodes, and with mermaid fromCriteriaGraph.to_mermaid.app/docs/process_graphs/): example inputs run throughevaluation_function(symbolic, physical quantity, and a response that fails to parse). The stages come from thestage_startevents_evaluatelogs, and the function calls are recorded withsys.setprofile. Each example has two graphviz images:appandlambdafeedbackfunctions called in each stage, up to two calls below_evaluatescripts/generate_criteria_graphs.pyandscripts/generate_process_graphs.py. No app code changes.app/docs/dev.md: new "Criteria graphs" and "Process graphs" sections, with how to regenerate the images. The stray=======line at the top is removed.Known issue visible in the images
The physical quantity criteria graph details show
QUANTITY: response tags: {}. This comes from f-strings ofExprNodes inapp/context/physical_quantity/graphs/match.pyand is not changed here.Test plan
parse_reserved_expressionsflake8 --max-line-length=127 scripts/🤖 Generated with Claude Code