118 lines
2.7 KiB
Markdown
118 lines
2.7 KiB
Markdown
# MVP Demo Runbook
|
|
|
|
This demo proves the MVP flow from user question to persisted diagnosis trace.
|
|
|
|
For interview use, start with:
|
|
|
|
- `interview-walkthrough.md` for the talk track
|
|
- `trace-inspection-checklist.md` for fields to inspect
|
|
- `scripts/run-payment-timeout-demo.ps1` for the runnable local demo
|
|
- `requests/payment-timeout-chat.json` for the fixed request payload
|
|
|
|
## Prerequisites
|
|
|
|
- MySQL, Redis, Milvus/Zilliz, and LLM/embedding configuration are available through the current project configuration.
|
|
- Security and secret cleanup are intentionally out of scope for this MVP slice.
|
|
- The `mvp-demo` profile enables mock Prometheus and CLS providers so log and metric tools can return repeatable evidence.
|
|
|
|
## Start
|
|
|
|
```powershell
|
|
mvn spring-boot:run "-Dspring-boot.run.profiles=mvp-demo"
|
|
```
|
|
|
|
The service listens on:
|
|
|
|
```text
|
|
http://localhost:9900
|
|
```
|
|
|
|
## 1. Run Chat Diagnosis
|
|
|
|
Fast path:
|
|
|
|
```powershell
|
|
powershell -ExecutionPolicy Bypass -File mvp/demo/scripts/run-payment-timeout-demo.ps1
|
|
```
|
|
|
|
This writes:
|
|
|
|
```text
|
|
mvp/demo/output/chat-response.json
|
|
mvp/demo/output/trace-response.json
|
|
mvp/demo/output/feedback-response.json
|
|
```
|
|
|
|
Manual path:
|
|
|
|
```powershell
|
|
$sessionId = "mvp-demo-payment-timeout-001"
|
|
$body = @{
|
|
Id = $sessionId
|
|
Question = "支付接口最近出现超时,请结合知识库、日志和指标判断可能原因,并给出修复建议。"
|
|
} | ConvertTo-Json
|
|
|
|
Invoke-RestMethod `
|
|
-Method Post `
|
|
-Uri "http://localhost:9900/api/chat" `
|
|
-ContentType "application/json" `
|
|
-Body $body
|
|
```
|
|
|
|
Expected result:
|
|
|
|
- `data.success` is `true`.
|
|
- `data.sessionId` equals `mvp-demo-payment-timeout-001`.
|
|
- `data.answer` contains a diagnosis answer.
|
|
|
|
## 2. Query Trace
|
|
|
|
```powershell
|
|
Invoke-RestMethod `
|
|
-Method Get `
|
|
-Uri "http://localhost:9900/api/diagnosis/$sessionId/trace"
|
|
```
|
|
|
|
Expected result:
|
|
|
|
- `code` is `200`.
|
|
- `data.session.sessionId` equals the chat session id.
|
|
- `data.steps` contains planner/executor/verifier records for complex questions.
|
|
- `data.toolInvocations` contains evidence tool calls such as `lookup_knowledge`, `query_logs`, or `query_metrics`.
|
|
- `data.session.selfEvaluation` contains verifier or rule evaluation when available.
|
|
|
|
## 3. Submit Feedback
|
|
|
|
```powershell
|
|
$feedback = @{
|
|
sessionId = $sessionId
|
|
feedback = "useful"
|
|
} | ConvertTo-Json
|
|
|
|
Invoke-RestMethod `
|
|
-Method Post `
|
|
-Uri "http://localhost:9900/api/feedback" `
|
|
-ContentType "application/json" `
|
|
-Body $feedback
|
|
```
|
|
|
|
Expected result:
|
|
|
|
- `success` is `true`.
|
|
- A later trace query shows `data.session.feedback` as `useful`.
|
|
|
|
## Demo Story
|
|
|
|
The important interview story is:
|
|
|
|
```text
|
|
one session id
|
|
-> user question
|
|
-> multi-agent execution
|
|
-> evidence tools
|
|
-> verifier/self-evaluation
|
|
-> final answer
|
|
-> feedback
|
|
-> trace API for replay and audit
|
|
```
|