New Tool Radar

AI Concepts

How to Order Schema Fields So the Model Reasons Before It Answers

Put the reasoning field before the answer field in your schema so the model works it out before it commits.

Schematic illustration of order schema fields so the model reasons before it answers: step one add a reasoning field, step two put it first, step three read the answer last.

Field order in a schema changes a model’s answers: putting the answer field first makes the model commit to an answer and then invent justification, while putting a reasoning field first lets it work through the steps before answering. Add a short reasoning field before the answer field in your schema, and read the answer only after the reasoning.

Prerequisites

  • A JSON Schema for a question that needs working out, such as a total or a choice.
  • A reasoning field in the schema, placed before the answer field.
  • A worked example with a known correct answer to compare against.

Steps

Step 1: Add a reasoning field

Add a field called reasoning, a string, to the schema. Its job is to hold the working: the numbers used, the rule applied, the options compared.

Step 2: Put it first

Order the schema properties so reasoning comes before answer. The model generates the fields in order, so it writes its working before it writes the answer.

Step 3: Read the answer last

In your code, read the reasoning first when checking a result, and treat the answer as the conclusion of that reasoning. If the reasoning is empty or contradicts the answer, do not trust the answer.

Worked example: Northgate Clinic dosage check

The fictional Northgate Clinic asks a model to check a dose: 2 tablets of 250 mg, taken twice a day. The known total is 1000 mg per day.

Field order Reasoning written Answer Correct
answer first None written first 750 mg No
reasoning first 2 x 250 mg = 500 mg per dose; 2 doses = 1000 mg 1000 mg Yes

With reasoning first, the model writes 2 x 250 mg = 500 mg per dose and 2 doses = 1000 mg, then answers 1000 mg, which matches the known total.

Expected result. The reply contains reasoning before the answer, and the answer follows from that reasoning. UNTESTED: this guide was not run against a live model or API. The worked example below is fictional practice material, and its result is the expected result, not a measured one.

Limits

  • A reasoning field improves the odds; it does not guarantee a correct answer, so check checkable answers yourself.
  • Keep the reasoning field short in the schema, or the model may spend its token budget on it.
  • This is an expected result from the worked example, not a measured comparison.

Sources

See all