Skip to main content
QUICK REVIEW

[Paper Review] FMBench: Adaptive Large Language Model Output Formatting

Yaoting Wang, Yun Zhou|arXiv (Cornell University)|Feb 6, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

FMBench introduces a Markdown-focused benchmark for adaptive output formatting and proposes a post-training pipeline (SFT followed by RL with verifiable rewards) to jointly improve semantic fidelity and structural compliance across OpenPangu and Qwen models.

ABSTRACT

Producing outputs that satisfy both semantic intent and format constraints is essential for deploying large language models in user-facing and system-integrated workflows. In this work, we focus on Markdown formatting, which is ubiquitous in assistants, documentation, and tool-augmented pipelines but still prone to subtle, hard-to-detect errors (e.g., broken lists, malformed tables, inconsistent headings, and invalid code blocks) that can significantly degrade downstream usability. We present FMBench, a benchmark for adaptive Markdown output formatting that evaluates models under a wide range of instruction-following scenarios with diverse structural requirements. FMBench emphasizes real-world formatting behaviors such as multi-level organization, mixed content (natural language interleaved with lists/tables/code), and strict adherence to user-specified layout constraints. To improve Markdown compliance without relying on hard decoding constraints, we propose a lightweight alignment pipeline that combines supervised fine-tuning (SFT) with reinforcement learning fine-tuning. Starting from a base model, we first perform SFT on instruction-response pairs, and then optimize a composite objective that balances semantic fidelity with structural correctness. Experiments on two model families (OpenPangu and Qwen) show that SFT consistently improves semantic alignment, while reinforcement learning provides additional gains in robustness to challenging Markdown instructions when initialized from a strong SFT policy. Our results also reveal an inherent trade-off between semantic and structural objectives, highlighting the importance of carefully designed rewards for reliable formatted generation. Code is available at: https://github.com/FudanCVL/FMBench.

Motivation & Objective

  • Motivate the need for reliable Markdown formatting in LLM outputs and identify gaps in existing benchmarks.
  • Create a Markdown-centric benchmark (FMBench) that evaluates semantic fidelity and structural compliance under realistic formatting constraints.
  • Propose a lightweight alignment pipeline combining supervised fine-tuning (SFT) with reinforcement learning fine-tuning (RLFT) to balance content and format without hard constraints at inference.
  • Demonstrate the approach across model families (OpenPangu and Qwen) and analyze trade-offs between semantic and structural objectives.

Proposed method

  • Develop a semi-automated data pipeline to generate content-preserving Markdown documents with varying structural difficulty.
  • Use a two-stage training recipe: supervised fine-tuning (LoRA-based) followed by reinforcement learning fine-tuning with GRPO and verifiable rewards.
  • Define semantic reward as BERTScore-F1 between generated and reference outputs.
  • Define structural reward by comparing abstractive summaries of generated and reference documents to encourage discourse-level alignment.
  • Evaluate using semantic and structure metrics on a 1,100-document FMBench split (800 train, 300 test).
  • Train on OpenPangu (1B, 7B) and Qwen3 (1.7B, 8B) with fixed decoding settings; report results with pretrained vs SFT+GRPO.
Figure 1: Overview of a four-stage pipeline for converting raw documents into structured data. (1) Document Crawling: Documents are collected from multiple domains, including academic, official, technical, legal, business, and educational sources. (2) Document Cleaning: Documents are cleaned and sta
Figure 1: Overview of a four-stage pipeline for converting raw documents into structured data. (1) Document Crawling: Documents are collected from multiple domains, including academic, official, technical, legal, business, and educational sources. (2) Document Cleaning: Documents are cleaned and sta

Experimental results

Research questions

  • RQ1Can a Markdown-focused benchmark isolate and diagnose formatting-related failures in LLM outputs?
  • RQ2Does a post-training pipeline combining SFT and RL with verifiable rewards improve both semantic fidelity and structural compliance in Markdown outputs?
  • RQ3How do model scale and architecture influence the balance between semantic and structural objectives in formatted generation?
  • RQ4What is the impact of SFT and GRPO on formatting robustness across diverse Markdown structures?
  • RQ5What trade-offs emerge between content accuracy and formatting rigidity in adaptive formatting systems?

Key findings

  • SFT consistently improves semantic fidelity across model families and scales.
  • GRPO further enhances or preserves structural compliance when starting from a strong SFT policy.
  • Larger models (e.g., Qwen3-8B) achieve the best semantic and structural performance with the SFT+GRPO pipeline.
  • There is an inherent trade-off between semantic and structural objectives, influenced by reward design and model capacity.
  • Across models, SFT is the dominant driver of semantic improvement, while GRPO strengthens structural robustness as a complementary component.
Figure 2: Distribution of key structural parameters in the FMBench dataset. The figure shows the marginal distributions of four core structural variables: section count, nested list depth, number of list items, and blockquote count, computed over the combined training and test sets. The distribution
Figure 2: Distribution of key structural parameters in the FMBench dataset. The figure shows the marginal distributions of four core structural variables: section count, nested list depth, number of list items, and blockquote count, computed over the combined training and test sets. The distribution

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.