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
- 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
Invariants
- Each question names the specific ambiguity it is asked to resolve.
- The Loop halts when confidence exceeds `ambiguity_threshold` or questions reach `max_questions`, and which one ended it is recorded.
Risks
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.
Relationships
Builds on
Used by
Composes with
Solver implementing the five-surface contract (polymorphic across substrates)
References
High-reliability, high-latency System 2 solver
Reference
Parameters
ambiguity_thresholdFloat, [0.0, 1.0]- Confidence below which the agent asks a clarifying question instead of acting
max_questionsInteger, [1, 3]- Maximum clarification questions before the agent must proceed
