Skip to content

Commit 278f30a

Browse files
committed
docs:更新说明以强调完成多个项目所需的条件
1 parent 7b48189 commit 278f30a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • agents/matmaster_agent/flow_agents/all_finished_agent

agents/matmaster_agent/flow_agents/all_finished_agent/prompt.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def create_all_finished_instruction(user_request, history_steps, session_files):
1717
IMPORTANT: The user's goal may be "content in chat" (e.g., a researched tutorial/summary),
1818
not necessarily a file deliverable. Only require session_files evidence when the user
1919
explicitly asked for a file or a file is clearly the expected final deliverable.
20-
20+
IMPORTANT: If the user_request asks for multiple distinct items/entities/examples (e.g., "caffeine and adenosine",
21+
"A and B", "compare X vs Y", "generate N variants"), the goal is finished ONLY when *all* requested items are completed.
22+
Do NOT mark finished=true when only one of the requested items has been produced.
2123
# Input
2224
history_steps is a list. Each element is a past tool invocation record, typically including
2325
(but not limited to):
@@ -28,14 +30,12 @@ def create_all_finished_instruction(user_request, history_steps, session_files):
2830
session_files is a list of file links (OSS URLs). Only files that were actually generated
2931
and persisted for this session will appear here. Use session_files as verifiable evidence
3032
that a file deliverable truly exists (only when a file deliverable is required).
31-
3233
Below in the raw user_request:
3334
{user_request}
3435
Below is the raw history_steps data (JSON):
3536
{history_text}
3637
Below is the raw session_files data (JSON):
3738
{session_files_text}
38-
3939
# Decision Rules (must follow)
4040
1) Use "whether the user's final goal is achieved" as the ONLY criterion, not whether all steps were executed.
4141
2) Consider the expected deliverable type based on user_request:
@@ -51,14 +51,12 @@ def create_all_finished_instruction(user_request, history_steps, session_files):
5151
and explain the contradiction in reason.
5252
6) Do NOT assume results that are not explicitly supported by history_steps or session_files. Judge only from verifiable evidence.
5353
7) Termination/Unachievable rule: If the goal is clearly unachievable given the current context (e.g., repeated critical failures with no viable next action, missing required inputs that cannot be obtained from history_steps/session_files, or hard constraints prevent completion), you MUST return finished=true to terminate, and set reason to explicitly state that the task is not completed but cannot be completed (include the key blocking evidence).
54-
5554
# Output Format (very important)
5655
You must output ONLY ONE JSON object that strictly matches this schema:
5756
{{
5857
"finished": true|false,
5958
"reason": "A brief, specific explanation in English that cites key evidence from history_steps and/or session_files (e.g., a tool_name status/output; or the presence/absence of an OSS link when a file is required). If not finished, state the critical blocking reason(s) or missing info. If finished=true due to the Termination/Unachievable rule, explicitly say it is NOT completed but is impossible/unachievable to complete given the evidence."
6059
}}
61-
6260
# Output Constraints
6361
- Output ONLY valid JSON (no Markdown, no code fences, no extra commentary).
6462
- reason must be an English string and should reference concrete evidence from history_steps and/or session_files.

0 commit comments

Comments
 (0)