EXPERIMENT 001SourceDesk
Find evidence in documents before writing an answer.
IN EVERYDAY WORDSLike searching a filing cabinet: rank the most relevant folders first, open the original source and check whether the evidence actually answers the question.
The problem
When people ask a question about policy documents, a system must first find relevant text. SourceDesk isolates that retrieval step and lets you compare two simple search methods.
Architecture flow
01 · Enter a query→02 · Normalize words→03 · Rank documents→04 · Inspect sources→05 · Evaluate retrieval
01Enter a query+
The user searches a fictional policy library, optionally selecting a category.
Example result: Query: lost laptop security
02Normalize words+
The browser converts text into simple English token sequences; this removes some formatting differences but does not understand synonyms.
Example result: Tokens: lost, laptop, security
03Rank documents+
BM25 uses word frequency and document length; an alternate keyword-overlap mode counts distinct matching tokens.
Example result: Ranked document IDs and lexical scores
04Inspect sources+
Matching excerpts and full source text can be opened. You see which words matched rather than receiving an unsupported generated answer.
Example result: Passage, title and highlighted tokens
05Evaluate retrieval+
Six hand-written sample queries check whether the expected source appears first and compute MRR@5.
Example result: Top-1 / MRR@5 on fictional fixtures
TRY THIS EXAMPLEFollow a real use case
Search “lost laptop security.” Inspect the top-ranked policy passage, then change from BM25 to keyword overlap. The ranking may change because the algorithms weight matching terms differently.
TOOLS AND RESPONSIBILITIESHow it is built
Vanilla JavaScript ranking functions (`search.js`), user interface (`app.js`), fictional documents (`data.js`), and a separate minimal Python CLI baseline (`search.py`).
Limits — what this is not
Pure browser retrieval demo. No LLM, embeddings, RAG generation, external API or vector database. Imported .txt documents remain in browser memory until reload; no PDF/OCR parser. The six-query sample is not proof of real-world search accuracy.
EXPERIMENT 002EvalBench
Catch answer changes with transparent regression checks.
IN EVERYDAY WORDSLike a spell-checker that compares an old answer and a new answer against a known reference. It can spot missing phrases, but it cannot judge whether two differently worded answers mean exactly the same thing.
The problem
When a response system changes, developers need to see which previously satisfactory answers became worse. EvalBench compares fixed answer sets using explicit lexical rules.
Architecture flow
01 · Load test cases→02 · Normalize text→03 · Score answers→04 · Find regressions→05 · Export the report
01Load test cases+
Five saved illustrative cases provide a question, expected answer, old answer, new answer and required phrases.
Example result: Example: refund window / 30 days
02Normalize text+
Lowercase strings, remove punctuation and tokenize each answer.
Example result: Comparable word sequences
03Score answers+
Calculate token F1 and exact match against the reference, then check every required phrase.
Example result: Per-answer score and pass flag
04Find regressions+
A regression is a case where the baseline passes but the new candidate fails under the selected threshold.
Example result: List of deteriorated cases
05Export the report+
Inspect results and export JSON or import your own valid small case set.
Example result: Reproducible local report
TRY THIS EXAMPLEFollow a real use case
Reference: “Submit within 30 days.” The old answer says “30 days,” while the candidate says “60 days.” A required-phrase check catches that important difference.
TOOLS AND RESPONSIBILITIESHow it is built
Pure JavaScript evaluation functions (`engine.js`), browser UI (`evalbench.js`), fictional fixtures, and Node.js tests. No model inference is involved.
Limits — what this is not
Lexical regression baseline, not semantic correctness or factuality measurement. Correct paraphrases may score poorly; wrong numbers or negations can still slip through a lexical metric. Demo data stays in browser memory and is not uploaded.
EXPERIMENT 003TraceFlow
Make each step of a simulated agent workflow visible.
IN EVERYDAY WORDSThink of a parcel tracking page, but for software operations. You can watch the order lookup, possible retry, shipment lookup and summary, including what happens when evidence is missing.
The problem
A multi-step assistant can fail, retry or exceed call budgets. TraceFlow demonstrates how to inspect the sequence and understand why a workflow stopped.
Architecture flow
01 · Choose scenario→02 · Classify the request→03 · Look up an order→04 · Check shipment→05 · Summarize or stop
01Choose scenario+
Select a successful run, a temporary timeout, missing order data or another fixed synthetic case.
Example result: Scenario and budget configuration
02Classify the request+
A deterministic step chooses the next simulated operation.
Example result: Next tool step
03Look up an order+
A fixed test adapter returns a synthetic record; a temporary timeout may cause one retry.
Example result: Order result or error
04Check shipment+
Only when an order exists, a second simulated adapter returns shipment information.
Example result: Shipment fixture or no-evidence result
05Summarize or stop+
The runner produces a template summary, or stops when cancelled, out of budget or missing evidence. Each step emits trace events.
Example result: Ordered trace and JSON export
TRY THIS EXAMPLEFollow a real use case
Select “temporary timeout.” The first order lookup fails, a second attempt runs if budget permits, then the successful path continues. Lower the budget to 2 to see the workflow stop early.
TOOLS AND RESPONSIBILITIESHow it is built
Async JavaScript workflow engine (`engine.js`), deterministic fixtures, event callbacks, AbortSignal cancellation, per-attempt budgets and Node.js tests.
Limits — what this is not
No LLM, no actual database query, no live shipment data. Delay and retry outcomes are synthetic and not performance benchmarks. This is an observability teaching tool, not a production agent.