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¶
- Sign in at http://localhost:8001.
- Open AI Tutor in the nav (
/tutor). - Optionally switch UI language (EN/RU) — language affects how you ask and which RAG lane is searched.
Ask a question¶
- Type a question in the chat box (up to ~4000 characters).
- Send the message.
- 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_idcreates 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¶
- Confirm
MEDICAL_ASSISTANT_ENABLEDand, if needed,RAG_ENABLEDare on. - Ask an admin to check status on
/admin→ Knowledge base (RAG). - Rephrase shorter questions in the same language as the KB materials.
- Without an LLM API key the tutor may fall back to heuristics and seed knowledge — answers will be shorter.
Typical walkthrough¶
- Register as
studentorresidentat http://localhost:8001. - Open
/tutorand ask a question in EN or RU. - Check sources under the answer — see RAG.
- Open
/progressand confirm atutorrow appeared. - 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.