aRustyDev / aRustyDev/ccgram

Implement hard confidence gate

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
model
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary
Implement a confidence gating mechanism that decides whether to use lookup or fall back to neural generation.

## Success Criteria
- [ ] Confidence score computed from n-gram statistics
- [ ] Threshold tuning mechanism
- [ ] Gate can be adjusted at inference time
- [ ] Metrics tracked: gate hit rate, confidence distribution
- [ ] A/B comparison infrastructure ready

## Confidence Metrics (Candidates)
- Raw count threshold
- Probability vs uniform baseline
- Entropy of continuation distribution
- Coverage (% of vocabulary seen)

## Interface
\`\`\`python
def should_use_lookup(context: list[str], threshold: float = 0.8) -> tuple[bool, float]:
"""Returns (use_lookup, confidence_score)"""
...
\`\`\`

## Open Questions
- Should threshold vary by position in sequence?
- How to handle partial matches (2-gram when 3-gram fails)?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.