Confidence Scoring Kit
Assign and maintain confidence scores for every fact based on source quality and corroboration.
Configuration
Avg Score
0.72
High Conf
2
40% of total
Low Conf
1
20% of total
Fact Confidence Scores
API rate limit is 1000 req/min
3 sources · 2 corroborations · 2d
0.92
Auth uses JWT tokens
2 sources · 1 corroborations · 5d
0.88
Max payload size: 10MB
1 sources · 0 corroborations · 1d
0.75
Webhooks retry 3 times
1 sources · 0 corroborations · 12d
0.45
Supports GraphQL endpoint
2 sources · 1 corroborations · 8d
0.62
Scoring Pipeline
ScoreBayesian posterior: 0.89
Sources3 sources, avg reliability: 0.82
Corroborate2 independent confirmations
DecayAge penalty: -0.02
Integration Code
import { createConfidenceScoring } from 'agent-tools-kit/knowledge-evolution'
const scorer = createConfidenceScoring({
model: 'bayesian',
decayEnabled: true,
decayRate: 0.01,
})
const facts = [
{ id: 'f1', text: 'API rate limit is 1000 req/min', sources: [...] },
{ id: 'f2', text: 'Auth uses JWT tokens', sources: [...] },
]
const results = await scorer.evaluate(facts)
// results: [{ id: 'f1', score: 0.92, breakdown: { sourceQuality: 0.88, corroboration: 0.95, decay: -0.01 } }]
scorer.on('score-updated', (fact) => {
console.log(`${fact.id} confidence changed to ${fact.score}`)
})