Retrieval-augmented generation
Good answers start with evidence.
Explore the decisions behind a fictional order platform. Find relevant architecture notes, then ask a local LLM to suggest a design-review question.
01 / Ask
Inspect a design decision
Eight authored decision notes cover delivery, inventory, schemas, release safety, and observability. Ask about those topics.
Ready. Try a sample question.
02 / Retrieve & inspect
Evidence workspace
Sources will appear here with their retrieval scores. The LLM review question is generated separately.
LLM review question · check its premise
Architecture, model & limitations
This app indexes eight fictional architecture decision records with BM25 lexical retrieval. The top three sufficiently matching notes are displayed; the highest-ranked note forms the LLM context to keep the small model focused. Question drafting uses LaMini-Flan-T5-248M, pinned ONNX weights, 8-bit quantization, and Transformers.js 3.8.1 in a Web Worker using WebAssembly. No hosted inference endpoint or API key is involved. Runtime files and model weights are downloaded from jsDelivr and Hugging Face; prompts are not sent to a model server.
A small model can hallucinate and is not a production architecture reviewer. Citation checks validate IDs, not the truth of a claim. Retrieval is lexical rather than semantic; synonym mapping is limited. Missing evidence stops generation. Source notes and prompts cannot execute code. This is an original portfolio demo using an existing pretrained model, not a model I trained.
Run retrieval evaluations
The suite checks expected source coverage and missing-evidence behavior on ten authored fixtures. It evaluates retrieval, not LLM answer quality, and is not an independent benchmark.
Not run in this session.