Urgent.News

What's breaking now, across thousands of outlets.

AI

The model obeys your schema, not your description

Two models. Same prompt, same tool description, same request. One of them returned this: { "kind" : "entity" , "entityName" : "todo" , "definition" : { "fields" : { "title" : "text" } } } The other returned this: { "kind" : "entity" , "name" : "todo" , "fields" : { "title" : "text" } } The second one is wrong, and our downstream patcher rejected it with a 422 that told nobody anything useful.…

Two models were asked to follow the same prompt and tool description to generate a response. One model returned a pattern with an entity name and definition fields, while the other returned a pattern with just the entity name and fields. The second model's response was rejected by the downstream patcher, causing confusion and wasted time.

The issue was traced back to the exposure gap between the models - the "smarter" model had seen the shape before and was able to retrieve the necessary memory, while the less trained model guessed based on the description text and produced an incorrect result. The root cause was the lack of a strict schema for the tool, which led to the model guessing the pattern instead of following the prescribed format.

To address this issue, the team focused on writing tight schemas for the common pattern kinds, while providing a more permissive fallback for the rare ones. This approach targeted the failures they actually encountered, rather than investing time in creating schemas for every possible shape.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Friday 18 September →