Think Inside the JSON: Reinforcement Strategy for Strict LLM Schema Adherence
On the map: LLM reasoning → Reinforcement learning for reasoning
Abstract (arXiv)
In this paper, we address the challenge of enforcing strict schema adherence in large language model (LLM) generation by leveraging LLM reasoning capabilities. Building on the DeepSeek R1 reinforcement learning framework, our approach trains structured reasoning skills of a 1.5B parameter model through a novel pipeline that combines synthetic reasoning dataset construction with custom reward functions under Group Relative Policy Optimization (GRPO). Specifically, we first perform R1 reinforcement learning on a 20K sample unstructured-to-structured dataset, mirroring the original DeepSeek R1 methods, to establish core reasoning abilities. Subsequently, we performed supervised fine-tuning on a separate 10K reasoning sample dataset, focusing on refining schema adherence for downstream tasks. Despite the relatively modest training scope, requiring approximately 20 hours on an 8xH100 GPU cluster for GRPO training and 3 hours on 1xA100 for SFT, our model demonstrates robust performance in enforcing schema consistency. We compare our ThinkJSON approach against the original DeepSeek R1 (671B), distilled versions of DeepSeek R1 (Qwen-1.5B and Qwen-7B), and Gemini 2.0 Flash (70B), showcasing its effectiveness in real-world applications. Our results underscore the practical utility of a resource-efficient framework for schema-constrained text generation.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Placed in Reinforcement learning for reasoning, one of 17 directions in LLM reasoning. Builds on 8 of its 19 references that are in the map. First posted on arXiv 18 Feb 2025.
Builds on
8 of 19 references.
Closest ancestors · 2
Same direction, newest first
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning22 Jan
- 2023Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotations14 Dec
Other references · 6
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023Efficient Guided Generation for Large Language Modelscited by 192
- 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 73
- 2024StructuredRAG: JSON Response Formatting with Large Language Modelscited by 22
Built on by
Citing papers per year: 2025: 9; 2026: 7.
16 papers.
Sort:
By area:
- 2025SLOT: Structuring the Output of Large Language Modelscited by 18
- 2025PARSE: LLM Driven Schema Optimization for Reliable Entity Extractioncited by 6
- 2026A Survey on Evaluating Quality and Trustworthiness in LLM-Generated Datacited by 5
- 2026Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphscited by 4
- 2025AI-Driven Self-Evolving Software: A Promising Path Toward Software Automationcited by 3
- 2026The Extrapolation Cliff in On-Policy Distillation of Near-Deterministic Structured Outputscited by 2
- 2025The Judge Variable: Challenging Judge-Agnostic Legal Judgment Predictioncited by 1
- 2025Performance Trade-offs of Optimizing Small Language Models for E-Commercecited by 1
- 2025RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMscited by 1
- 2026Diverse Thinking Schemata Elicit Better Reasoning in Large Language Modelscited by 1
- 2025Transforming Decoder-Only Transformers for Accurate WiFi-Telemetry Based Indoor Localizationcited by 0
- 2025A Reasoning Paradigm for Named Entity Recognitioncited by 0
4 more
- 2025MMCTOP: A Multimodal Textualization and Mixture-of-Experts Framework for Clinical Trial Outcome Predictioncited by 0
- 2026Evidence-based Distributional Alignment for Large Language Modelscited by 0
- 2026Linear Temporal Logic Translation via Human-Inspired Self-Constrained Reasoning for Robot Task Specificationcited by 0
- 2026Reasoning Topology Matters: A Controlled Study of LLM-Based Cybersecurity Analysiscited by 0
- 2026Reasoning Topology Matters: A Controlled Study of LLM-Based Cybersecurity Analysis21 Sep 2026
- 2026Linear Temporal Logic Translation via Human-Inspired Self-Constrained Reasoning for Robot Task Specification28 Aug 2026
- 2026Diverse Thinking Schemata Elicit Better Reasoning in Large Language Models8 Jun 2026
- 2026The Extrapolation Cliff in On-Policy Distillation of Near-Deterministic Structured Outputs9 May 2026
- 2026Evidence-based Distributional Alignment for Large Language Models3 Mar 2026
- 2026A Survey on Evaluating Quality and Trustworthiness in LLM-Generated Data25 Jan 2026
- 2026Reliable Graph-RAG for Codebases: AST-Derived Graphs vs LLM-Extracted Knowledge Graphs13 Jan 2026
- 2025MMCTOP: A Multimodal Textualization and Mixture-of-Experts Framework for Clinical Trial Outcome Prediction26 Dec 2025
- 2025RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMs29 Nov 2025
- 2025A Reasoning Paradigm for Named Entity Recognition15 Nov 2025
- 2025Performance Trade-offs of Optimizing Small Language Models for E-Commerce24 Oct 2025
- 2025PARSE: LLM Driven Schema Optimization for Reliable Entity Extraction8 Oct 2025
4 more
- 2025AI-Driven Self-Evolving Software: A Promising Path Toward Software Automation1 Oct 2025
- 2025The Judge Variable: Challenging Judge-Agnostic Legal Judgment Prediction18 Jul 2025
- 2025Transforming Decoder-Only Transformers for Accurate WiFi-Telemetry Based Indoor Localization16 May 2025
- 2025SLOT: Structuring the Output of Large Language Models6 May 2025
- 2026Diverse Thinking Schemata Elicit Better Reasoning in Large Language Modelscited by 1
- 2025A Reasoning Paradigm for Named Entity Recognitioncited by 0
- 2026Linear Temporal Logic Translation via Human-Inspired Self-Constrained Reasoning for Robot Task Specificationcited by 0
- 2026Reasoning Topology Matters: A Controlled Study of LLM-Based Cybersecurity Analysiscited by 0
- 2026Reasoning Topology Matters: A Controlled Study of LLM-Based Cybersecurity Analysis21 Sep 2026
- 2026Linear Temporal Logic Translation via Human-Inspired Self-Constrained Reasoning for Robot Task Specification28 Aug 2026
- 2026Diverse Thinking Schemata Elicit Better Reasoning in Large Language Models8 Jun 2026
- 2025A Reasoning Paradigm for Named Entity Recognition15 Nov 2025
- 2025SLOT: Structuring the Output of Large Language Modelscited by 18
- 2025AI-Driven Self-Evolving Software: A Promising Path Toward Software Automationcited by 3
- 2026The Extrapolation Cliff in On-Policy Distillation of Near-Deterministic Structured Outputscited by 2
- 2025The Judge Variable: Challenging Judge-Agnostic Legal Judgment Predictioncited by 1
- 2025Performance Trade-offs of Optimizing Small Language Models for E-Commercecited by 1
- 2025RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMscited by 1
- 2025Transforming Decoder-Only Transformers for Accurate WiFi-Telemetry Based Indoor Localizationcited by 0
- 2026The Extrapolation Cliff in On-Policy Distillation of Near-Deterministic Structured Outputs9 May 2026
- 2025RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMs29 Nov 2025
- 2025Performance Trade-offs of Optimizing Small Language Models for E-Commerce24 Oct 2025
- 2025AI-Driven Self-Evolving Software: A Promising Path Toward Software Automation1 Oct 2025
- 2025The Judge Variable: Challenging Judge-Agnostic Legal Judgment Prediction18 Jul 2025
- 2025Transforming Decoder-Only Transformers for Accurate WiFi-Telemetry Based Indoor Localization16 May 2025
- 2025SLOT: Structuring the Output of Large Language Models6 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Token-Efficient RL for LLM Reasoning
- 2026Re2: Unlocking LLM Reasoning via Reinforcement Learning with Re-solving
- 2025General-Reasoner: Advancing LLM Reasoning Across All Domains
- 2025Revisiting Reinforcement Learning for LLM Reasoning from A Cross-Domain Perspective
- 2025Scaling Up RL: Unlocking Diverse Reasoning in LLMs via Prolonged Training
- 2025From Data-Centric to Sample-Centric: Enhancing LLM Reasoning via Progressive Optimization
- 2025Critique-GRPO: Advancing LLM Reasoning with Natural Language and Numerical Feedback
- 2025MOTIF: Modular Thinking via Reinforcement Fine-tuning in LLMs