55 lines
1.5 KiB
Markdown
55 lines
1.5 KiB
Markdown
|
|
# T070 — 30 題品質門檻
|
|||
|
|
|
|||
|
|
> Status: `done`
|
|||
|
|
> Milestone: `M7`
|
|||
|
|
> Est. change: `~180 test/tooling lines`
|
|||
|
|
|
|||
|
|
## Goal
|
|||
|
|
|
|||
|
|
完成後,至少 30 組獨立標註題組能自動計算 precision@10 與 eligible target 達標率並作為失敗 gate。
|
|||
|
|
|
|||
|
|
## Depends on
|
|||
|
|
|
|||
|
|
- T045、T063
|
|||
|
|
|
|||
|
|
## Inputs
|
|||
|
|
|
|||
|
|
- 讀取 / 依賴:
|
|||
|
|
- 檔案:quality fixture JSON、search pipeline tests
|
|||
|
|
- 既有能力 / API:fake sources、evaluator、Run results
|
|||
|
|
- Spec 段落:§7 品質驗收、§9 #17
|
|||
|
|
|
|||
|
|
## Outputs
|
|||
|
|
|
|||
|
|
### 程式變更(預期路徑)
|
|||
|
|
|
|||
|
|
| 路徑 | 動作 | 說明 |
|
|||
|
|
|------|------|------|
|
|||
|
|
| `apps/backend/internal/module/scout/usecase/testdata/topic_quality_cases.json` | edit | 擴充至至少 30 組跨領域題組,分離回歸與驗收樣本。 |
|
|||
|
|
| `apps/backend/internal/module/scout/usecase/topic_quality_gate_test.go` | add | 計算 precision@10、足量題組 target rate 與失敗診斷。 |
|
|||
|
|
|
|||
|
|
### 行為變更
|
|||
|
|
|
|||
|
|
- 無產品行為變更;品質低於門檻時測試失敗。
|
|||
|
|
|
|||
|
|
### API / 契約(若有)
|
|||
|
|
|
|||
|
|
- precision@10 平均 ≥0.8;來源有足量合格候選題組的 target rate ≥0.9。
|
|||
|
|
|
|||
|
|
## Out of scope
|
|||
|
|
|
|||
|
|
- 不以真實搜尋 API 的每日波動作 CI gate,不針對單一題組硬編特例。
|
|||
|
|
|
|||
|
|
## Acceptance
|
|||
|
|
|
|||
|
|
- [x] 題組涵蓋人物/作品、事件、產業、多詞意圖與泛詞陷阱。
|
|||
|
|
- [x] 指令:
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd apps/backend && go test ./internal/module/scout/usecase -run TopicQualityGate -count=1
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Notes
|
|||
|
|
|
|||
|
|
失敗輸出需指出 case ID、precision、target/eligible 與主要排除原因。
|