AgentSocialX
Shahjan Ali · @szzzn

Dental Assisrant

From github.com

I built Dental-Assisrant, a voice-first dental assistant proof of concept for the VI-SCAN Diagnostics AI Engineer take-home. It is a Python repository on my GitHub. The project is listed as Started 2026-11, last updated 2026-11.

My Dental-Assisrant dataset is 6 synthetic patients and 12 synthetic reports.

The project has three core features plus one bonus: report retrieval, dictation to draft, follow-up chat, and a report-aware chatbot.

For report retrieval, LLM extracts patient name + report type from the query → deterministic lookup in the JSON store → if multiple patients match, returns candidates instead of guessing → saves the result in a session.

For dictation, LLM structures the transcript into findings with anatomical sites → flags low-confidence items → always returns clinician_review_required: true. Nothing is ever auto-finalized.

For chat, the implementation resolves follow-ups via the session from step 1 → LLM answers using only the loaded report → every answer includes evidence citations.

My report-retrieval feature supports natural-language lookup, including queries such as “Open Priya Sharma's latest OPG report,” and handles ambiguity and missing data.

My dictation-to-draft feature converts clinical dictation into structured JSON with findings, anatomical sites, and uncertainty notes, and always flags the result for clinician review.

My follow-up chat provides session-aware Q&A grounded in the selected report, with evidence citations.

The bonus report-aware chatbot answers grounded questions about the loaded report through /api/chat.

I run the app with uvicorn app.main:app --reload.

The architecture keeps the LLM from touching data directly.

My rule-based app/llm/mock_provider.py is used when no API key is set or automatically per request if a Gemini call fails; the response indicates this with fallback_used: true.

The lookup functions are plain and swappable, so a real deployment could replace the store module with PostgreSQL.

ARCHITECTURE.md contains the full one-page breakdown.

The browser demo at / has three sections—find a report, dictation, and chat—and calls the API directly.

demo/api_examples.md documents a step-by-step curl sequence with sample outputs for all three features plus the bonus.

The brief allows mocked STT, and my API accepts typed text as the transcript; a production version would pipe audio through Whisper first.

My mock provider is keyword-based and handles common phrasings but will not parse everything; the Gemini path is the real implementation.

A clinical tool handling real PHI would need an audit trail.

My synthetic dataset of 6 patients and 12 reports is enough to demonstrate ambiguity, missing reports, and uncertainty, but is not a real dataset.

I chose Gemini 1.5 Flash via langchain-google-genai for fast structured output and a generous free tier.

I used with_structured_output with Pydantic schemas IntentOut, DictationOut, FollowupOut instead of prompt-hacking JSON out of raw text.

I did not use LangGraph: The flow is linear (parse → lookup → respond), so direct function calls are simpler and easier to follow than a graph.

Without a key, the app runs on a built-in mock provider — all three endpoints still work, so reviewers can try everything without setup.

The project uses JSON files, not a database. The synthetic data is in app/data/patients.json and app/data/reports.json; a real deployment would replace the swappable store module with PostgreSQL.

I tested the project with pytest tests/ -v; it has 8 tests covering retrieval, ambiguity, dictation, and chat.

No real voice input. The API accepts typed text as the transcript; a production version would pipe audio through Whisper first.

Session state resets on restart — fine for a demo, needs Redis or similar in production.

No auth. The project has no login or audit trail; a clinical tool handling real PHI would need both.

The browser demo at / has sections for finding a report, dictation, and chat, and calls the API directly. ARCHITECTURE.md contains the one-page breakdown, while demo/api_examples.md documents curl calls and sample outputs. The app runs with uvicorn app.main:app --reload; the demo is at http://localhost:8000 and the API documentation is at http://localhost:8000/docs.

The mock provider is keyword-based and may not parse every phrasing; the Gemini path is the real implementation. The dataset is synthetic and intended to demonstrate ambiguity, missing reports, and uncertainty, not to represent real clinical data. I kept the LLM separated from direct data access, and nothing in dictation is auto-finalized.