BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDeveloping AI Apps and Agents on Azure (AI-103)Implement model reflection, chain-of-thought evaluations, and self-critique loops
Lesson2,693 words

Implement model reflection, chain-of-thought evaluations, and self-critique loops

AI-103 › Unit 2: Implement generative AI and agentic solutions › Optimize and operationalize generative AI systems › Implement model reflection, chain-of-thought evaluations, and self-critique loops

Implement model reflection, chain-of-thought evaluations, and self-critique loops

Reflection is the family of patterns where a model examines output — its own or another's — and improves or judges it. Three variants matter here: chain of thought, which exposes reasoning before answering; self-critique, where the model reviews and revises its own work; and model-as-judge, where a model scores output against criteria. Each has a place, and each has a documented boundary that questions test.

Why This Matters

Chain of thought is model-dependent. It helps non-reasoning models and is explicitly not recommended for reasoning models, which already reason internally. Applying it universally is a documented error.

Self-critique costs a full extra generation. It is a real technique with a real price, and it is not free accuracy — a model that got something wrong can also fail to notice.

Model-as-judge is how evaluation actually works. AI-assisted evaluators are judges, and the Azure OpenAI graders are the primitives for building your own.

Two boundaries decide most items

Chain of thought is a non-reasoning technique — reasoning models do it internally and their reasoning tokens never appear in message content. And Groundedness requires a judge model deployment while Groundedness Pro does not — the discriminator whenever a scenario forbids deploying an extra model.

Prerequisites

  • Chain-of-thought prompting as "show the reasoning before the answer".
  • That reasoning models emit hidden reasoning tokens billed as output.
  • The evaluator families, and that AI-assisted evaluators use a judge model.
  • evaluation_level and the no-mixing rule.

Learning Objectives

By the end of this lesson you will be able to:

  1. Apply chain of thought where it helps and avoid it where it does not.
  2. Implement a self-critique loop and bound its cost.
  3. Use model-as-judge evaluation, including the Azure OpenAI graders.
  4. Choose between Groundedness and Groundedness Pro on the deployment constraint.
  5. Recognise where reflection is the wrong instrument.

Building Blocks

Chain of thought. A documented prompt technique: ask the model to produce its reasoning before its answer, improving multi-step accuracy. It is listed among techniques for non-reasoning models. For reasoning models, prompt-engineering techniques "aren't recommended", their reasoning is internal, and reasoning tokens never appear in message content.

Self-critique. A generate → critique → revise loop, implemented as additional turns. Each pass is a full generation, so cost and latency roughly multiply by the number of passes.

Model-as-judge. The AI-assisted evaluators are judge models scoring against criteria — Groundedness (1–5), Relevance, Coherence, Fluency, Response Completeness, and the agent family. The Rubric evaluator (preview) scores against written criteria you supply.

Azure OpenAI graders. The building blocks for custom judging:

GraderDoes
Model LabelerAssigns a label from a set you define
Model ScorerProduces a numeric score
String CheckerDeterministic string matching
Text SimilarityCompares against a reference

The judge-deployment distinction. Groundedness is AI-assisted and requires a model deployment. Groundedness Pro (preview) is powered by Azure AI Content Safety, returns binary pass/fail with reasoning, and requires no model deployment.

Three reflection patterns

Attribute
Who examines

The model, before answering

The model, after answering

A separate judge

Cost

More output tokens

A full extra generation per pass

A judge call per case

Runs

In production

In production

In evaluation, usually offline

Boundary

Non-reasoning models only

A wrong model may not notice

Needs a deployment unless using Pro

Deep Dive

Chain of thought, and where it stops applying

Chain of thought works on non-reasoning models because it forces intermediate steps into the output, where each can condition the next. Without it, a multi-step problem is answered in one jump and errors compound invisibly.

The boundary is the exam-relevant part. Reasoning models already do this internally: they generate reasoning tokens before answering, those tokens are billed as output, they never appear in message content, and prompt-engineering techniques "aren't recommended" for these models. Instructing one to think step by step duplicates work it is already doing and can degrade the result.

Two operational consequences follow for reasoning models. You cannot read the reasoning from the response — inspect completion_tokens_details.reasoning_tokens for the count instead. And attempting to extract raw reasoning may violate the acceptable use policy, so a design that depends on reading the model's internal chain is not merely unsupported but discouraged.

The practical rule: if the model reasons internally, tune reasoning_effort; if it does not, prompt for chain of thought.

Choosing a reflection pattern

  1. 1

    Check the model type

    Non-reasoning → chain of thought is available. Reasoning → tune reasoning_effort instead.

Self-critique: what it buys and what it costs

The loop is generate, critique, revise. It genuinely improves output on tasks with checkable properties — did the answer address every part of the question, does it follow the required format, are all claims supported by the provided context.

The costs are concrete. Each pass is a full generation, so a two-pass loop roughly doubles tokens and latency, and reasoning models multiply that further because each pass carries its own reasoning tokens. In an interactive setting the latency is usually the binding constraint.

The limits are more interesting than the cost.

A model that got it wrong may not notice. Self-critique catches carelessness better than misunderstanding: if the model misread the requirement, it will review against the same misreading.

It does not fix missing information. A response that fabricated because retrieval returned nothing will be critiqued against the same empty context. The fix there is retrieval and an explicit out, not another pass.

The loop needs a bound. Critique-and-revise does not converge on its own; fix the number of passes or define a stop condition.

Where a property is checkable deterministically — valid JSON, a required field present, a number within range — validate in code and re-prompt on failure. That is cheaper, faster, and exact, and it is the answer whenever a scenario describes a mechanically verifiable requirement.

Model-as-judge and the graders

Judging is reflection applied by a separate model, and it is how AI-assisted evaluation works: Groundedness, Relevance, Coherence, Fluency, Response Completeness and the agent evaluators are all judge models scoring against criteria.

When the built-in criteria do not match, two levels of customisation exist.

Rubric (preview) scores against criteria you write, which suits domain quality standards that no standard evaluator captures.

Azure OpenAI graders are the primitives. Model Labeler assigns a label from your set — useful for classifying failure types. Model Scorer produces a numeric score. String Checker does deterministic matching, and Text Similarity compares against a reference. Note the last two are not model-based at all, which makes them cheap and exact: a required disclaimer either appears or it does not, and a judge model is the wrong instrument for that.

The essential caution: a judge is a model and can be wrong. Validate it against human labels on a sample before trusting its scores, especially before wiring it into a release gate. And where the requirement is mechanical, prefer the deterministic grader.

Self-critique is not a substitute for grounding

Adding a critique pass to an assistant that fabricates when retrieval fails does not help — the critique sees the same empty context and has the same incentive to produce something. The fixes are retrieval quality and giving the model an out. A scenario offering "add a self-review step" against a fabrication symptom is usually offering the plausible wrong answer.

Where reflection is the wrong instrument

Three cases recur.

Deterministic checks. Schema validity, required fields, numeric ranges, forbidden strings — validate in code or with a String Checker. Asking a model to check something a function can check exactly is slower, costlier, and less reliable.

Safety. Content filtering, Prompt Shields, and the risk and safety evaluators are the instruments. A self-critique step asking the model whether its output was harmful is neither reliable nor a control.

Missing information. Reflection cannot supply facts the model does not have. That is retrieval, function calling, or an explicit out.

Worked Examples

Example 1 — chain of thought on the wrong model. A team adds "think step by step, showing your work" when moving a multi-step task to a reasoning model. Quality falls and cost rises.

Chain of thought is a non-reasoning technique, and prompt-engineering techniques "aren't recommended for reasoning models". The model already reasons internally, with reasoning tokens billed as output and absent from message content. Remove the instruction and tune reasoning_effort per request.

Example 2 — malformed JSON. A generation step occasionally returns JSON missing a required field, and a self-critique pass is proposed.

The property is mechanically checkable: validate in code — or with a String Checker grader in evaluation — and re-prompt on failure. That is exact, cheap, and fast. A critique pass costs a full generation and may still miss it. Specify output structure and prime the output in the prompt as well.

Example 3 — domain quality with no judge allowed. A regulated team must score whether answers are supported by retrieved policy documents, and cannot deploy an additional model.

Groundedness Pro — Azure AI Content Safety, binary pass/fail with reasoning, no model deployment required. The AI-assisted Groundedness evaluator gives a 1–5 trend but requires a judge deployment. For domain-specific criteria beyond grounding, Rubric (preview) would apply — but it is judge-based and subject to the same constraint.

Visual Explanations

Which pattern, and when it is excluded:

Loading Diagram...
Figure 1 — Mermaid diagram

What self-critique cannot fix:

Loading Diagram...
Figure 2 — Mermaid diagram

Common Mistakes

Applying chain of thought to reasoning models. Explicitly non-reasoning.

Trying to read a reasoning model's chain from the response. Never in message content; extraction may violate the AUP.

Using self-critique against fabrication. Same empty context, same incentive.

Leaving a critique loop unbounded. It does not converge on its own.

Using a judge for a deterministic property. String Checker or code is exact.

Trusting a judge without validating it. Compare against human labels first.

Choosing Groundedness when a judge deployment is excluded. Pro requires none.

Treating self-critique as a safety control.

Practice Exercises

  1. When does chain of thought help, when is it excluded, and what replaces it?
  2. Name two things self-critique catches and two it does not.
  3. A required field is sometimes missing from generated JSON. What is the right check?
  4. Name the four Azure OpenAI graders and say which are not model-based.
  5. Which groundedness evaluator survives a ban on deploying an additional model, and what does it return?
▶Answers
  1. It helps non-reasoning models on multi-step tasks by forcing intermediate steps into the output. It is excluded for reasoning models — prompt-engineering techniques "aren't recommended" and CoT is explicitly a non-reasoning technique. The replacement is reasoning_effort, tuned per request.
  2. Catches: carelessness, format violations, partially answered questions — checkable properties. Does not catch: misunderstanding (it reviews against the same misreading) and missing information (the same empty context). It is also not a safety control.
  3. A deterministic check — validate in code, or a String Checker grader in evaluation — and re-prompt on failure. Exact, cheap, and fast, where a critique pass costs a full generation and may still miss it. Also specify output structure and prime the output.
  4. Model Labeler (assigns a label from your set), Model Scorer (numeric score), String Checker (deterministic matching), Text Similarity (compares against a reference). String Checker and Text Similarity are not model-based, which makes them cheap and exact.
  5. Groundedness Pro — powered by Azure AI Content Safety, returning binary pass/fail with reasoning, and requiring no model deployment. The AI-assisted Groundedness evaluator scores 1–5 but needs a judge.

Summary & Concept Map

Reflection comes in three shapes with three boundaries. Chain of thought improves non-reasoning models by forcing intermediate steps into the output, and is explicitly not recommended for reasoning models, whose reasoning is internal, billed as output, and never present in message content — tune reasoning_effort there instead. Self-critique runs a generate–critique–revise loop at the cost of a full extra generation per pass, catching carelessness and format failures while missing misunderstanding and missing information — and it is never a safety control or a substitute for grounding. Model-as-judge is how AI-assisted evaluation works, extended by the Rubric evaluator and the Azure OpenAI graders, of which String Checker and Text Similarity are deterministic and therefore the right tool for mechanically checkable properties. And the recurring discriminator: Groundedness needs a judge deployment; Groundedness Pro does not.

Loading Diagram...
Figure 3 — Mermaid diagram
Loading flashcards…

Sources and freshness

Written against current Microsoft Learn documentation for the AI-103 skills measured (16 April 2026), reviewed 2026-08-20. Microsoft Learn controls every changing product contract — availability, preview status, quotas, limits, regional support, naming, and retirement dates all move independently of this lesson. Where a scenario turns on a specific number or a GA/preview boundary, confirm it against the product's own page before relying on it.

All Developing AI Apps and Agents on Azure (AI-103) Study Resources

Related Notes

  • Choose an appropriate method for retrieval and indexing2,778 words
  • Quick Note — Choose an appropriate method for retrieval and indexing888 words
  • Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools3,097 words
  • Quick Note — Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools1,041 words
  • Choose appropriate memory, tool, and knowledge integration services for agent solutions2,815 words
  • Quick Note — Choose appropriate memory, tool, and knowledge integration services for agent solutions949 words
  • Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing2,733 words
  • Quick Note — Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing901 words
  • Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling2,891 words
  • Configure safety filters, guardrails, risk detection, and content moderation2,795 words
  • Govern agent behavior with oversight modes, constraints, and tool-access controls2,863 words
  • Implement auditing through trace logging, provenance metadata, and approval workflows2,624 words

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Developing AI Apps and Agents on Azure (AI-103) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, top to bottom. Improve or check output connects to Model type?. M connects to Chain of thought available (Non-reasoning). M connects to CoT NOT recommended<br/>tune reasoning_effort (Reasoning). Improve or check output] --> M{Model type? connects to Checkable mechanically?. W connects to Validate in code /<br/>String Checker grader (Yes). W connects to Who checks? (No). J connects to Self-critique<br/>full extra generation per pass (Same model, live). J connects to AI-assisted evaluators /<br/>Rubric / Azure OpenAI graders (Separate judge, offline). 3 more statements.
Loading Diagram...
Flowchart, left to right. Self-critique connects to Catches: carelessness,<br/>format, partial answers. Self-critique] --> Y1[Catches: carelessness,<br/>format, partial answers connects to Misses: misunderstanding -<br/>same misreading twice. Self-critique] --> Y1[Catches: carelessness,<br/>format, partial answers connects to Misses: missing information -<br/>same empty context. Self-critique] --> Y1[Catches: carelessness,<br/>format, partial answers connects to Not a safety control. N2 connects to Fix: retrieval + give it an OUT. N3 connects to Fix: content filters,<br/>Prompt Shields, safety evaluators.
Loading Diagram...
Flowchart, top to bottom. Reflection connects to Chain of thought. Reflection] --> CT[Chain of thought connects to Self-critique. Reflection] --> CT[Chain of thought connects to Model-as-judge. Reflection] --> CT[Chain of thought connects to Wrong instrument. CT connects to Helps NON-REASONING models. CT connects to NOT recommended for reasoning. CT connects to Reasoning tokens never in content. CT connects to Replacement: reasoning_effort. 11 more statements.

Reflection and self-critique — retrieval

Card 1 of 6

Front of flashcard 1 of 6

Chain of thought: where it applies

medium

A non-reasoning technique — it forces intermediate steps into the output. Prompt-engineering techniques "aren't recommended for reasoning models", which reason internally; their reasoning tokens are billed as output and never appear in message content. Tune reasoning_effort instead.

chain-of-thought

Reflection and self-critique — retrieval

Card 1

Front

Chain of thought: where it applies

Back

A non-reasoning technique — it forces intermediate steps into the output. Prompt-engineering techniques "aren't recommended for reasoning models", which reason internally; their reasoning tokens are billed as output and never appear in message content. Tune reasoning_effort instead.

Card 2

Front

What self-critique costs and misses

Back

Each pass is a full extra generation (tokens and latency). It catches carelessness, format violations, partial answers; it misses misunderstanding (same misreading) and missing information (same empty context). It must be bounded — it does not converge on its own.

Card 3

Front

The four Azure OpenAI graders

Back

Model Labeler (label from your set), Model Scorer (numeric score), String Checker (deterministic matching), Text Similarity (against a reference). The last two are not model-based — cheap and exact for mechanically checkable properties.

Card 4

Front

Groundedness vs Groundedness Pro

Back

Groundedness — AI-assisted judge, 1–5, requires a model deployment. Groundedness Pro — Azure AI Content Safety, binary pass/fail with reasoning, no deployment required. The discriminator whenever deploying a judge is forbidden.

Card 5

Front

When reflection is the wrong tool

Back

Deterministic properties (schema, required fields, ranges) → validate in code or with a String Checker. Safety → content filters, Prompt Shields, risk and safety evaluators. Missing information → retrieval, function calling, and giving the model an out.

Card 6

Front

Validating a judge

Back

A judge is a model and can be wrong. Compare its scores against human labels on a sample before trusting them — especially before wiring it into a release gate. Prefer deterministic graders where the property is mechanical.

Reflection and self-critique — retrieval

Card 1

Front

Chain of thought: where it applies

Back

A non-reasoning technique — it forces intermediate steps into the output. Prompt-engineering techniques "aren't recommended for reasoning models", which reason internally; their reasoning tokens are billed as output and never appear in message content. Tune reasoning_effort instead.

Card 2

Front

What self-critique costs and misses

Back

Each pass is a full extra generation (tokens and latency). It catches carelessness, format violations, partial answers; it misses misunderstanding (same misreading) and missing information (same empty context). It must be bounded — it does not converge on its own.

Card 3

Front

The four Azure OpenAI graders

Back

Model Labeler (label from your set), Model Scorer (numeric score), String Checker (deterministic matching), Text Similarity (against a reference). The last two are not model-based — cheap and exact for mechanically checkable properties.

Card 4

Front

Groundedness vs Groundedness Pro

Back

Groundedness — AI-assisted judge, 1–5, requires a model deployment. Groundedness Pro — Azure AI Content Safety, binary pass/fail with reasoning, no deployment required. The discriminator whenever deploying a judge is forbidden.

Card 5

Front

When reflection is the wrong tool

Back

Deterministic properties (schema, required fields, ranges) → validate in code or with a String Checker. Safety → content filters, Prompt Shields, risk and safety evaluators. Missing information → retrieval, function calling, and giving the model an out.

Card 6

Front

Validating a judge

Back

A judge is a model and can be wrong. Compare its scores against human labels on a sample before trusting them — especially before wiring it into a release gate. Prefer deterministic graders where the property is mechanical.