WeKnora/config/prompt_templates
wizardchen c0e4a1d2f1 fix(summary): preserve image caption/OCR text in document summaries
Documents whose only payload is an embedded image (e.g. a docx with a
single picture) intermittently produced the refusal line "No textual
content was extractable from this document." even though the vision
model had successfully extracted a caption.

Three coordinated fixes:

- Clarify the summary prompt that text inside `<image_caption>` and
  `<image_ocr>` is first-class extracted content, not an image
  reference, so the model only triggers the empty-content branch when
  the body is genuinely textless.
- For image-dominated documents (real text < 200 runes after stripping
  image markup) include OCR alongside captions so screenshots and
  scanned figures contribute their actual content; text-heavy
  documents continue to use caption-only enrichment to avoid OCR
  noise from incidental figures.
- Add `EnrichContentCaptionAndOCR` which embeds caption + OCR text
  inline next to the original Markdown image link, deliberately
  omitting the `<image url=...>` and `<image_original>` wrapper
  blocks. Those wrappers carry only opaque export hashes that consume
  tokens and have been observed to retrigger the LLM's "image
  reference with no extracted text" heuristic.
2026-05-22 17:25:39 +08:00
..
agent_system_prompt.yaml refactor(agent): simplify grep_chunks tool to a single regex query 2026-05-20 19:34:27 +08:00
context_template.yaml feat(prompt): enhance context and intent classification in templates 2026-03-26 18:57:12 +08:00
fallback.yaml fix: inject KB document listing on fallback for broad queries (#959) 2026-04-28 23:31:04 +08:00
generate_questions.yaml refactor(prompt_templates): improve question generation guidelines and context handling 2026-04-01 21:59:22 +08:00
generate_session_title.yaml fix: update session title word count requirement 2026-03-17 22:23:24 +08:00
generate_summary.yaml fix(summary): preserve image caption/OCR text in document summaries 2026-05-22 17:25:39 +08:00
graph_extraction.yaml feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
intent_prompts.yaml fix: Update intent prompts for knowledge assistant response clarity 2026-04-22 21:17:20 +08:00
keywords_extraction.yaml feat: enhance localization and configuration support 2026-03-17 22:23:24 +08:00
rewrite.yaml fix: inject KB document listing on fallback for broad queries (#959) 2026-04-28 23:31:04 +08:00
system_prompt.yaml refactor(prompt): streamline context handling in templates 2026-03-25 22:08:29 +08:00