doatlas-2 / lib /tool-graph /intent-rules.json
Iostream-Li's picture
Add files using upload-large-folder tool
2a55985 verified
{
"_comment": "Single source of truth for tool-graph intent classification. Imported by both artifacts/api-server/src/lib/tool-graph.ts (Node) and artifacts/research-engine/backend/tools/graph_client.py (Python). Patterns are ECMAScript-compatible regex strings; both sides apply them case-insensitively. CJK alternations intentionally omit \\b (word boundaries are ASCII-only in both engines). When you change a rule, the parity tests in artifacts/api-server/src/lib/__tests__/tool-graph.test.ts and artifacts/research-engine/tests/test_graph_client.py will catch any drift via the shared fixture artifacts/api-server/src/lib/__tests__/fixtures/intent-cases.json.",
"rules": [
{
"tag": "literature_search",
"patterns": [
"\\b(pubmed|paper|papers|literature|study|studies|publication|abstract)\\b",
"(文献|论文|研究)"
]
},
{
"tag": "protein_lookup",
"patterns": [
"\\b(uniprot|protein|proteins|amino|sequence)\\b",
"(蛋白)"
]
},
{
"tag": "target_disease",
"patterns": [
"\\b(opentargets|open\\s*targets|target|targets|disease|diseases|indication)\\b",
"(靶点|疾病|适应症)"
]
},
{
"tag": "research_pipeline",
"patterns": [
"\\b(target_discovery|target_ranking|evidence_review|fulltext_upgrade|candidate_compare|task)\\b",
"(研究任务|筛选|盘点|证据评审)"
]
},
{
"tag": "validation",
"patterns": [
"\\b(validate|validation|reproduce|verify|check|codex|notebook|script)\\b",
"(验证|复现|核对)"
]
},
{
"tag": "drug_evidence",
"patterns": [
"\\b(drug|drugs|compound|trial|trials)\\b",
"(药物|临床|试验)"
]
},
{
"tag": "summarization",
"patterns": [
"\\b(summari[sz]e|summary|pooled|meta|bucket)\\b",
"(汇总|总结|池化|合并)"
]
},
{
"tag": "web_search",
"patterns": [
"\\b(news|recent|latest|web|google|search\\s+the\\s+web|current)\\b",
"(新闻|最新|联网|网络)"
]
},
{
"tag": "task_inspect",
"patterns": [
"\\b(inspect|status|result|progress|job)\\b",
"(进度|状态|结果|查看)"
]
}
]
}