Mind · Reasoning

SocraticLoop

Clarification before generation

Definition

Mechanism

Ambiguity detection loop. If Confidence(Prompt) < Threshold, Agent pauses execution to query the user. Loop continues until intent is disambiguated or max_questions reached. It engages the user in a Dialectic exchange to progressively narrow the ambiguity space.

Preconditions

  1. Ambiguity detected
  2. User prompt received

Postconditions

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

Invariants

  1. Each question names the specific ambiguity it is asked to resolve.
  2. The Loop halts when confidence exceeds `ambiguity_threshold` or questions reach `max_questions`, and which one ended it is recorded.

Risks

Failure modes

  1. Premature stop

    a vague answer is accepted and the ambiguity treated as resolved.

  2. Budget spent without resolution

    `max_questions` reached having clarified nothing.

  3. Clarification the user cannot give

    the question is well-aimed and unanswerable.

Relationships

Builds on

References

Agent

Autonomous Goal-Directed Entity

Dialectic

Internal Thesis-Antithesis-Synthesis loop

Infrastructure

Loop

Repeated execution cycle

Infrastructure

Prompt

Structured instruction to a generative model, optionally role-tagged

Used by

Composes with

PolymorphicSolver

Solver implementing the five-surface contract (polymorphic across substrates)

References

Reference

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

Identity

Ref
SocraticLoop#4f17
Sema ID
sema:SocraticLoop#mh:SHA-256:4f17ec8b7e28b3f223931274df090225572d754cd772fe4f738c922f16f93a18
Ring
2
Tier
2
Updated
2026-11-11
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