Case study

01 Trustworthy source-grounded retrieval

Danish Immigration RAG

Find answers about Danish immigration with the source passages beside them.

What I built
A local web assistant that retrieves source passages, answers with a local model, and keeps citations and freshness signals visible.
My contribution
I owned the user problem, scope, acceptance criteria, product boundaries, and test runs. AI coding agents helped draft implementation, tests, documentation, and development plans.
Important limit
The bundled corpus uses fixtures. This is not production-qualified, legal advice, or an eligibility decision.

Workflow recording

Actual execution recording — a typed sample question, local model answer and evidence inspection using a fixture corpus. The model wait is shortened. This is not current immigration guidance.

A sample PD3 question is typed and sent to the local model. The answer appears, then a claim’s evidence is opened. The recording uses fixture sources, not current immigration guidance.

Public source ade2b2810c0b0390e34657eafd15d06a0704946a; isolated local app, recorded 8 September 2026.

For people navigating Danish immigration information, a fluent answer is not enough: they need to see where it comes from.

What works
The recorded machine evaluation completed 20 surfaces without execution errors; semantic accuracy still needs independent human adjudication.
Key decision
Keep answers local and qualify or refuse conclusions that the available sources cannot support.
Next milestone
Review archived official sources and independently adjudicate the missing semantic metrics before a strict release evaluation.
Snapshot
Public repository evidence / main at ade2b28
Evidence date
2026-08-18

Intent

Why this work exists. The problem worth solving and the human judgment that frames it.

When an answer cannot outrun its sources

The trust problem begins when fluent language appears more certain than the material beneath it. This project keeps source identity, version, supporting passages, and the stopping rule close to the answer so a visitor can inspect the boundary instead of inferring it from tone.

Release authority stays with a reviewer

A person decides which sources are authoritative enough to enter the corpus, which claims require qualification or refusal, how changed material is handled, and whether the resulting evidence is safe and accurate enough to present. The retrieval layer prepares a record; it does not grant authority.

Problem
Policy questions become unsafe when a fluent answer hides which official material supports it, which source version was reviewed, or where the available evidence stops.
Constraints
Keep retrieval local and inspectable rather than depending on an opaque hosted corpus. Attach citations to the answer and distinguish source review from generated prose. Refuse or qualify unsupported conclusions instead of presenting legal guidance as certainty. Keep the answer path local-only and separate it from explicit, user-approved knowledge-release updates.

Build

How the work was shaped. The workflow, tailoring, present capability, and next useful step.

Six handoffs behind one evidence-bounded response

Candidate material moves through source review, local ingest, retrieval, citation, evaluation, and release qualification. Each handoff leaves a small record that can be checked independently; the generated answer is never the only artifact in the workflow.

Build around source, citation, and refusal seams

The development workflow is sliced at source approval, retrieval, citation, response checking, and release qualification seams. Each slice can be reviewed independently, while the content contract fails closed until evidence provenance, limitation language, and disclosure status are present.

A local assistant with its evidence trail attached

The public project implements a loopback-only web assistant, hybrid local retrieval, local generation, citations, source freshness, refusal behavior, signed knowledge-release verification, and rollback. Its machine evaluation completed all 20 surfaces, while deliberately withholding strict qualification where human semantic judgment is missing.

Close the human qualification gaps

The next milestone is a production-candidate release built from archived official pages and named human review records, followed by independent adjudication of required facts, forbidden claims, privacy requirements, citation relationships, and unsupported-claim rate.

Project workflow

  1. Source review — Check authority, scope, version, and public-use boundary.
  2. Local ingest — Prepare an inspectable local corpus with stable source identity.
  3. Retrieve — Surface passages that match the question and preserve their source trail.
  4. Cite — Keep answer claims beside the passages that support them.
  5. Evaluate — Check support, changed-source behavior, and refusal boundaries.
  6. Qualify release — Hold publication until evidence and limitations are reviewed by a person.

Development workflow

  1. Frame — State the visitor question and the exact evidence seam under test.
  2. Contract — Define content, disclosure, citation, and no-overclaim requirements.
  3. Slice — Implement one visible retrieval and review path at a time.
  4. Check — Exercise content, browser, accessibility, and fallback behavior.
  5. Review — Inspect claims, source boundaries, limitations, and presentation together.
  6. Qualify — Record what is controlled, recorded, or still unverified before release.

Proof

What the evidence supports. The demonstration worth inspecting and the boundary it cannot cross.

Public records and the recorded workflow

The reviewed repository, architecture, evaluation quality bar, and source-governance record support this case study; their optional public links are withheld. The recording shows a sample question, a local model answer and evidence inspection using fixture sources, with the model wait shortened. It is not current immigration guidance. The separate synthetic workflow evidence illustrates decision boundaries rather than a recorded source-change event.

What this dossier deliberately refuses to claim

The assistant is not legal advice and does not decide eligibility. The public source registry says its bundled documents are project-authored fixtures rather than reviewed official snapshots, and five release-blocking semantic metrics remain not evaluable without an independent reviewer. Passing machine checks therefore does not establish production qualification.

Synthetic workflow evidence

  • Before / Unsupported draft — Support trace

    Claim: Drafted · Citation: Missing · Hold / Held for review

  • Decision / Source reviewed — Source review

    Source: Versioned · Scope: Narrowed · Review / Scope narrowed

  • After / Bounded response — Release record

    Answer: Qualified · Citation: Attached · Bounded / Citation attached

Named human decisions

  1. Choose what can enter the corpus

    A human reviewer decides which source material is authoritative, current enough, and safe to expose in a public case study.

    Why: Retrieval quality cannot repair a source that is out of scope, private, stale, or presented without the context needed to interpret it.

  2. Keep unsupported answers bounded

    A human reviewer defines when the system must qualify, refuse, or point back to the source instead of filling an evidence gap.

    Why: A confident answer is not evidence of eligibility, legal advice, or current policy, so the boundary must remain visible in the release decision.

  3. Qualify the release claim

    A human reviewer decides whether the available validation supports a public explanation and names the limitations that remain.

    Why: Schema completeness and passing checks make the dossier inspectable; they do not authorize factual or publication approval.

Validation provenance / status

  • Public evaluation report / 2026-07-14

    Evidence date: 2026-07-14 · Status: recorded · Environment: Windows 11 with WSL2 Ubuntu and local Ollama · Evidence type: Machine execution and hash-bound workflow evidence

    Result: All 20 evaluation surfaces completed with zero execution errors; citation coverage, answer behavior, trust indicators, and six automated workflows passed their recorded checks.

    Provenance: Public evaluation quality bar and its linked machine-readable report in the project repository.

    Material limitations: Five release-blocking semantic metrics remain not evaluable because independent human adjudication is absent; strict release qualification is false.

  • Source registry production qualification

    Evidence date: 2026-08-18 · Status: unverified · Environment: Signed local knowledge-release workflow · Evidence type: Governance contract and production-blocking registry state

    Result: The repository implements explicit source states, signed manifests, integrity checks, user-approved installation, and atomic rollback boundaries.

    Provenance: Public source-governance document and repository implementation at the reviewed main commit.

    Material limitations: The bundled corpus contains project-authored fixtures; official snapshots and named human source-review records are still required for production qualification.

Bounded proof: This project does not provide legal advice or eligibility decisions. Its public repository proves a local application and governance machinery, but the bundled knowledge release is fixture-based, five semantic metrics lack independent adjudication, and the work is not production-qualified.

All projects