Change the wording, keep your experiment. Saved in this browser when storage is available.
The missing sentence / a RAG experiment
Find the sentence
the answer missed
You want to bring a candle lantern on Saturday's garden walk. Search the guide and check whether the answer includes the Saturday restriction.
Your challenge: rescue the missing restriction with a 24-word evidence budget.
A document search can find the right guide while leaving out its exception. Change the search or passage budget and inspect the packed text. This helps you diagnose whether a missing condition was lost before an answer was written.
A short, two-attempt experiment. No account or API key.
This page really searches and chooses which passages fit. Its number-based search uses hand-set values, and its answer follows a written template. No language model is answering.You control a local teaching simulation: real search and packing, fixed teaching vectors, and a template answer. No language model runs.
Last packed attempt
- Find passages
- Pack the envelope
- Check the answer
Keyword counts compare words in the question with each passage. The budget counts whitespace-separated words, not model tokens.
Choose Pack the answer to see which passages fit the selected budget.
Inspect the packed evidence and answer
Search the guide
Finding a passage is only the first step. The answer can use it only if it also fits into the evidence envelope.All source text is here. Only packed passages can support the answer.
Can I bring a candle lantern on Saturday?
- Visitor guide / version 1
You may bring a candle lantern on Saturday garden walks, except when the event notice overrides this rule.
On Saturday, use battery lights only; open flames are forbidden during the dry weather alert.
Edit the source or disconnect it
Turn on the prepared correction to replace the old notice. We have told the program which notice it replaces. The program is not discovering contradictions by itself.Publish an authored version 2 notice. It explicitly replaces the old exception. The fixture supplies that relationship; this is not automatic contradiction detection.
Open the evidence envelope
This is the exact passage text the answer stage gets.
Get the event exception into the answer with only 24 words.
Previous attempt. These passages and this answer use your old settings. Pack again to update them.
A document can be found without its decisive sentence making it here. Pack an answer to inspect the envelope.
Your answer card
Waiting for evidence
Can I bring a candle lantern on Saturday?
Will the answer notice the Saturday exception?
Answer text comes from an authored template. A real RAG application would pass this context to its model here.
Try a different search or budget
Keep the exact evidence, your before/after comparison, settings and a practical RAG checklist. Opens offline.
Show a search example
Try Meaning: fixed vectors, leave the budget at 24 words, and pack again. The exception should move ahead of the general rule. Compare the actual text in the envelope.
Take the idea to a new case
A ferry guide allows bicycles. An early crossing has a temporary restriction. Can you make the answer include it, then explain what changed?
For your own RAG system: inspect the retrieved passages, inspect the final context, then check whether the answer's citations actually support its conditions.
What actually runs, and why it matters
Retrieval-augmented generation (RAG) adds retrieved evidence to a model's input. This lesson isolates the retrieval and context steps. It uses original fictional sources and an authored answer interpreter, not recorded or live model output. AI assisted the development; Jonathan Simone directs this independent project.
- Keyword: count occurrences of question terms after lowercasing and removing the listed common words.
- Meaning: cosine similarity over three hand-written coordinates. These are teaching vectors, not learned embeddings. Joining passages averages their vectors.
- Combined: reciprocal-rank fusion, 1/(60 + keyword rank) + 1/(60 + meaning rank). Scores from different methods are not directly comparable. Ties sort by passage ID.
- Packing: visit passages in rank order, or your chosen first passage. Include a whole passage if it fits; otherwise skip it and keep looking. Headers and metadata do not count toward the teaching word budget.
- Support: explicit fixture labels connect a rule, its exception and a declared correction. Similarity does not establish truth. A larger context does not guarantee a better answer.
Technical sources: Lewis and colleagues on RAG, Microsoft on reciprocal-rank fusion, and the Stanford introduction to term frequency.
This optional check-in and your explanation preference are saved in your browser. Your exercise stays on this page unless you download it. View or clear course check-ins.