Decision Architecture
Closed-loop system for EQ assessment, intent detection, and validation.
Overview
The decision architecture is a closed loop that runs once per user message through a five-state conversation machine. The state machine operates independently of the LLM. It controls what the model sees, not the other way around.
EQ assessment opens each pass. Measurement closes it. Scores adjust scripts before the next message arrives.
The Decision Loop
EQ Assessment
Evaluates emotional state and communication style of the incoming message.
Intent Detection
Determines what the user wants, filtered through how they feel.
Listening Layer
Extracts explicit facts and implicit signals.
State Node
Routes to INIT, GREETED, ENGAGED, CONTEXT_RICH, or RESOLVED.
Executable Scripts
Runs pre-reasoning, validation, and post-reasoning scripts.
Persona + LLM
Applies RICE definition for model-agnostic generation.
Measurement
Scores ICS, VCS, MCS, CFS, and DR. Scores adjust scripts for the next loop.
Conversation States
| State | Entry Condition | Available Behaviors |
|---|---|---|
| INIT | Session start | Greeting scripts, persona introduction |
| GREETED | User responds | Discovery, context building |
| ENGAGED | Fact density threshold | Deep conversation, recommendation |
| CONTEXT_RICH | Trust indicators | Goal steering, personalized responses |
| RESOLVED | Resolution markers | Wrap-up, next steps, handoff |
Transitions fire on signals from the listening layer (fact density, trust indicators, resolution markers), not turn count. Every transition is logged with triggering evidence.
Listening Layer
The listening layer operates in two modes:
Explicit extraction: facts, preferences, constraints stated directly by the user.
Implicit inference: frustration patterns, trust signals, confusion markers, energy matching.
Both feed the state machine and the EQ assessment that opens each pass. Context injection runs fresh each turn. The system does not rely on the model remembering.
Scripts
Scripts are deterministic. Their effects show in the output. An observer can audit what fired without access to system internals.
| Script Type | When It Runs | Purpose |
|---|---|---|
| Pre-reasoning | Before LLM call | Context injection, persona reinforcement |
| Validation | After LLM response | ICS/VCS scoring, drift detection |
| Post-reasoning | Before delivery | Response adjustment, fact extraction |
Auditability
Each state gates available scripts and constrains persona behavior. Every transition, script execution, and score is logged. The system is fully auditable without access to internal state.
Model Switch Protocol
Swap models mid-conversation. The persona layer rebuilds context each turn. The incoming model never knows it replaced another.
- Current state, facts, and RICE definition are preserved in the persona layer
- New model receives full context injection on its first turn
- ICS is scored against the same persona embedding
- If ICS drops below threshold, the response is regenerated