09 Apr, 2026
1 commit
-
字段生成 - 新增分类法属性富化能力,遵循 enriched_attributes 相同的字段结构和处理逻辑,仅提示词和解析维度不同 - 引入 AnalysisSchema 抽象类,使内容富化(content)与分类法富化(taxonomy)共享批处理、缓存、提示词构建、Markdown 解析及归一化流程 - 重构 product_enrich.py 中原有的富化管道,将通用逻辑抽取至 _process_batch_for_schema、_parse_markdown_to_attributes 等函数,消除代码重复 - 在 product_enrich_prompts.py 中添加分类法提示词模板(TAXONOMY_ANALYSIS_PROMPT)及 Markdown 表头定义(TAXONOMY_HEADERS) - 修复 Markdown 解析器在空单元格时的行为:原实现会跳过空单元格导致列错位,现改为保留空值,确保稀疏的分类法属性列正确对齐 - 更新 document_transformer.py 中 build_index_content_fields 函数,将 enriched_taxonomy_attributes(中/英)写入最终索引文档 - 调整相关单元测试(test_product_enrich_partial_mode.py 等)以覆盖新字段路径,测试通过(14 passed) 技术细节: - AnalysisSchema 包含 schema_name、prompt_template、headers、field_name_prefix 等元数据 - 缓存键区分内容/分类法:`enrich:{schema_name}:{product_id}`,避免缓存污染 - 分类法解析使用与 enriched_attributes 相同的嵌套结构:`{"attribute_key": "value"}`,支持多行表格 - 批处理大小与重试逻辑保持与原有内容富化一致
19 Mar, 2026
1 commit
18 Mar, 2026
1 commit
-
2. 优化缓存,缓存粒度为商品级,每次只对batch中未cache的重新计算;key使用每个商品输入的hash
17 Mar, 2026
1 commit
-
- Rename indexer/product_annotator.py to indexer/product_enrich.py and remove CSV-based CLI entrypoint, keeping only in-memory analyze_products API - Introduce dedicated product_enrich logging with separate verbose log file for full LLM requests/responses - Change indexer and /indexer/enrich-content API wiring to use indexer.product_enrich instead of indexer.product_annotator, updating tests and docs accordingly - Switch translate_prompts to share SUPPORTED_INDEX_LANGUAGES from tenant_config_loader and reuse that mapping for language code → display name - Remove hard SUPPORTED_LANGS constraint from LLM content-enrichment flow, driving languages directly from tenant/indexer configuration - Redesign LLM prompt generation to support multi-round, multi-language tables: first round in English, subsequent rounds translate the entire table (headers + cells) into target languages using English instructions
13 Mar, 2026
1 commit
11 Mar, 2026
1 commit