29 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
dd5fa8a407 feat(comments): attribute sentiment LLM samples to shop and SKU
- Add _comment_lines_with_product_context and build_comment_groups_llm_payload
- build_comment_sentiment_llm_payload: lexicon on plain text, samples with
  【细类|SKU|品名|店铺】 prefix; jd_runner passes parallel attributed lines
- Tighten §8.2/§8.5 prompts so negatives tie to shop + product; tests assert 店铺

Made-with: Cursor
2026-04-14 11:04:35 +08:00
hub-gif
708f28f40e fix(report): restore jd_competitor_report after mistaken chart revert
9cc8de9 accidentally rewrote jd_competitor_report.py and merged an oversized
report_charts.py. Reset both to f19d112 baseline; keep only obsolete cleanup
for removed global bar chart filenames.

Made-with: Cursor
2026-04-14 10:51:38 +08:00
hub-gif
9cc8de9006 revert(report): drop global focus/scenario bar charts
Remove chart_comment_focus_global_bar / chart_usage_scenarios_global_bar
generation and markdown embed; delete leftovers on chart regen.

Made-with: Cursor
2026-04-14 10:48:54 +08:00
hub-gif
be0215bfe2 fix(ai_crawler): cap max_tokens to remaining context window
LiteLLM rejects when max_tokens exceeds context minus measured input
tokens. Estimate input from prompt length and clamp max_tokens; allow
LLM_CONTEXT_WINDOW override. Prevents ContextWindowExceededError on long
Chinese/JSON prompts (e.g. regenerate-report §8.5).

Made-with: Cursor
2026-04-14 10:16:38 +08:00
hub-gif
9797796f2e fix(pipeline): cap LLM brief size on report regen; enrich chat HTTP errors
Regenerate-report (llm) used compact_brief_for_llm default 350k chars,
unlike other LLM steps (80k–100k), which can cause gateway timeouts or 5xx
surfacing as 502. chat_completion_text now attaches response body snippet
to HTTPError for easier diagnosis.

Made-with: Cursor
2026-04-14 09:55:42 +08:00
hub-gif
a8210ec933 feat(报告): 各章大模型衔接分析与 report_config 开关
Made-with: Cursor
2026-04-13 11:06:35 +08:00
hub-gif
b7d932b920 feat(报告): 第六章增加优惠活动与标价券后价差分析
Made-with: Cursor
2026-04-13 10:59:22 +08:00
hub-gif
bac71c00be feat(报告): 评价大模型解读强化负向主题归因与抽样
Made-with: Cursor
2026-04-13 10:52:14 +08:00
hub-gif
d8086dfdd5 Initial commit: Market-Assistant standalone (Django + Vue + JD crawler copy)
Made-with: Cursor
2026-04-10 18:03:35 +08:00