Skip to content

fix(chapter7): align reflection test task with code-generation prompts#367

Open
qicaiy wants to merge 1 commit intodatawhalechina:mainfrom
qicaiy:patch-1
Open

fix(chapter7): align reflection test task with code-generation prompts#367
qicaiy wants to merge 1 commit intodatawhalechina:mainfrom
qicaiy:patch-1

Conversation

@qicaiy
Copy link

@qicaiy qicaiy commented Feb 28, 2026

Summary

  • update code/chapter7/test_reflection_agent.py example to use code_agent for the final test run
  • replace article-writing prompt with a code-generation task so it matches the custom code prompts

Why

Issue #362 points out that the example defines code-oriented prompts but runs a writing task with general_agent, which is confusing for learners.

Fixes #362

@Nikolas-Cao
Copy link

suggest to call general_agent.run("写一篇关于人工智能发展历程的简短文章") as well .

  • general_agent : for testing default prompt of MyReflectionAgent
  • code_agent : for testing customized prompt of MyReflectionAgent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[问题/Issue] 章节7.4:测试代码 test_reflection_agent.py 中自定义提示词和问题不匹配

2 participants