Documentation
¶
Overview ¶
Package governance turns explicit retrieval outcomes into conservative evidence reliability estimates. It does not rank results itself; keeping measurement separate from policy lets the estimates be evaluated before they influence retrieval.
Index ¶
Constants ¶
const ( // Sparse observations are too easy to overinterpret. Until this many // outcomes exist, evidence remains neutral in any downstream policy. MinCredibleObservations = 3 // CredibilityK controls how quickly evidence-specific experience earns // weight. At n=5, individual experience receives half the weight. CredibilityK = 5.0 )
Variables ¶
This section is empty.
Functions ¶
func AssessMany ¶
func AssessMany(ctx context.Context, db *sql.DB, projectID int64, evidenceKeys []string) (map[string]Assessment, error)
AssessMany evaluates a result set in bounded batches, avoiding one query and one busy-timeout window per candidate. Keys without observations are returned as explicitly neutral assessments.
Types ¶
type Assessment ¶
type Assessment struct {
EvidenceKey string
Observations int
Positive int
Negative int
Credibility float64
Reliability float64
Neutral bool
}
func Assess ¶
Assess estimates reliability with beta smoothing and actuarial credibility. The portfolio prior is deliberately 1.0: without enough evidence, this observer cannot penalize an otherwise relevant memory.