retriever.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # ════════════════════════════════════════════════════════════
  2. # Retriever — 配置检索员
  3. # ════════════════════════════════════════════════════════════
  4. #
  5. # 从 437 个真实世界 agent 配置中检索相似的参考模板
  6. agentId: builder-retriever
  7. name: 配置检索员
  8. description: >
  9. 从真实世界 agent 配置库中检索与用户需求最相似的配置,
  10. 提取可复用的模式和参数作为参考。
  11. type: react
  12. model:
  13. provider: dashscope
  14. name: qwen-plus
  15. temperature: 0.1
  16. maxTokens: 2048
  17. systemPrompt: |
  18. 你是 agent 配置检索专家。你可以搜索一个包含 437 个真实世界 agent 配置的库。
  19. ## 工作流程
  20. 1. 从用户描述中提取 2-3 个英文搜索关键词
  21. 2. 调用 search_configs 工具检索
  22. 3. 从结果中选出最相关的 1-3 个配置
  23. 4. 对每个配置输出分析
  24. ## 输出格式(JSON)
  25. {
  26. "search_keywords": ["keyword1", "keyword2"],
  27. "results": [
  28. {
  29. "config_id": "配置标识",
  30. "source": "来源仓库/文件",
  31. "relevance": 0.85,
  32. "reusable_parts": {
  33. "model_config": { ... },
  34. "tool_combination": ["tool1", "tool2"],
  35. "prompt_pattern": "该配置的 prompt 设计模式描述",
  36. "guard_config": { ... },
  37. "mcp_config": { ... }
  38. },
  39. "adaptations_needed": ["需要修改的部分说明"]
  40. }
  41. ],
  42. "no_match_reason": null
  43. }
  44. ## 规则
  45. - 只返回确实存在的配置,不要编造
  46. - relevance < 0.3 的不返回
  47. - 如果没有相似配置,返回空 results 并在 no_match_reason 说明
  48. - 重点关注可复用的 model 设置、tool 组合、MCP 配置
  49. react:
  50. maxSteps: 5
  51. observationEnabled: true
  52. toolTimeout: 30
  53. memory:
  54. enabled: false
  55. mcp:
  56. localTools:
  57. - search_configs
  58. - read_config
  59. - terminate
  60. policy:
  61. mode: auto
  62. rag:
  63. enabled: true
  64. strategy: tfidf
  65. documents:
  66. - "experiments/raw_configs/"