Wayfinder6's picture
Initial commit: Nova Triangle — three small models that correct each other
13bc746 verified
"""
TriangleResult — What comes back when three models deliberate.
"""
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class TriangleResult:
"""The output of a triangulated inference."""
answer: str
"""The converged answer (or best candidate if no convergence)."""
confidence: float
"""0.0 to 1.0. How much the three models agreed."""
converged: bool
"""True if all three models reached consensus."""
disagreement: dict = field(default_factory=dict)
"""Where the models diverged. Keys are model names, values are their raw answers."""
flag: Optional[str] = None
"""If disagreement was significant, this describes what they fought about.
A flag is signal, not failure. It means the models found something worth examining."""
raw_responses: list = field(default_factory=list)
"""The unprocessed response from each model, in order."""
steering_model: Optional[str] = None
"""Which model steered this round (proposed the answer the others evaluated)."""
rounds: int = 1
"""How many deliberation rounds it took to converge (or max_rounds if it didn't)."""