Skip to content

AI Tutor

The AI Tutor is the learning chat in AI Medical Assistant: ask clinical questions and get answers grounded in the medical knowledge base (RAG) when it is enabled.

Not for clinical decisions

Answers are for education only. Do not treat them as a substitute for a clinician or your organization’s protocols.

Who can use it

Requirement Value
Feature flag MEDICAL_ASSISTANT_ENABLED=true
Learning roles student, resident, plus other LEARNING_ROLES (clinical roles such as doctor, nurse, head of department, etc.)
URL http://localhost:8001/tutor

If the assistant is disabled or your role is not allowed, the page and API return access errors / 503.

Open the tutor

  1. Sign in at http://localhost:8001.
  2. Open AI Tutor in the nav (/tutor).
  3. Optionally switch UI language (EN/RU) — language affects how you ask and which RAG lane is searched.

Ask a question

  1. Type a question in the chat box (up to ~4000 characters).
  2. Send the message.
  3. Review the answer: text, confidence, and sources from the knowledge base when RAG finds matching chunks.

Good topics: differential diagnosis, lab interpretation, first-line algorithms, pharmacology, exam prep.

Better questions

Include age, key symptoms, and what you already ruled out. One clinical focus per message works better than a long unrelated list.

Chat sessions

Each conversation is a session:

  • The first question without a session_id creates a new session.
  • Continuing the same chat loads message history.
  • Use the sidebar to reopen past sessions or delete ones you no longer need.

Sessions belong to your account; you cannot see other users’ chats.

Language and sources

Item Meaning
Answer language Follows the question / session setting (en or ru)
Sources Short excerpts from the local and/or external knowledge base
Similarity How closely a chunk matches the query (higher is more relevant)
Source language KB lane: only en or ru (never mixed)

See also: RAG sources.

Progress

Each successful tutor answer is recorded under the tutor progress module. View the summary at /progress.

Weak or empty answers

  1. Confirm MEDICAL_ASSISTANT_ENABLED and, if needed, RAG_ENABLED are on.
  2. Ask an admin to check status on /adminKnowledge base (RAG).
  3. Rephrase shorter questions in the same language as the KB materials.
  4. Without an LLM API key the tutor may fall back to heuristics and seed knowledge — answers will be shorter.

Typical walkthrough

  1. Register as student or resident at http://localhost:8001.
  2. Open /tutor and ask a question in EN or RU.
  3. Check sources under the answer — see RAG.
  4. Open /progress and confirm a tutor row appeared.
  5. Optionally delete the test session from the sidebar.

Limits

  • The tutor does not access real patient charts.
  • History is limited to your sessions (up to 50 in the API list).
  • Citations depend on KB coverage and RAG_MODE.