A supplier certification, a public budget allocation and a suspicious transaction report look like three different compliance worlds. They are three instances of the same claim: figure · method · boundary · year · issuer, followed by evidence that either reconciles or does not. One schema, one scoring rule, three questionnaires generated from it.
Leave a field empty on purpose. Nothing negotiates: the claim is complete and reconciles with its register, or it goes back to whoever authored it, with the missing part named.
Spring emits this JSON per certification, conformity or ESG claim type. Angular renders it. Nobody hand builds a form, and a new certification is a new row, not a new release.
-
The response is stored whole. The verdict is computed at write time, never inferred later. The embedding is built from the claim text only, so semantic search finds similar claims rather than similar respondents.
-
The shell. Self serve: a supplier signs in and sees only the questionnaires bound to their own contact.
Renders the JSON. Validation, required parts and conditional pages live in the schema, not in components.
Generates one schema per certification, conformity or ESG claim, and owns the scoring rule so the client cannot argue with it.
Issued, answered, resubmitted by the counterparty. No analyst re-keys anything.
Answers as jsonb, verdict as a column, claim text as an embedding. Filter exactly, retrieve by meaning.
CREATE TABLE survey_response (
id bigserial PRIMARY KEY,
survey_id text NOT NULL, -- which schema version was answered
respondent_id text NOT NULL, -- supplier, programme owner, reporting officer
submitted_at timestamptz NOT NULL DEFAULT now(),
answers jsonb NOT NULL, -- the whole SurveyJS result, untouched
verdict text NOT NULL, -- computed at WRITE time
missing text[] NOT NULL DEFAULT '{}',
evidence_seen int, evidence_expected int,
embedding vector(1536) -- built from the claim text only
);
CREATE INDEX ON survey_response USING hnsw (embedding vector_cosine_ops);
CREATE INDEX ON survey_response USING gin (answers jsonb_path_ops);
CREATE INDEX ON survey_response (verdict, submitted_at DESC);
-- "which suppliers claimed something like this, and did it hold?"
SELECT respondent_id, verdict, missing, answers->'claim'->>'figure'
FROM survey_response
WHERE verdict <> 'VERIFIED'
ORDER BY embedding <=> :query_embedding
LIMIT 20;
It does not decide whether a supplier is ethical, whether a budget line is wise, or whether a transaction is criminal. It decides whether the claim about it is complete and reconciles with the record that already exists. Those are different questions, and only the second one is answerable without discretion. Everything above is deterministic: no model, no network once loaded, no clock branch, no random. Reference extracts are authored here, so no figure belongs to any real counterparty.