HS
Let’s Collaborate

Artificial Intelligence

Interactive Deep Lab: Responsible RAG Chatbot

A deep, interactive Artificial Intelligence lab where students build, test, and govern a retrieval-augmented chatbot with citation checks, refusal behavior, and hallucination evaluation.
Level
Advanced
Format
Toolkit
Published
May 29, 2026
Artificial Intelligence: Interactive Deep Lab: Responsible RAG ChatbotAn AI lifecycle for Interactive Deep Lab: Responsible RAG Chatbot, showing data, model evaluation, and human release review.DATAartificial intelligenceEVALUATEchatbotREVIEWresponsible ai
Artificial IntelligenceEvaluation lifecycle
Learn

Build the core model

Read the lesson and connect each concept to the visual model above.

Deep lab purpose

This lab is designed to be hands-on and critical, not a generic chatbot demo. Students build or simulate the full RAG workflow, then attack it with evaluation questions to prove whether answers are grounded in the provided sources.

Scenario

A university wants a student-facing assistant that answers academic-policy questions. The assistant must not invent policy, approve exceptions, reveal private data, or answer beyond the official source snippets.

Students must answer:

  1. Which source supports each answer?
  2. What should the system do when the policy is missing?
  3. Which answer is faithful, partially supported, or hallucinated?
  4. What controls are needed before deployment?

Native Python + tool testing requirement

Students must run the provided native Python RAG API, test supported and unsupported questions in Postman, import the n8n workflow to create an evaluation record, and optionally capture the API traffic in Wireshark. The lab is considered complete only when citation behavior, refusal behavior, and evaluation logs are demonstrated with real API responses.

Required student artifacts

  • Policy mini-corpus with source IDs and metadata.
  • Retrieval experiment or simulation showing top matched snippets.
  • Answer template that includes citations and refusal behavior.
  • Hallucination evaluation matrix with answerable, unanswerable, ambiguous, and adversarial prompts.
  • Responsible deployment memo covering transparency, escalation, privacy, and human oversight.
  • Demo script showing both a successful answer and a safe refusal.

Lab depth extension

For advanced classes, students implement a lightweight retrieval baseline using TF-IDF or embeddings. For non-coding classes, students simulate retrieval manually using the mini-corpus and focus on evaluation, governance, and risk control.

Instructor facilitation notes

Do not let students treat a confident chatbot response as correct. Require source IDs and claim-by-claim validation. If an answer contains one unsupported sentence, it must be marked as a failure or partial failure.

Challenge questions:

  • When should the assistant refuse instead of answer?
  • What is the difference between intrinsic and extrinsic hallucination?
  • How can citations create a false sense of trust?
  • Which questions should be escalated to staff?
  • What should the user transparency notice say?

Assessment emphasis

Strong submissions demonstrate retrieval traceability, rigorous evaluation, and responsible AI controls. Weak submissions only show a chatbot interface without proving that the answer is grounded.