deerflow2/src
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
..
agents security: add log injection attack prevention with input sanitization (#667) 2025-10-27 20:57:23 +08:00
config fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
crawler security: add log injection attack prevention with input sanitization (#667) 2025-10-27 20:57:23 +08:00
graph fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
llms feat: add context compress (#590) 2025-09-27 21:42:22 +08:00
podcast refactor: refactor the prompt management mechanism (#17) 2025-05-09 15:50:46 +08:00
ppt/graph feat: enable ppt_composer.zh_CN.md with request.locale (#694) 2025-11-22 16:56:18 +08:00
prompt_enhancer feat: Add comprehensive Chinese localization support for issue #412 (#649) 2025-10-24 16:31:19 +08:00
prompts fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
prose/graph feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
rag fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
server feat: enable ppt_composer.zh_CN.md with request.locale (#694) 2025-11-22 16:56:18 +08:00
tools Fix: clarification bugs - max rounds, locale passing, and over-clarification (#647) 2025-10-24 16:43:39 +08:00
utils security: add log injection attack prevention with input sanitization (#667) 2025-10-27 20:57:23 +08:00
__init__.py docs: refine readme 2025-04-17 11:54:24 +08:00
workflow.py fix: Refine clarification workflow state handling (#641) 2025-10-22 22:49:07 +08:00