deerflow2/src/prompts
Willem Jiang 478291df07
fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704)
* fix: ensure researcher agent uses web search tool instead of generating URLs (#702)

- Add enforce_researcher_search configuration option (default: True) to control web search requirement
- Strengthen researcher prompts in both English and Chinese with explicit instructions to use web_search tool
- Implement validate_web_search_usage function to detect if web search tool was used during research
- Add validation logic that warns when researcher doesn't use web search tool
- Enhance logging for web search tools with special markers for easy tracking
- Skip validation during unit tests to avoid test failures
- Update _execute_agent_step to accept config parameter for proper configuration access

This addresses issue #702 where the researcher agent was generating URLs on its own instead of using the web search tool.

* fix: addressed the code review comment

* fix the unit test error and update the code
2025-11-24 20:07:28 +08:00
..
podcast feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
ppt feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
prompt_enhancer feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
prose feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
__init__.py chore: add license headers 2025-04-17 11:34:42 +08:00
coder.md feat: support multi-language 2025-04-21 19:50:34 +08:00
coder.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
coordinator.md Fix: clarification bugs - max rounds, locale passing, and over-clarification (#647) 2025-10-24 16:43:39 +08:00
coordinator.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
planner.md fix: repair missing step_type fields in Plan validation (#653) 2025-10-24 21:26:48 +08:00
planner.zh_CN.md fix: repair missing step_type fields in Plan validation (#653) 2025-10-24 21:26:48 +08:00
planner_model.py fix: support local models by making thought field optional in Plan model (#601) 2025-09-28 08:48:39 +08:00
reporter.md feat: add strategic_investment report style (#595) 2025-09-24 09:50:36 +08:00
reporter.zh_CN.md feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
researcher.md fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
researcher.zh_CN.md fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
template.py feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00