In Exercise: Guard the Conditions Answer, a failed check fell back to the latest reports. No wrong answer reached the page, but the hiker left without an answer, and the wardens’ desk never heard of the hiker’s question.
Here, you’ll decide in code when to hand a hiker over to that desk and build the path there. Start with the signal most developers try first, which is the model’s own confidence.
Ask the Model How Sure It Is
The model’s rating of its own answer looks like a cheap handoff signal. Save scripts/try-confidence.js, which asks one question ten times and prints “hand over” for scores below 50:
scripts/try-confidence.js
import { z } from "zod";
import { askForJson } from "../model/index.js";
const Reply = z.object({
answer: z.string(),
confidence: z.number().int().min(0).max(100),
});
const instructions = `You answer hikers' questions from
the reports below. Give your answer and how confident you
are that it's right, from 0 to 100.
Lauzet footbridge (2026-07-17, Hut 3 warden): Closed.
Valbrune ford (2026-07-16, Ranger Ines Okafor): High after
rain.`;
const input = "Is the Pas de la Mule open today?";
const ask = () => askForJson({ instructions, input,
schema: Reply });
const replies = await Promise.all(
Array.from({ length: 10 }, ask));
for (const { data } of replies) {
const { answer, confidence } = data;
const action = confidence < 50 ? "hand over" : "answer";
console.log(action.padEnd(9), confidence,
answer.slice(0, 40));
}
No report covers the Pas de la Mule. Decide how many of the ten lines will say “hand over”, then run node --env-file=.env scripts/try-confidence.js.
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether Pas de la Mule i
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether Pas de la Mule i
answer 100 I can’t confirm whether Pas de la Mule i
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether the Pas de la Mu
answer 100 I can’t confirm whether the Pas de la Mu
None of them say “hand over”. Each 100 rates the model’s own words, which here say it can’t confirm anything. The score doesn’t tell you whether an answer is right.
With gpt-6.2-sol on December 2, 2026, forty of forty runs said 100, while gpt-5.4-mini scored the same words from 12 to 94. These are OpenAI’s numbers only, and yours will differ.
The score is generated text, and nothing calibrates it. It shifts between runs and models, from 12 to 100 above. Your code can already see something more useful, which is that no report names the Pas de la Mule.
Ask the mentor what your own feature’s code could see instead, and keep the list to compare with the code below: