seo-generator-server/lib
StillHammer 3751ab047b feat(keywords): Add hierarchical context to missing keywords prompt and fix LLM response format
This commit improves keyword generation by providing hierarchical context for each element and fixing the LLM response format parsing.

Changes:
1. lib/MissingKeywords.js:
   - Add buildHierarchicalContext() to generate compact contextual info for each element
   - Display hierarchy in prompt (e.g., "H2 existants: 'Titre1', 'Titre2'")
   - For Txt elements: show associated MC keyword + parent title
   - For FAQ elements: count existing FAQs
   - Fix LLM response format by providing 3 concrete examples from actual list
   - Add explicit warning to use exact tag names [Titre_H2_3], [Txt_H2_6]
   - Improve getElementContext() to better retrieve hierarchical elements

2. lib/selective-enhancement/SelectiveUtils.js:
   - Fix createTypedPrompt() to use specific keyword from resolvedContent
   - Remove fallback to csvData.mc0 (log error if no specific keyword)

3. lib/pipeline/PipelineExecutor.js:
   - Integrate generateMissingSheetVariables() as "Étape 0" before extraction

Prompt format now:
  1. [Titre_H2_3] (titre) — H2 existants: "Titre1", "Titre2"
  2. [Txt_H2_6] (texte) — MC: "Plaque dibond" | Parent: "Guide dibond"
  3. [Faq_q_1] (question) — 3 FAQ existantes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 14:51:01 +08:00
..
adversarial-generation Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
batch Fix workflow production avec XML Digital Ocean et format Google Sheets 2025-10-08 14:52:19 +08:00
generation feat: Améliore système de génération avec personnalités enrichies et détection intelligente 2025-10-12 10:36:59 +08:00
human-simulation Improve step by step system, fix modular level 3 and 4 modules 2025-09-11 15:31:53 +08:00
modes Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
pattern-breaking Improve step by step system, fix modular level 3 and 4 modules 2025-09-11 15:31:53 +08:00
pipeline feat(keywords): Add hierarchical context to missing keywords prompt and fix LLM response format 2025-10-12 14:51:01 +08:00
polyfills Initial commit 2025-09-03 15:29:19 +08:00
prompt-engine Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
selective-enhancement fix(selective): Use specific keywords (resolvedContent) instead of general keyword 2025-10-12 14:03:06 +08:00
shared Refactor batch processing system with shared QueueProcessor base class 2025-09-19 02:04:48 +08:00
trend-prompts Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
workflow-configuration Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
APIController.js Add modular pipeline demo system with real module integration 2025-09-23 16:03:20 +08:00
ArticleStorage.js Fix workflow production avec XML Digital Ocean et format Google Sheets 2025-10-08 14:52:19 +08:00
BrainConfig.js Fix workflow production avec XML Digital Ocean et format Google Sheets 2025-10-08 14:52:19 +08:00
ConfigManager.js Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
ContentAssembly.js Remove Gemini provider and fix ContentAssembly array bug 2025-09-22 07:08:14 +08:00
ElementExtraction.js Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
ErrorReporting.js update test system and logger 2025-09-08 12:33:16 +08:00
LLMManager.js Remove Gemini provider and fix ContentAssembly array bug 2025-09-22 07:08:14 +08:00
Main.js Add flexible pipeline system with per-module LLM configuration 2025-10-09 14:01:52 +08:00
MissingKeywords.js feat(keywords): Add hierarchical context to missing keywords prompt and fix LLM response format 2025-10-12 14:51:01 +08:00
package.json Initial commit 2025-09-03 15:29:19 +08:00
StepByStepSessionManager.js Improve step by step system, fix modular level 3 and 4 modules 2025-09-11 15:31:53 +08:00
StepExecutor.js Fix workflow production avec XML Digital Ocean et format Google Sheets 2025-10-08 14:52:19 +08:00
trace.js Initial commit 2025-09-03 15:29:19 +08:00