liveBook · Manning

Self-consistency

As explained in Prompt Engineering in Practice

Self-consistency is a sampling technique that generates multiple reasoning paths and selects or aggregates the conclusion that is most consistent across them.

Self-consistency tests whether independent full responses converge on the same substantive conclusion, even when their wording differs. Use it for analytical tasks with multiple valid reasoning paths and one shared conclusion to find. For bare labels, use mode; for a single numeric value, use mean. section 8.4

Run the comparison as a repeatable workflow:

  • Generate independent responses to the same task. section 8.4.2
  • Normalize each response into a short structured view, such as trigger, impact, and corrective action. section 8.4.2
  • Identify shared conclusions and material divergences. If responses disagree materially, increase the sample size or escalate for analyst review rather than forcing agreement. section 8.4.2

Incident root-cause drafts

For an incident following checkout-api v2.18.4, compare independent drafts on the trigger, impact, and corrective action. The drafts can agree that deployment preceded degradation and rollback restored service while differing on whether database pressure caused the incident. Treat unsupported causal claims as divergences, not as established facts. section 8.4.1 section 8.4.2

Field

Generation 1

Generation 2

Generation 3

Trigger

Deployment of v2.18.4

Deployment caused degradation

Rollout of v2.18.4 at 14:03

Impact

Error spike, DB connection pool saturation

Error budget exceeded, DB pool saturation

Error increase, DB pool saturation alerts

Causal framing

Symptom stated, no causal link drawn

Deployment caused resource pressure (inferred)

Sequence suggests connection pressure (hedged)

Corrective action

Rollback, stabilize on previous version

Rollback, telemetry review, predeploy guard

Rollback at 14:12, stabilize on previous build

Compare three incident drafts by trigger, impact, causal framing, and corrective action to see where conclusions align or diverge. section 8.4.1

When complete responses do not converge and the goal is to select the strongest candidate against predefined criteria, best-of-N may fit better than seeking agreement. section 8.4.2

How Prompt Engineering in Practice covers it

How deep it goes
Details generation, normalization, and comparison, and recommends more sampling or analyst review when responses materially diverge.
Examples
Compares incident root-cause drafts about deployment, checkout degradation, database pressure, and rollback.
What you can do after
Apply it by generating independent responses, comparing normalized conclusions, and escalating material disagreement.
How it connects
Contrasts self-consistency with mode, mean, and best-of-N for different output types and selection goals.

Also explained in

Compare how 6 books explain self-consistency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Prompt Engineering in Practice. The section links point to the parts of the book it draws on.