Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'
This commit is contained in:
52
vendor/ruvector/docs/adr/coherence-engine/ADR-CE-016-ruvllm-coherence-validator.md
vendored
Normal file
52
vendor/ruvector/docs/adr/coherence-engine/ADR-CE-016-ruvllm-coherence-validator.md
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# ADR-CE-016: RuvLLM CoherenceValidator Uses Sheaf Energy
|
||||
|
||||
**Status**: Accepted
|
||||
**Date**: 2026-01-22
|
||||
**Parent**: ADR-014 Coherence Engine Architecture
|
||||
|
||||
## Context
|
||||
|
||||
RuvLLM's `CoherenceValidator` currently uses heuristic scoring to detect:
|
||||
- Semantic inconsistency
|
||||
- Factual contradictions
|
||||
- Logical errors
|
||||
|
||||
These heuristics are:
|
||||
- Pattern-based (can be fooled)
|
||||
- Not mathematically grounded
|
||||
- Difficult to explain
|
||||
|
||||
## Decision
|
||||
|
||||
**RuvLLM CoherenceValidator uses sheaf energy, not heuristic scores.**
|
||||
|
||||
Integration:
|
||||
```rust
|
||||
pub struct SheafCoherenceValidator {
|
||||
graph: SheafGraph,
|
||||
gate: CoherenceGate,
|
||||
inner: CoherenceValidator, // Fallback
|
||||
}
|
||||
```
|
||||
|
||||
Process:
|
||||
1. Convert context and response to sheaf nodes
|
||||
2. Add edges for semantic implications
|
||||
3. Compute coherence energy
|
||||
4. Gate decision replaces heuristic score
|
||||
|
||||
## Consequences
|
||||
|
||||
### Benefits
|
||||
- Mathematical proof of inconsistency, not pattern matching
|
||||
- Explainable: can show which edges have high residuals
|
||||
- Unified with Prime-Radiant governance
|
||||
|
||||
### Risks
|
||||
- Requires embedding quality for node states
|
||||
- Edge creation logic needs domain expertise
|
||||
|
||||
## References
|
||||
|
||||
- ADR-014: Coherence Engine Architecture, "RuvLLM Integration"
|
||||
- ruvllm/src/quality/coherence.rs
|
||||
Reference in New Issue
Block a user