A Closed-Loop Control Architecture for Reliable Constraint Satisfaction in LLM Text Generation
Source
Quan Zhou, Shahbaz Siddeeq, Mika Saari, Pekka Abrahamsson
Author
Quan Zhou, Shahbaz Siddeeq, Mika Saari, Pekka Abrahamsson
Date
Key takeaways · AI-distilled
Single-prompt attempts hit a numeric target (like a word count or readability grade) only 21.1-31.6% of the time across four commercial LLMs, in the tests reported here.
Wrapping generation in a 5-stage loop (generate, evaluate, adjust, archive, analyze) that gates every edit with deterministic code lifted target-hit rates to 92.5-98.8%, typically within two edit rounds.
The controller also rejects any edit that drops source entities, numbers, or keywords, keeping content fidelity at 0.92-0.93 even while forcing the numeric target.
The authors caution the result shows reproducible control over a declared, computable metric, not that the output is validated as easier for a human reader.
Practical recipe: declare the acceptance condition as code, restrict the model to local edits, and gate every edit on a content check.
Terms in this piece · Glossary
LLM — A large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.
Why it matters
Offers a pattern for reliably hitting numeric output constraints from LLMs by keeping the accept/reject decision in deterministic code, tested across 240 closed-loop runs on four commercial models.