69 Commits

Author SHA1 Message Date
hub-gif
0cb54f679b feat(llm): 策略稿促销节须对齐 price_promotion_signals
策略大模型提示要求依据 brief 中活动话术命中与券后价差字段写满减/券/红包等假设;禁止编造面额;活动子串补充红包/京豆。

Made-with: Cursor
2026-04-16 14:13:33 +08:00
hub-gif
1495161850 fix(report): 负向归纳对齐分量类抱怨并约束质地表述
默认关注词与负向口语短语表补充分量/量少等;§8.2 情感大模型提示要求对照 negative_lexeme_hits 条数、勿将未命中的质地问题写成主诉;lexeme 说明补充预设表局限。

Made-with: Cursor
2026-04-16 14:03:24 +08:00
hub-gif
505352ecda feat(llm): 策略稿「转化与体验」须兼顾正负面
在 STRATEGY_OPPORTUNITIES_SYSTEM 中要求该节同时依据 brief 写正向体验线索与负向摩擦/抱怨,避免只写一侧。

Made-with: Cursor
2026-04-16 11:07:02 +08:00
hub-gif
b10d282980 test(pipeline): 单细类评论要点归纳 LLM 烟测(mock 网关)
构造仅「饼干」矩阵细类的 build_comment_groups_llm_payload,断言 generate_comment_group_summaries_llm 与 chunked 单组时各调用一次网关,且 user JSON 含 keyword 与 group。

Made-with: Cursor
2026-04-16 10:52:04 +08:00
hub-gif
0be4049860 docs(copy): 将「口径」改为计数规则、说明、价格来源等通俗表述
报告正文、简报、策略草稿、API 说明与 LLM 提示中避免「统计口径」等行话;列表 CSV 表头「销量口径」改为「销量展示」;日报目录未改。

Made-with: Cursor
2026-04-16 10:43:44 +08:00
hub-gif
a2523415d5 docs(copy): 用「归类」替换易误解的「桶」表述
报告说明、docstring 与情感分析 LLM 提示中的「分桶/乱桶」等改为归类、关键词规则等通俗说法;JSON 字段名 sentiment_bucket_method 未改。

Made-with: Cursor
2026-04-16 10:40:39 +08:00
hub-gif
30a6bc4405 fix(report): 细类扇图口径与版式统一
_category_mix 增加(其余细类)使简报与扇形图合计等于有效矩阵 SKU 数;§4.3 去掉易与图不一致的 Markdown 表格与规则摘要,仅保留扇形图;全部扇形图默认画布统一为 4.9×3.65 英寸。

Made-with: Cursor
2026-04-16 10:38:21 +08:00
hub-gif
99d1b23b63 feat(pipeline): 按矩阵细类拆分 group 归纳 LLM 请求
§5/§6/§8 等 payload 仍含全部细类,但默认对每个细类单独调用网关并拼接 Markdown,降低单次上下文并减少跨类干扰。report_config.llm_group_summaries_chunk_by_matrix 可关闭;环境变量 MA_LLM_GROUP_SUMMARIES_BULK=1 恢复单次打包调用。

Made-with: Cursor
2026-04-16 10:34:29 +08:00
hub-gif
a43e1f9b1d feat(dataset): 搜索/宽表支持按解析后销量与评价量排序
新增 sales_sort_value、comment_count_sort_value 与 volume_parse;入库与迁移回填;sort=total_sales|comment_count;前端排序下拉文案。

Made-with: Cursor
2026-04-16 10:15:24 +08:00
hub-gif
f21bfbe02b feat(dataset): 店铺改为下拉选择,接口 shop 精确匹配
摘要增加 shop_options;筛选参数由 shop_q 改为 shop;合并表匹配 shop_name 或 detail_shop_name。

Made-with: Cursor
2026-04-16 10:08:06 +08:00
hub-gif
5ea55233b1 feat(dataset): 类目文案统一并支持按店铺名筛选
摘要 category_options;列/导出「类目」;查询参数 shop_q 模糊匹配店铺(搜索 shop_name、商详 detail_shop_name、宽表双列)。

Made-with: Cursor
2026-04-16 10:04:18 +08:00
hub-gif
d95189723c refactor(dataset): 类目筛选改为报告矩阵细类名(report_group)
新增 matrix_group_label 与 jd_competitor_report 同源路径解析;API 使用 report_group 字符串;摘要返回 report_group_options;搜索行按 SKU 从合并表回填细类;导出含报告细类列;前端下拉展示饼干/米等名称。

Made-with: Cursor
2026-04-16 09:58:22 +08:00
hub-gif
f915653104 feat(dataset): 库内浏览支持跳转页、排序与类目价格筛选
新增 JdLeafCategoryNorm 与 price 解析字段;数据集 API 支持 sort/order、category_norm_id、price 区间与类目路径模糊;摘要返回类目选项;前端 JobDatasetModal 增加筛选与分页跳转。

Made-with: Cursor
2026-04-16 09:51:26 +08:00
hub-gif
9cea35a665 fix(report): drop §4 brand/shop tables, align CR with pie charts
Remove duplicate Markdown tables under 4.1/4.2; compute CR from strip-normalized names matching list_*_mix_top pies. Smaller figsize for list brand/shop pies; default pie slightly compact. Deduplicate test_mix_top_remainder test; assert _structure_names_for_pie_counter length.

Made-with: Cursor
2026-04-15 17:54:53 +08:00
hub-gif
b5012a366e fix(pipeline): scope comment-evidence rules to COMMENT_GROUPS only
Revert duplicate-opening and benefit-claim constraints from matrix, scenario, price, promo, §8.5 report, and strategy prompts. Strengthen COMMENT_GROUPS_SYSTEM: comment-only sourcing, no keyword boilerplate as user voice, varied openings, evidence-anchored benefits.

Made-with: Cursor
2026-04-15 17:42:51 +08:00
hub-gif
6280e436d8 feat(pipeline): JD 流水线 CSV 纯中文表头与模块目录重构
- 统一 csv_schema 与搜索/合并/评价/商详导出为纯中文列名,入库与视图按中文表头解析

- 竞品分析报告兼容新旧表头;新增 csv_header_rewrite 与 rewrite_pipeline_csv_headers 管理命令

- 调整 pipeline 至 jd、llm、reporting、demos 子包并更新任务与测试引用

- 新增购买者优惠摘要抽取、合并表 regen/ingest 命令、0016 迁移及相关测试

Made-with: Cursor
2026-04-15 16:02:29 +08:00
hub-gif
5cafa75ab7 feat(pipeline): 新增 Markdown 文档导出、单测与价格分组 LLM 演示脚本
补充 md_document_export 的 DOCX/PDF 导出能力及回归测试,并加入 run_price_groups_llm_demo 便于本地演示。

Made-with: Cursor
2026-04-15 09:32:32 +08:00
hub-gif
43b72cb32e feat: 关注词与场景延伸、报告体验与导出修复
- 流水线:评价关注词与使用场景的大模型延伸(jd_runner、竞品报告、测试)

- 界面:报告生成与查看的通俗化文案;策略稿集中度按店铺/品牌区分

- 导出:PDF 插图限制最大尺寸避免 LayoutError;报告 Word/PDF 改为 blob 下载;策略稿导出错误解析;PDF 补充 Linux 中文字体路径

Made-with: Cursor
2026-04-14 18:23:25 +08:00
hub-gif
3d6193af06 feat(brief): plain-language concentration keys and copy
- Add first_share/top_three_combined_share plus cr1/cr3 readers
- Brief/schema/footnotes and LLM prompts avoid dev jargon where possible
- Frontend JD analysis/dataset hints in business-friendly wording

Made-with: Cursor
2026-04-14 17:28:52 +08:00
hub-gif
c3fdb2b970 fix(report): align shop/brand pie denominators with §4 CR table via mix tail bucket
Made-with: Cursor
2026-04-14 17:28:52 +08:00
hub-gif
e20250e7a6 fix(pipeline): add JdJobSearchRow.total_sales for API dataset export
Made-with: Cursor
2026-04-14 17:28:52 +08:00
hub-gif
36aa36c60b refactor(pipeline): inline total_sales fallback; remove temp backfill script; add refresh command
Made-with: Cursor
2026-04-14 17:28:52 +08:00
hub-gif
b4e97a4c34 feat(pipeline): backfill totalSales column from pc_search_raw without re-crawl
Made-with: Cursor
2026-04-14 17:28:52 +08:00
hub-gif
8611e78a26 feat(jd-pipeline): matrix chart and brief use totalSales for sales volume
Made-with: Cursor
2026-04-14 17:28:17 +08:00
hub-gif
2473a7cdac fix(charts): show review counts on matrix x-axis as 万/亿, not scientific notation
Made-with: Cursor
2026-04-14 17:27:38 +08:00
hub-gif
23d6a0932b fix(charts): independent Y axes for focus vs scenario combo bars
Made-with: Cursor
2026-04-14 17:27:38 +08:00
hub-gif
d99d9d2ab0 feat(report): combine focus-keyword and scenario charts per matrix group
Made-with: Cursor
2026-04-14 17:27:38 +08:00
hub-gif
5fe4ac4ffe feat(pipeline): add LLM summaries for usage scenarios (§8.4)
Made-with: Cursor
2026-04-14 17:27:38 +08:00
hub-gif
d2135e9a6e feat(report): drop chapter 7 product claims (detail attributes summary)
Made-with: Cursor
2026-04-14 17:27:19 +08:00
hub-gif
f994555f9f feat(pipeline): remove llm section bridges from report generation
Made-with: Cursor
2026-04-14 17:27:19 +08:00
hub-gif
c244a2902e refactor(report): drop §5 markdown tables, charts + CSV only
Made-with: Cursor
2026-04-14 17:27:03 +08:00
hub-gif
9d1ff31b23 fix(report): default LLM flags, embed §5 matrix charts, slim table
Merge missing keys from get_default_report_config into effective report_config so llm_* switches default on when absent. §5 embeds chart_matrix_prices_reviews per fine category (price + review-volume bars, Y=title) and replaces the wide matrix with a compact table. Matrix chart Y-labels allow longer titles (48 chars).

Made-with: Cursor
2026-04-14 17:27:03 +08:00
hub-gif
4bb94173a5 feat(pipeline): LLM chapters demo script; shrink comment-group prompts
Add run_report_llm_chapters_demo.py to exercise matrix/price/sentiment/comment_groups/bridges and report supplement. generate_comment_group_summaries_llm now compacts per-group text in tiers so large multi-group runs stay under context limits with default max_tokens.

Made-with: Cursor
2026-04-14 17:27:03 +08:00
hub-gif
c6560bd12b fix(report): use detail_category_path only for matrix and fine-category stats
Made-with: Cursor
2026-04-14 17:25:54 +08:00
hub-gif
f7a4754e56 feat(report): wire LLM group summaries, improve matrix labels and chart Y-axis
Made-with: Cursor
2026-04-14 17:13:01 +08:00
hub-gif
11b9c24334 docs(report): clarify LLM keyword/scenario extension in brief notes
Made-with: Cursor
2026-04-14 17:12:32 +08:00
hub-gif
4cae885200 Revert "docs(report): note LLM keyword/scenario extension in competitor brief"
This reverts commit 70b0b247f4d8ffd66120237ee6154f993fb2d733.
2026-04-14 17:12:32 +08:00
hub-gif
30a985f749 docs(report): note LLM keyword/scenario extension in competitor brief
Made-with: Cursor
2026-04-14 17:12:32 +08:00
hub-gif
6a9b6af321 test(pipeline): restore llm_keyword_suggest parse unit tests
Made-with: Cursor
2026-04-14 17:12:31 +08:00
hub-gif
a1b02e3ed7 chore(django): fail fast with hint when pipeline 0012/0013 migration files missing
Made-with: Cursor
2026-04-14 17:12:03 +08:00
hub-gif
34fe9079ee chore(migrations): add 0013 rebuild checkpoint table (was untracked)
Made-with: Cursor
2026-04-14 17:12:03 +08:00
hub-gif
134faffbe8 feat: default LLM for report regen, job report_config, and API defaults
Made-with: Cursor
2026-04-14 13:28:18 +08:00
hub-gif
f3fe8cd5fd fix(pipeline): restore LLM report regenerate (views b675903); extend report_config keys
Made-with: Cursor
2026-04-14 13:22:42 +08:00
hub-gif
c45ec66d4c feat(report): remove §5 competitor matrix table, keep per-group charts
Made-with: Cursor
2026-04-14 13:18:40 +08:00
hub-gif
a1d0fa6686 fix(report): shop/brand pie totals, matrix price charts, drop LLM §8.5 merge
Made-with: Cursor
2026-04-14 13:16:29 +08:00
hub-gif
2548ba1df5 fix(pipeline): align models and serializers with pause/resume checkpoint
Made-with: Cursor
2026-04-14 13:11:21 +08:00
hub-gif
b6759039c8 fix(llm): tier compact brief for §8.5 to fit 32k context window
Regenerate-report §8.5 payload exceeded ~32k ctx; try decreasing
compact_brief_for_llm max_chars then truncate JSON with notice.

Made-with: Cursor
2026-04-14 11:36:28 +08:00
hub-gif
4be389bf8d fix(api): return 400 for LLM config ValueError on regenerate-report
503 was misleading for missing OPENAI_API_KEY/LLM_BASE_URL and prompt-too-large;
log warning with job id. Keep 503 for unexpected ValueError.

Made-with: Cursor
2026-04-14 11:26:56 +08:00
hub-gif
1f6abe49ee feat(pipeline): wire matrix/price/comment group LLM into report body
- build_matrix/price_groups_llm_payload from merged rows
- jd_runner: call generate_*_group_summaries_llm when report_config or
  MA_ENABLE_LLM_*; write matrix/price/comment_groups_llm.json sidecars
- build_competitor_markdown: insert §5.1, §6.2, §8.6 with disclaimers
- §1.3 note for optional llm_*_group_summaries flags

Made-with: Cursor
2026-04-14 11:15:17 +08:00
hub-gif
15ba8b3370 fix(llm): restore matrix/comment/price group advisor prompts and callers
Re-add MATRIX/COMMENT/PRICE_GROUPS_SYSTEM and generate_*_group_summaries_llm
removed in afe2748; align comment-group prompt with shop in attribution
prefix. Default report_config now includes the three llm_*_summaries flags.

Made-with: Cursor
2026-04-14 11:08:24 +08:00