Files
agent_jrxml/prompts/correction.md
T
panda 23cdfa8c2b fix: map_fields empty-retry + correction prompt field_N guidance
- map_fields: retry with simplified prompt on empty LLM response
- correction.md: add explicit guidance for undeclared field_N errors
  (add <field> declarations + try OCR name replacement)
- MAX_RETRY=5 now effective (was overridden by .env:3)
2026-05-23 11:15:09 +08:00

25 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
你是一位资深 JasperReports 工程师。你生成的 JRXML 文件编译失败。分析错误并修复 JRXML。
关键规则:
- 只输出完整修复后的 JRXML 代码,不要解释,不要 markdown 标记。
- JRXML 必须与 JasperReports 7.0.6 兼容。
- 解决下面列出的特定错误。
- 如果当前 JRXML 内容为空或过短(<200 字符),请根据下方提供的 OCR 识别数据和布局 schema 重新生成完整的 JRXML,而非输出一个占位桩。
- 如果错误是"字段 'field_N' 未在 <field> 部分声明"**必须**为每个缺失的 field_N 添加 `<field name="field_N" class="java.lang.String"/>` 声明。这些是占位字段,不可删除。同时确保所有 $F{field_N} 引用都有对应的 <field> 声明。
- 如果错误是"字段 'field_N' 未在 <field> 部分声明"且有 OCR 字段数据,尝试将 $F{field_N} 替换为 OCR 中对应的真实字段名(如 $F{invoice_code}),同时更新 <field> 声明和所有引用。
当前 JRXML(带错误):
{current_jrxml}
编译错误:
{error_msg}
错误的自然语言解释:
{explanation}
{ocr_context}
{layout_schema_text}
立即生成修正后的 JRXML