Book a Call → mycocoon.life
RAG Lab

Chat with your documents —
and watch it think

"Can AI answer questions from our documents?" is the question every company asks. The answer is RAG — retrieval-augmented generation — and this lab makes it visible: watch a bot search a real document library, pick its chunks, fill its context window and write an answer. Then watch it fail — hallucinate, truncate, go stale — and learn to fix every failure. Six levels, then a sandbox.

Runs entirely in your browser — deterministic, free, no API key
Same coffee company as the Automation Lab ☕
RAG Pipeline
1
🙋
Question
waiting…
2
🔎
Retrieve
search the chunks
3
📥
Context
what the model gets to read
4
🧠
Model
writes from the context
5
💬
Answer
lands in the chat
Step 1 · QuestionPick a question in the chat — or type your own in the sandbox.
📚 Document library
🧩 Chunk store
These are the chunks the model will read. If this content is outdated, the answer will be too.

Document

🎉
Level complete

The five ideas behind every "chat with your docs" product

Copilots, enterprise search, support bots trained "on your knowledge base" — under the hood they are all the same five-step machine. Learn it here, where every step is visible, and no vendor demo will ever fool you again.

🧩

Chunking

Documents get sliced into pieces before anything else happens. Slice too big and the model drowns in irrelevant text; too small and the meaning gets cut in half. Level 3 lets you feel both failures.

🔎

Retrieval

Your question is compared against every chunk and the closest matches win. It's search, not magic — and when the right chunk isn't retrieved, the model literally cannot know the answer.

📥

Context window

The model only reads what retrieval hands it — a limited budget of text. Every irrelevant chunk in the window is budget stolen from the relevant one.

🛡️

Grounding

The single most important switch in RAG: may the model answer only from the documents, or improvise when they're silent? Level 5 shows you what confident improvisation looks like.

📌

Citations

Answers that point to their sources can be checked; answers that don't must be trusted. In a business, "trust me" is not a feature. Citations turn the bot from an oracle into a librarian.

Want this over your company's documents?

Everything you just learned — chunking, retrieval, grounding, citations — is exactly what we tune when we build document-answering assistants for real teams. Cocoon trains your people to use them well, and builds them properly.

Copied ✓