Experiment 03 / Retrieval-augmented generation
Bring
receipts.
A question goes in. An answer comes out. Open the hood and follow everything in between.
Desk Sentinel · online · 22°C · quiet desk
Readings changed since this request. Its captured snapshot stays fixed. Run again to use the new evidence.
Change readings ↗Let’s interrogate a tiny machine.
Send a question through a tiny pretend backend. Watch the services pass it along, then inspect what each one did.
A backend you can see through
Follow the question.
REAL DATA FLOW
Device → telemetry → device twin
Change temperature, light & motion ↗Camera → vision worker → observations
Change the sample scene ↗Documents → chunking → search index
Open the six source notes ↓Upstream paths above show a production design. Here, Things and Eyes save browser state; six authored notes stand in for an indexed knowledge base.
Answer service
- In a real backend
- On this playground
Run a request to inspect its data.
No request yet. The answer service combines your question, a state snapshot, and retrieved source notes.
One browser worker plays all five services. No HTTP request, cloud database, embedding model, or language model runs here. The service boundaries show where those pieces would live.
Back in the browser
The answer.
With receipts.
The backend builds it. This page displays it. Run a question to see the response arrive.
The RAG bit, without the hand-waving
Find the relevant note.
Match your question against this little collection of documents. Similar words find candidate notes; they do not prove a question is answerable.
Use actual context.
Combine the retrieved note with the simulation’s current readings.
Show the evidence.
Cite the note only for a supported question. A small set of recognized question patterns gates this demo; other phrasing gets a refusal, even when some words match.
In a full RAG system, a language model can generate the response from retrieved context. Here, authored templates make the grounding mechanics visible and deterministic.
GO AGAIN / 01Change the evidence. Ask again.