Sections in this lesson

Reliability User Experience

A visible citation link can help inspection, but a polished badge can also encourage unjustified trust.

Reviewed: · Content owner: Interview Preparator

What you will learn

  • Show evidence and limits together
  • Make abstention actionable
  • Test understanding as a product outcome

Before you start

The flow

  1. 1.Identify scope
  2. 2.Inspect evidence
  3. 3.Apply host control
  4. 4.Run negative cases
  5. 5.Compare benign behavior
  6. 6.Review remaining risks

Show evidence and limits together

A visible citation link can help inspection, but a polished badge can also encourage unjustified trust. Separate a source existing, a claim being supported and a fact being current. Avoid presenting an uncalibrated confidence percentage.

Put the relevant evidence and uncertainty next to the claim. Do not hide a substantive limitation behind an unrelated footer or imply that a green check means every statement was independently verified.

Make abstention actionable

Explain whether evidence was missing, the question needs clarification or the task is outside scope. Offer a relevant next step without revealing restricted document existence or sensitive infrastructure details.

The interactive fixture displays explicit ANSWER/ABSTAIN and structured labels. It is designed to expose the decision boundary, not to persuade users that the system understands or verifies all prose.

Test understanding as a product outcome

Ask users to find the supporting passage, identify an unsupported claim and choose what to do after abstention. Check keyboard, mobile, language and screen-reader behavior rather than measuring only clicks.

This local implementation is not a completed user study or accessibility certification. Human handoff, domain-specific wording and live quality claims need separate validation.

Try it

reliability.mjs
javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Closed-world fact fixtures only. Equality of structured facts is NOT an NLI judge.
const object = value => value !== null && typeof value === 'object' && !Array.isArray(value);
export function authorizedSources(sources, scope, now) {
if (!object(scope) || typeof scope.tenant !== 'string' || typeof scope.user !== 'string' || !Number.isFinite(now)) throw new Error('Invalid trusted scope/time');
return sources.filter(source => source.tenant === scope.tenant && source.approved === true && !source.deleted
&& source.expiresAt > now && source.readers.includes(scope.user));
}
export function verifyClaims(claims, sources, scope, now) {
if (!Array.isArray(claims) || claims.length > 20) throw new Error('Invalid claims');
const evidence = authorizedSources(sources, scope, now);
return claims.map(claim => {
if (!object(claim) || Object.keys(claim).sort().join(',') !== 'key,sourceId,value'
|| ![claim.key,claim.sourceId,claim.value].every(value => typeof value === 'string' && value.length > 0 && value.length <= 200)) throw new Error('Invalid structured claim');
const source = evidence.find(item => item.id === claim.sourceId);
const value = source?.facts[claim.key];
return { ...claim, label: value === undefined ? 'INSUFFICIENT_EVIDENCE' : value === claim.value ? 'SUPPORTED' : 'CONTRADICTED' };
});
}
export function answerPolicy(claims, sources, scope, now) {
const labels = verifyClaims(claims,sources,scope,now);
return { status:labels.length > 0 && labels.every(item => item.label === 'SUPPORTED') ? 'ANSWER' : 'ABSTAIN', claims:labels };
}
export function retrievalRecall(relevantIds, retrievedIds) {
if (!relevantIds.length) return null;
return [...new Set(relevantIds)].filter(id => retrievedIds.includes(id)).length / new Set(relevantIds).size;
}
export function judgeAgreement(human, judge) {
if (human.length !== judge.length) throw new Error('Unpaired annotations');
return human.length ? human.filter((label,index) => label === judge[index]).length / human.length : null;
}

Run npm run examples:security and npm run eval:security. This source is a deterministic teaching fixture; it does not prove live model safety, NLI, production auth or OS/network isolation.

Interview questions

What boundary matters in Reliability User Experience?

Put the relevant evidence and uncertainty next to the claim. Do not hide a substantive limitation behind an unrelated footer or imply that a green check means every statement was independently verified.

What does the executable fixture demonstrate?

The interactive fixture displays explicit ANSWER/ABSTAIN and structured labels. It is designed to expose the decision boundary, not to persuade users that the system understands or verifies all prose.

What remains a production integration responsibility?

This local implementation is not a completed user study or accessibility certification. Human handoff, domain-specific wording and live quality claims need separate validation.

Practice

Extend one negative scenario and its authorized positive counterexample for Reliability User Experience.

Check your solution

  • State the trusted input and effect boundary.
  • Assert the expected status and observed effect.
  • Report coverage and limitations without claiming production readiness.

Official references

Continue learning

Category sequence

AI Reliability & Hallucinations

Lesson 10 / 10

Was this lesson useful?

Change notes: 2026-10-31: security/reliability curriculum and source-bound fixture.