amz_review_analyse/prompts/README.md
OnesvmWhoops 2441c9119c Initial commit: VOC LLM 结构化分析流水线
包含七步编排入口、结构化/向量化/聚类/词频/报告模块与 prompts 配置;忽略原始 CSV 与本地密钥。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 15:40:13 +08:00

33 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Prompt 编辑说明(产品 / 运营 / 开发)
修改后**下次运行脚本自动生效**,无需重启服务。
## 可编辑文件
| 路径 | 谁改 | 内容 |
|------|------|------|
| `config.yaml` | 产品/运营 | Top N 数值、中文词频六类名称 |
| `extraction/*.md` | 产品/运营 | 结构化提取规则、语气 |
| `extraction/examples.yaml` | 产品/运营 | Few-shot “示例”(output 用 YAML 对象,勿手写 JSON 字符串) |
| `report/*.md` | 产品/运营 | 报告分析要求、输出格式、修正提示 |
| `word_freq/*.md` | 产品/运营 | 词频分类与解读 prompt(含 `category_definitions.md` 各类定义) |
| `schema.yaml` | **仅开发** | JSON 字段名、英文 category、四段输出标记 |
## 占位符
`.md` 文件使用 Python `format` 语法,例如 `{product_name}`、`{industry}`。
正文里需要字面量花括号时写双花括号:`{{"audience": "unknown"}}`。
## 改完怎么验收
```bash
cd "/Users/onesvmwhoops/Cursor_Project/VOC_LLM结构化"
python3 prompts/smoke.py # 检查文件能否加载(无需 API Key)
python3 prompts/smoke.py --live # 用 3 条样例评论调模型(需 DASHSCOPE_API_KEY)
```
## 注意
- 不要改 `schema.yaml` 里的 `report.markers` 四段标记名,否则报告解析会失败。
- `examples.yaml` 里 `sentiment` / `category` 须与 `schema.yaml` 枚举一致。
- 词频分类若增删类别,需同步 `config.yaml` 的 `word_categories` 与 `voc_report.py` 内 `CATEGORY_COLORS` 配色。