---
slug: "SocraticLoop"
name: "SocraticLoop"
type: "Reasoning"
layer: "Mind"
ref: "SocraticLoop#4f17"
sema_id: "sema:SocraticLoop#mh:SHA-256:4f17ec8b7e28b3f223931274df090225572d754cd772fe4f738c922f16f93a18"
tags: ["Mind","Reasoning"]
updated: 2026-11-11
mindscape: "bootstrap"
index_url: https://mindscape.world/scapes/bootstrap.json
url: https://mindscape.world/bootstrap/SocraticLoop/
related: ["Agent","Dialectic","Loop","Prompt","PolymorphicSolver","RigorousSolver"]
---

# SocraticLoop

Clarification before generation

Layer: Mind · Category: Reasoning

## Mechanism

Ambiguity detection loop. If Confidence([Prompt](https://mindscape.world/scapes/bootstrap/Prompt.md)) < Threshold, [Agent](https://mindscape.world/scapes/bootstrap/Agent.md) pauses execution to query the user. [Loop](https://mindscape.world/scapes/bootstrap/Loop.md) continues until intent is disambiguated or max_questions reached. It engages the user in a [Dialectic](https://mindscape.world/scapes/bootstrap/Dialectic.md) exchange to progressively narrow the ambiguity space.

## Invariants

- Each question names the specific ambiguity it is asked to resolve.
- The [Loop](https://mindscape.world/scapes/bootstrap/Loop.md) halts when confidence exceeds `ambiguity_threshold` or questions reach `max_questions`, and which one ended it is recorded.

## Preconditions

- Ambiguity detected
- User prompt received

## Postconditions

- Either intent is disambiguated, or the bound was reached and the remaining ambiguities are stated with the best-guess fallback

## Failure modes

- Premature stop: a vague answer is accepted and the ambiguity treated as resolved.
- Budget spent without resolution: `max_questions` reached having clarified nothing.
- Clarification the user cannot give: the question is well-aimed and unanswerable.

## Parameters

- `ambiguity_threshold` (Float, [0.0, 1.0]): Confidence below which the agent asks a clarifying question instead of acting
- `max_questions` (Integer, [1, 3]): Maximum clarification questions before the agent must proceed

## Builds on

- [Agent](https://mindscape.world/scapes/bootstrap/Agent.md) (Mind; References)
- [Dialectic](https://mindscape.world/scapes/bootstrap/Dialectic.md) (Mind; References)
- [Loop](https://mindscape.world/scapes/bootstrap/Loop.md) (Infrastructure; References)
- [Prompt](https://mindscape.world/scapes/bootstrap/Prompt.md) (Infrastructure; References)

## Used by

- [PolymorphicSolver](https://mindscape.world/scapes/bootstrap/PolymorphicSolver.md) (Mind; Composes with)
- [RigorousSolver](https://mindscape.world/scapes/bootstrap/RigorousSolver.md) (Mind; References)

## Identity

- Sema ID: `sema:SocraticLoop#mh:SHA-256:4f17ec8b7e28b3f223931274df090225572d754cd772fe4f738c922f16f93a18`
- Ref: `SocraticLoop#4f17`
- Supersedes:
  - `sema:SocraticLoop#mh:SHA-256:70fcba46b7510f6f8714fc119564272f465c3aa17d49785d57a97c9b5294a6c0`
  - `sema:SocraticLoop#mh:SHA-256:7d528905a96b5774a2e16f7cb7b9fa50845c3bdb03549a2322889d7560d17f8e`
  - `sema:SocraticLoop#mh:SHA-256:e96688452f2c5ff80fee6c3326d694f1e32b051acc62176e7f2d1de61565da6e`
  - `sema:SocraticLoop#mh:SHA-256:fd221588fb9a754e02033f9d09f86423f60e67aeea1914fa5088cb20d8699e5e`

## Links

- [Pattern page](https://mindscape.world/bootstrap/SocraticLoop/)
- [View in the interactive graph](https://mindscape.world/bootstrap/#SocraticLoop)
- [JSON](https://mindscape.world/scapes/bootstrap/SocraticLoop.json)
- [Index of all patterns](https://mindscape.world/scapes/bootstrap.json)
