deerflow2/src/rag
Willem Jiang baf66cd3c7 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
..
__init__.py feat: Qdrant Vector Search Support (#684) 2025-11-11 19:35:00 +08:00
builder.py feat: Qdrant Vector Search Support (#684) 2025-11-11 19:35:00 +08:00
dify.py feat: support dify in rag module (#550) 2025-09-16 20:30:45 +08:00
milvus.py feat: Qdrant Vector Search Support (#684) 2025-11-11 19:35:00 +08:00
moi.py feat: add strategic_investment report style (#595) 2025-09-24 09:50:36 +08:00
qdrant.py fix: ensure researcher agent uses web search tool instead of generating URLs (#702) (#704) 2025-11-24 20:07:28 +08:00
ragflow.py feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
retriever.py feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
vikingdb_knowledge_base.py feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00