Skip to content

fix(backend): 修复无题号题目分割丢失#132

Open
xiaozhejiya wants to merge 1 commit into
mainfrom
fix/question-split-unnumbered-items
Open

fix(backend): 修复无题号题目分割丢失#132
xiaozhejiya wants to merge 1 commit into
mainfrom
fix/question-split-unnumbered-items

Conversation

@xiaozhejiya

Copy link
Copy Markdown
Owner

修改内容

  • 调整分题提示词,要求保留 primary 页内无题号但有实质内容的公式、图片和计算表达式,无法归入前后题时输出为 未编号-N
  • 移除同题号下按 section_title 直接丢弃无 section 题目的去重规则,统一按内容相似度判重。
  • 限制 leading image 修复不跨 section_title 移动,避免看图题图片被挪到上一题。
  • 增加 split agent 原始输出和去重前题目列表的调试持久化,便于定位后续分题问题。
  • 补充 workflow helper 回归测试,覆盖无 section 同题号保留和 leading image 跨 section 保护。

验证

  • python -m py_compile backend/src/workflow.py backend/agents/error_correction/prompts.py backend/tests/test_workflow_helpers.py
  • python -m pytest backend/tests/test_workflow_helpers.py::TestDedupQuestions::test_same_id_unsectioned_different_content_is_kept backend/tests/test_workflow_helpers.py::TestDedupQuestions::test_sorted_output backend/tests/test_workflow_helpers.py::TestDedupQuestions::test_mixed_id_types_sorted backend/tests/test_workflow_helpers.py::TestFixLeadingImages -q

- 调整分题提示词,要求保留 primary 页内无题号但有实质内容的公式、图片和计算表达式

- 移除同题号下按 section_title 直接丢弃无 section 题目的去重规则,改为统一按内容相似度判重

- 限制 leading image 修复不跨 section 移动,避免看图题图片被挪到上一题

- 验证 py_compile 与相关 workflow helper 测试通过
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant