Files
group_xinghuo_jinrong/docs/答辩/DEMO-SOP-问数.md
T
zhanghongyu_0626 2b4eaa9725 feat(nav): Implement historical NAV tracking and enhance product API
- Added `list_nav_history` method in `CoreReadOnlyRepository` to retrieve historical NAV data for products over a specified number of days.
- Introduced `get_nav_history` endpoint in `product_service` to return historical NAV sequences, improving product data accessibility.
- Updated `products.py` to include new API endpoint for fetching NAV history, ensuring compliance with access control.
- Enhanced `ready.py` to include a health check for the new functionality, ensuring system readiness.
- Updated documentation to reflect the new testing baseline of 833 passed tests, indicating improved stability and functionality across the application.

This update significantly enhances the product API by providing access to historical NAV data, improving user insights into product performance.
2026-09-11 20:47:18 +08:00

2.8 KiB
Raw Blame History

答辩 Demo · 问数工作台 SOP

套餐 ① 答辩稳(2026-09-11)· 基线 827 pytest · 问数/解读拆分 · N-03 抽样 · N-07 转人工
全角色答辩动线: DEMO-SOP-答辩全流程.md

1. 环境(答辩前 30 分钟)

cd "d:\项目\JinRong"
docker compose up -d redis   # 或 .\scripts\dev\start-redis.ps1
# .env: REDIS_URL=redis://127.0.0.1:6380/0 · DEEPSEEK_API_KEY 已填

mysql -u root -p jinrong_agent < scripts/agent/seed-analyst-metric-dict.sql
mysql -u root -p jinrong_agent < scripts/agent/seed-analyst-query-templates.sql
# 或一键:.\scripts\dev\seed_analyst.ps1

python -m uvicorn app.main:app --reload --port 8000
cd web && npm run dev

无 DeepSeek Key: 问数仍可出 模板 SQL + 表;点「分析该数据」解读会降级或失败——答辩建议带 Key。

2. 推荐口述动线(3~5 分钟 · 分析员账号)

步骤 操作 答辩句
1 打开 问数工作台 「查数和解读拆开:先 NL2SQL 可审计,再按需看图说话」
2 问:客户总数是多少 指 蓝色「模板命中 · customer_total_count」 → D-06 模板跳过 LLM 写 SQL
3 再问同一题 指 绿色「结果缓存」 → 权限指纹 + SQL + 表世代
4 点 分析该数据 「上下文只有本轮问题和表格,不接 Chat 历史;数字走 D-10 护栏」
5 问:近30天申购金额(或含「近30天」「申购」「金额」) 模板 subscribe_amount_recent_days
6 问:近30天交易流水是多少 clarify → N-01 多义,不猜口径
7 可选 点 抽样溯源(N-03)· 失败场景 转人工(N-07)
8 可选 deny 理财师问非名下客户 → 权限与问数 同一 answer,解读按钮不调 LLM

3. 客户角色(平台服务 · 数据分析)

  • 登录 客户 Demo → 平台服务 · 数据分析
  • 问:我近30天有多少笔交易 → 模板 customer_self_trade_count_recent(需种子)
  • 按钮文案:解读我的数据 · 尾注含「AI 分析有风险」

4. 20 题 battery(答辩后自测,报告不入库)

python scripts/dev/run_query_battery.py
# 脚本内显式 interpret: false;本地生成 scripts/dev/battery_report.json(.gitignore)

验收:A1 Q17(created_at 列不误杀)· A5 流水 clarify · 模板题稳定命中。

5. 诚实边界(主动一句)

  • D-09 多轮追问、D-12 看板钻取仍 open
  • N-03 抽样、N-07 转人工已最小闭环(sample API + escalate + 问数页按钮)
  • /app/analytics/chat 重定向到问数页,避免双入口
  • 分析占位 agent_service 仍存在于 API,菜单已收