Files
PlantAI-rag-new/agent/qa/configs/capabilities.yaml
T
jerryandClaude Fable 5 dd54aa0e5d feat(web-search): S3 联网搜索(机制实例 1)+ 金标判定器防抖
- web_search.py: WebSearchCompleter(PubMed esearch+esummary 8s/重试1, Crossref 兜底 6s)
  + build_query 中文→英文查询构建(物种映射表+基因家族正则, 修 \b CJK 边界缺陷)
- pipeline.py: 证据采纳后 _maybe_web_search 确定性门控(请求开关 AND env 总闸 AND
  去重公开引用数 < min_evidence; 修 selected 恒 30 无信号缺陷)
- answer_composer.py: web_results 段 + SYSTEM Web 引用规则
- config.py: enable_web_search/max_results(4)/timeout(8)/max_chars(1200)
- sse_relay.py: STAGE 映射 +web_search_started/completed(11→13)
- capabilities.yaml: web_search manifest(http provider)
- env: QA_V1_ENABLE_WEB_SEARCH=0 等 4 键(example+真实)
- run_golden.py: LLM 方差防抖(FAIL 复跑一次,两次都 FAIL 才算回归;
  GI-005 实测三次采样 key_hit 0.6/0.8/0.4 横跨阈值)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-02 15:44:31 +08:00

19 lines
889 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# capabilities.yaml —— Capability Gateway 唯一注册入口(明文、热加载面)
# 详见 capabilities/manifests.py 头注释。坏条目跳过记 load_warnings,不影响主体。
#
# web_search:机制实例 1(HttpToolProvider 形态)。实际执行走 pipeline 确定性门控
# (证据不足 AND 请求开关 AND env 总闸),不经 LLM 自由工具调用;本条目同时
# 供 GET /api/capabilities 可见性与 LLM 工具表注册(registry)。
capabilities:
- name: web_search
provider: http
permission: read_only
description: 检索 PubMed/Crossref 获取最新文献(证据不足时补充联网结果)
session_default: false
schema:
query: {type: string, required: true, description: 检索关键词}
http:
endpoint: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi
method: GET
timeout: 8