Table of Contents
Fetching ...

FlipVQA-Miner: Cross-Page Visual Question-Answer Mining from Textbooks

Zhen Hao Wong, Jingwen Deng, Hao Liang, Runming He, Chengyu Shen, Wentao Zhang

TL;DR

FlipVQA-Miner automates the transformation of educational PDFs into AI-ready supervision by coupling MinerU's layout-aware structural parsing with an LLM-driven semantic reconstruction to extract high-quality QA and VQA pairs. The approach demonstrates robust cross-structural extraction across interleaved, long-distance, and multilingual formats, achieving near-perfect text QA fidelity ($\text{F1} > 0.98$) and strong multimodal alignment ($\text{F1}_{vision} \approx 0.96$–$0.99$). By enabling scalable access to authentic human-authored content for instruction tuning and reinforcement learning, the pipeline offers a practical alternative to synthetic data generation for reasoning-oriented LLM training. The work is open-sourced, facilitating broad adoption and adaptation in education-focused AI data pipelines.

Abstract

The development of Large Language Models (LLMs) increasingly depends on high-quality supervised data, yet existing instruction-tuning and RL datasets remain costly to curate and often rely on synthetic samples that introduce hallucination and limited diversity. At the same time, textbooks and exercise materials contain abundant, high-quality human-authored Question-Answer(QA) content that remains underexploited due to the difficulty of transforming raw PDFs into AI-ready supervision. Although modern OCR and vision-language models can accurately parse document structure, their outputs lack the semantic alignment required for training. We propose an automated pipeline that extracts well-formed QA and visual-QA (VQA) pairs from educational documents by combining layout-aware OCR with LLM-based semantic parsing. Experiments across diverse document types show that the method produces accurate, aligned, and low-noise QA/VQA pairs. This approach enables scalable use of real-world educational content and provides a practical alternative to synthetic data generation for improving reasoning-oriented LLM training. All code and data-processing pipelines are open-sourced at https://github.com/OpenDCAI/DataFlow.

FlipVQA-Miner: Cross-Page Visual Question-Answer Mining from Textbooks

TL;DR

FlipVQA-Miner automates the transformation of educational PDFs into AI-ready supervision by coupling MinerU's layout-aware structural parsing with an LLM-driven semantic reconstruction to extract high-quality QA and VQA pairs. The approach demonstrates robust cross-structural extraction across interleaved, long-distance, and multilingual formats, achieving near-perfect text QA fidelity () and strong multimodal alignment (). By enabling scalable access to authentic human-authored content for instruction tuning and reinforcement learning, the pipeline offers a practical alternative to synthetic data generation for reasoning-oriented LLM training. The work is open-sourced, facilitating broad adoption and adaptation in education-focused AI data pipelines.

Abstract

The development of Large Language Models (LLMs) increasingly depends on high-quality supervised data, yet existing instruction-tuning and RL datasets remain costly to curate and often rely on synthetic samples that introduce hallucination and limited diversity. At the same time, textbooks and exercise materials contain abundant, high-quality human-authored Question-Answer(QA) content that remains underexploited due to the difficulty of transforming raw PDFs into AI-ready supervision. Although modern OCR and vision-language models can accurately parse document structure, their outputs lack the semantic alignment required for training. We propose an automated pipeline that extracts well-formed QA and visual-QA (VQA) pairs from educational documents by combining layout-aware OCR with LLM-based semantic parsing. Experiments across diverse document types show that the method produces accurate, aligned, and low-noise QA/VQA pairs. This approach enables scalable use of real-world educational content and provides a practical alternative to synthetic data generation for improving reasoning-oriented LLM training. All code and data-processing pipelines are open-sourced at https://github.com/OpenDCAI/DataFlow.

Paper Structure

This paper contains 23 sections, 7 figures, 1 table.

Figures (7)

  • Figure 1: Our approach of VQA pair extraction from raw PDF documents. MinerU provides a structured representation of the document content, while the LLM performs block grouping, QA pairing and image inserting on the extracted elements.
  • Figure 2: Demonstration of FlipVQA-Miner’s ability to resolve long-distance associations. Although the question (①), figure (②), and answer (③) are separated across different pages and materials, the system successfully identifies, extracts, and groups them into a coherent VQA unit, with the final result rendered as Markdown.
  • Figure 3: Original question with two interleaved solutions.
  • Figure 4: Extracted and reconstructed QA pair rendered in Markdown.
  • Figure 5: Original question within a multi-column Chinese exercise book layout.
  • ...and 2 more figures