Files
noema/migrations/0021_source_reliability.up.sql
Andy Dixon cff87af28d feat(beliefs): source reliability by domain, never global
A source's track record is kept per (evidence family, belief subject) and
updated only by outcomes: predictions derived from a belief resolving, and
operators marking a belief wrong. With three or more outcomes in a domain
the record adjusts the credibility of that source's new evidence in that
domain, and the adjustment is written on the evidence row. Standing in one
domain never moves standing in another, and the trust-level credibility
constants are never rewritten. Migration 0021 is additive; belief pages
show each cited family's record in the belief's domain.
2026-08-10 23:14:38 +01:00

14 lines
741 B
SQL

-- Contextual source reliability (review pass §7.2 item 14). Reliability is
-- recorded per (source family, domain) from prediction outcomes and operator
-- corrections; a source's standing in one domain never moves its standing
-- in another, and the trust-level credibility itself is never rewritten.
CREATE TABLE source_reliability (
mind_id uuid NOT NULL REFERENCES minds(id),
source text NOT NULL, -- evidence family, e.g. actor:andy, source:prometheus:prod
domain text NOT NULL, -- belief subject the outcome concerned
correct integer NOT NULL DEFAULT 0,
wrong integer NOT NULL DEFAULT 0,
updated_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (mind_id, source, domain)
);