amz_review_analyse/prompts/README.md
OnesvmWhoops 91e6c47fc0 迁移 DeepSeek Chat API,并支持本地 Qwen3 Embedding 向量化。
统一 voc_llm 密钥解析与默认模型;向量化改为本地 mlx 模型;更新 README、gitignore 与流水线文档。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 16:15:03 +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结构化"
./310py/bin/python prompts/smoke.py # 检查文件能否加载(无需 API Key)
./310py/bin/python prompts/smoke.py --live # 用 3 条样例评论调模型(需 DEEPSEEK_API_KEY)
```
## 注意
- 不要改 `schema.yaml` 里的 `report.markers` 四段标记名,否则报告解析会失败。
- `examples.yaml` 里 `sentiment` / `category` 须与 `schema.yaml` 枚举一致。
- 词频分类若增删类别,需同步 `config.yaml` 的 `word_categories` 与 `voc_report.py` 内 `CATEGORY_COLORS` 配色。