Skip to content
Ameen Abozaid
Planned lessonMID-068-L07

Demo: the order-support assistant answers with citations

  • Lesson 7 of 8
  • Mid-level
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

build the assistant that prepares MID-068-LAB1.

Draft outline details

Step by step

  1. Start from the MID-067 index; add a POST /support/ask endpoint.
  2. Retrieve top 20 with language filter, keep the top 4 above the similarity threshold.
  3. Build the prompt with numbered sources and the decline instruction; call the model through Spring AI (verify API and model name before recording).
  4. Planned mistake: a question about a topic Shop does not cover gets a confident answer from model memory because the prompt had no decline rule and no threshold. Fix: add the rule and return a fixed decline when nothing passes the threshold.
  5. Return {answer, sources:[{articleId,title}]} and test shipping, returns, payment, and one out-of-scope question.
  6. Log the question, retrieved chunk ids, scores, and answer for later diagnosis.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.