Skip to content

Complementary tools: contract-first generation + runtime validation (Correctover)Β #2

Description

@Correctover

Complementary Tools: Contract-First + Runtime Validation

Hi! πŸ‘‹

Contrix is doing something really interesting β€” contract-first structured output for local LLMs. We've built a complementary tool called Correctover (https://correctover.com) that operates at the runtime validation layer.

The overlap & the gap

Contrix ensures the LLM produces structured output matching a contract at generation time.
Correctover validates LLM outputs after generation across 6 dimensions (schema, semantic equivalence, latency, observability, policy, custom) and self-heals failures.

Together they'd cover the full lifecycle:

  1. Contract definition (Contrix) β†’ Define what good output looks like
  2. Structured generation (Contrix) β†’ Guide the LLM to produce correct output
  3. Runtime validation (Correctover) β†’ Verify the output actually meets the contract
  4. Self-healing (Correctover) β†’ Auto-recover when validation fails

Correctover at a glance

  • 6-dimension CANON validation (22ΞΌs P50 latency)
  • 3-level self-healing: L1 retry β†’ L2 degradation β†’ L3 failover (97.4% recovery rate)
  • Drift detection with flywheel learning (88 rules from 20K+ calls)
  • Circuit breaker + MCP Server support
  • BYOK native β€” zero proxy overhead

Integration idea

Contrix could expose a validation hook where Correctover's contract checks run after generation:

// Contrix generates structured output
const result = await contrix.generate(prompt, schema);

// Correctover validates + self-heals if needed  
const verified = await correctover.validate(result, {
  contract: schema,
  provider: 'ollama/llama3',
  selfHeal: true
});

Benchmark data

We ran 20,071 calls across 9+ providers. Key findings:

  • Schema validation alone catches ~40% of failures
  • Adding semantic equivalence catches another ~30%
  • Self-healing recovers 97.4% of recoverable failures
  • Total validation overhead: ~22ΞΌs (negligible)

Would love to explore how these tools could work together. Happy to provide a PoC or share our benchmark methodology.


PyPI: https://pypi.org/project/correctover/
Website: https://correctover.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions