RAG & Vector Lab

Eight interactive labs: text chunking, embeddings, semantic search, vector databases, the RAG pipeline, advanced retrieval, chat with your documents and evaluation, plus an assistant builder for your own documents and experiments that run in the browser.

44interactive experiments

Project library

Applied learning projects. The medical and legal ones are for training only, are no substitute for a physician or lawyer, and must not be used on real patient or case data without a legal basis and approvals.

Beginner

University regulations assistant

An assistant that answers student questions from a university regulation with the article number.

Steps

  1. Get the regulation as PDF or DOCX from its official source.
  2. Upload it to your private project.
  3. Choose structural chunking by articles.
  4. Try 20 real questions.

Evaluation: Measure Hit@3 on questions with phrases expected from the right article.

Risks: Regulations change; re-upload after every amendment and keep a notice that the official text prevails.

Intermediate

Q&A over research papers

Ask your set of papers about methods and results, with the page.

Steps

  1. Upload text PDFs (not scanned).
  2. Check the order of the extracted text.
  3. Pick larger chunks for academic paragraphs.
  4. Compare BM25 and hybrid.

Evaluation: Write questions whose answers you know in the papers and measure MRR.

Risks: Tables and equations are distorted by extraction; do not trust table numbers without opening the paper.

Advanced

Clinical guideline summariser (training)

Training on cited retrieval from publicly available guidelines.

Medical disclaimer: a training project; it gives no diagnosis or treatment advice and does not replace a physician.

Steps

  1. Use only publicly available guidelines and no patient data.
  2. Chunk by headings.
  3. Keep refusal on weak evidence on.
  4. Review every answer against the source text.

Evaluation: Evaluate retrieval only; no "clinical correctness" is measured.

Risks: A wrong answer is high-risk in medicine; never use this for a treatment decision.

Advanced

Contract clause finder (training)

Finding specific clauses in generic sample contracts with the source of each.

Legal disclaimer: a training project; it gives no legal advice and does not replace a lawyer.

Steps

  1. Use generic sample contracts, not client data.
  2. Chunk at clause numbers.
  3. Filter by document.
  4. Always show the literal clause text.

Evaluation: Evaluate retrieval with phrases from the right clause.

Risks: It gives no legal advice and can err on complex wording; the text and a qualified lawyer are the reference.

Beginner

Technical support knowledge base

An assistant answering product issues from the user manual.

Steps

  1. Upload the manual as Markdown or HTML.
  2. Chunk by headings.
  3. Add FAQs as a separate document.
  4. Measure on old anonymised support tickets.

Evaluation: Hit@k on ticket questions.

Risks: An old manual gives an old answer; put the release date in the document name.

Beginner

Course tutor

An assistant explaining course lectures and citing the slide or page.

Steps

  1. Convert the lectures to text.
  2. Chunk by headings.
  3. Choose the "teacher" persona.
  4. Add past exam questions for evaluation.

Evaluation: MRR on exam questions.

Risks: Do not rely on the answers in real exams; it is a revision aid.

Intermediate

Chunking benchmark

Measuring the effect of chunking strategies and sizes on your data.

Steps

  1. Write 30 questions with expected phrases.
  2. Run the evaluation for every strategy and size.
  3. Record Hit and MRR.
  4. Choose and freeze the setting.

Evaluation: A comparison table with the spread across questions.

Risks: Few questions mean noise; repeat with new ones.

Intermediate

Hybrid or BM25?

A systematic comparison on a known benchmark (such as SciFact) outside the site.

Steps

  1. Download the dataset from its official page, respecting its licence.
  2. Index with BM25 and real vectors from a model you choose.
  3. Compute NDCG@10.
  4. Compare with RRF fusion.

Evaluation: NDCG@10 with a confidence interval by resampling.

Risks: Do not compare with published numbers unless the settings match.

Advanced

Vector index benchmark

Benchmark Flat, IVF and HNSW with real vectors from an embedding model.

Steps

  1. Generate embeddings outside the site.
  2. Build the indexes with a library such as FAISS.
  3. Compute recall, time and memory.
  4. Plot the trade-off.

Evaluation: Recall-versus-time curve for each index.

Risks: The numbers belong to your hardware and data.

Intermediate

Citation auditor

Auditing RAG answers: is every sentence supported by its source?

Steps

  1. Collect 30 answers.
  2. Run the citation checker.
  3. Review flagged sentences by hand.
  4. Compute the false-alarm rate.

Evaluation: Agreement between the checker and your human judgement.

Risks: The checker is a word-overlap proxy.

Advanced

Defensive prompt-injection test

Test your system with documents containing planted instructions to measure its robustness.

Steps

  1. Write 15 passages containing planted instructions (in a test setup).
  2. Run them against your assistant.
  3. Record whether the instruction was obeyed.
  4. Improve the rules and re-test.

Evaluation: Share of instructions obeyed before and after the improvement.

Risks: Only for testing your own system.

Intermediate

Curriculum knowledge graph

Linking concepts of a small curriculum in a graph for relational questions.

Steps

  1. Write the curriculum concept lexicon.
  2. Build the graph from the curriculum passages.
  3. Detect communities.
  4. Try "how is X related to Y?" questions.

Evaluation: Compare graph local retrieval with BM25 on relational questions.

Risks: The hand-written lexicon decides the graph quality.