Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new workflow YAML defining a multi-step “MathHelper” assistant graph intended to (1) analyze a college-level math question, (2) propose a solution approach, (3) verify it, (4) format the final answer, and (5) optionally generate a similar practice question.
Changes:
- Introduces a new
demo_MathHelpergraph with five agent nodes (Read/Solve/Check/Print/Rethink) plus a Human View loop. - Wires edges to pass intermediate artifacts downstream (including non-triggering fan-in edges into Check/Rethink).
- Adds a keyword-based loop to request additional similar questions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yaml_instance/demo_MathHelper.yaml
Outdated
| name: | ||
| provider: |
There was a problem hiding this comment.
Agent node config has empty name and provider. AgentConfig.from_dict requires a non-empty model name and a provider, so this workflow will fail validation/loading. Set both fields to valid values (or use existing env-var pattern like name: ${MODEL_NAME}) for this node.
| provider: | ||
| role: | | ||
| 你是一个数学高手,擅长解决大学数学问题。 | ||
| 你的任务是:检查给出的解法是否能真正解决该问题,如果解法正确,不用做任何操作,如果解法有错误,直接给出修改后的解法。 |
There was a problem hiding this comment.
The Check agent prompt says “if correct, do nothing”, but the only input to Print is Check’s output (via the Check→Print edge). If Check returns an empty/near-empty message, Print won’t have solution content to format. Adjust the Check prompt to always output the final verified solution steps (either unchanged or corrected), or change the edges so Print can also consume the Solve output when Check makes no changes.
| 你的任务是:检查给出的解法是否能真正解决该问题,如果解法正确,不用做任何操作,如果解法有错误,直接给出修改后的解法。 | |
| 你的任务是:检查给出的解法是否能真正解决该问题。请始终输出【最终确认后的完整解题步骤】:如果解法正确,请在充分理解的基础上用你自己的话完整、清晰地复述或略微润色该解题步骤;如果解法有错误或不完整,请直接给出修改后的、正确且完整的解题步骤。 |
| - from: Print | ||
| to: Rethink | ||
| trigger: true | ||
| condition: | ||
| type: function | ||
| config: | ||
| name: 'true' | ||
| carry_data: true |
There was a problem hiding this comment.
Print always triggers Rethink, which means the workflow will generate a “similar question” even when the user didn’t ask for one. This conflicts with the Human View instructions that say the user should type “one more” to see another problem. Consider routing Print → Human View first, and only trigger Rethink when the keyword condition matches.
| description: |- | ||
| 如果你想再看一道相似题目,请输入one more。 | ||
| 如果不想,请输入stop。 | ||
| description: '' |
There was a problem hiding this comment.
Human View tells users to input “stop”, but the only outgoing conditional edge from this node matches “one more”. If the user types “stop”, no edge will fire and the workflow may stall. Add an explicit “stop” (or default) edge from Human View to a terminal node and/or set graph.end appropriately.
yaml_instance/demo_MathHelper.yaml
Outdated
| name: | ||
| provider: |
There was a problem hiding this comment.
Agent node config has empty name and provider. AgentConfig.from_dict requires a non-empty model name and a provider, so this workflow will fail validation/loading. Set both fields to valid values (or use existing env-var pattern like name: ${MODEL_NAME}) for this node.
yaml_instance/demo_MathHelper.yaml
Outdated
| name: | ||
| provider: |
There was a problem hiding this comment.
Agent node config has empty name and provider. AgentConfig.from_dict requires a non-empty model name and a provider, so this workflow will fail validation/loading. Set both fields to valid values (or use existing env-var pattern like name: ${MODEL_NAME}) for this node.
yaml_instance/demo_MathHelper.yaml
Outdated
| name: | ||
| provider: |
There was a problem hiding this comment.
Agent node config has empty name and provider. AgentConfig.from_dict requires a non-empty model name and a provider, so this workflow will fail validation/loading. Set both fields to valid values (or use existing env-var pattern like name: ${MODEL_NAME}) for this node.
yaml_instance/demo_MathHelper.yaml
Outdated
| name: | ||
| provider: |
There was a problem hiding this comment.
Agent node config has empty name and provider. AgentConfig.from_dict requires a non-empty model name and a provider, so this workflow will fail validation/loading. Set both fields to valid values (or use existing env-var pattern like name: ${MODEL_NAME}) for this node.
|
Thanks for your contribution! |
Add a math assistant workflow. Able to answer college-level math questions and provide similar questions.