Files
Agent-Intent/intent/testdata/specs/base.json
T
weichen 1d0fcbd1ba
ci / vet-and-test (pull_request) Successful in 18s
ci / docker-checkout-hostgateway (pull_request) Successful in 0s
Add the multi-turn eval format and self-describing corpora
Why: I1 WP6 - eval needs per-turn command expectations to carry the
SetSlot+Start acceptance case, and corpora must reproduce standalone
in intentctl (the guard case has been red there since before I1
because the guard spec only existed as a test builtin).

Evidence: go vet clean; go test ./... all ok; intentctl eval passes
11/11 on the v1 corpus (guard case fixed via self-declaration) and
1/1 on the new two-turn SetSlot+Start corpus.

Impact: new intent/corpus.go (CorpusCase/CorpusTurn/CommandExpect,
RunCorpusCase with chained expectations); intentctl eval consumes
turns and corpus-declared builtin_specs and domains; report.generate
spec and corpus_multiturn.json fixtures added. v1 corpus format and
conformance unchanged.

Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md I1 WP6
2026-10-07 08:12:50 +00:00

155 lines
3.0 KiB
JSON

{
"intents": [
{
"id": "demo.run.status_query",
"domain": "demo",
"version": 1,
"description": "查询任务运行进度",
"matcher": {
"includes_any": [
"进度",
"状态"
],
"excludes_any": [
"配置"
]
},
"slots": [
{
"key": "run_id",
"required": false,
"pattern": "(?:run|任务)[:# ]*([A-Za-z0-9-]+)",
"group": 1
}
],
"confidence": {
"base": 0.8,
"threshold": 0.7
},
"risk": "low",
"handler": "taskrun.query_status",
"metadata": {
"channel": "dialogue"
}
},
{
"id": "demo.run.restart",
"domain": "demo",
"version": 1,
"description": "重启任务",
"matcher": {
"includes_any": [
"重启"
],
"includes_all": [
"任务"
]
},
"confidence": {
"base": 0.75,
"threshold": 0.7
},
"risk": "medium",
"requires_confirm": true,
"handler": "taskrun.restart"
},
{
"id": "demo.run.cancel",
"domain": "demo",
"version": 1,
"description": "取消任务",
"matcher": {
"includes_any": [
"取消"
]
},
"slots": [
{
"key": "run_id",
"required": true,
"pattern": "(?:run|任务)[:# ]*([A-Za-z0-9-]+)",
"group": 1
}
],
"handler": "taskrun.cancel"
},
{
"id": "demo.greet.hello",
"domain": "demo",
"version": 1,
"matcher": {
"includes_any": [
"你好"
]
},
"priority": 10
},
{
"id": "demo.greet.hi",
"domain": "demo",
"version": 1,
"matcher": {
"includes_any": [
"你好"
]
},
"priority": 5
},
{
"id": "demo.misc.deploy",
"domain": "demo",
"version": 1,
"matcher": {
"includes_any": [
"deploy",
"发布"
],
"case_sensitive": false
},
"handler": "deploy.run"
},
{
"id": "demo.tie.alpha",
"domain": "demo",
"version": 1,
"matcher": {
"includes_any": [
"打结"
]
},
"priority": 5
},
{
"id": "demo.tie.beta",
"domain": "demo",
"version": 1,
"matcher": {
"includes_any": [
"打结"
]
},
"priority": 5
},
{
"id": "report.generate",
"domain": "report",
"version": 1,
"matcher": {
"includes_any": [
"生成报告"
]
},
"slots": [
{
"key": "topic",
"required": true,
"pattern": "主题是(.+)",
"question": "要查询哪个主题?",
"label": "主题"
}
],
"handler": "reportHandler"
}
],
"disable": []
}