This repository hosts a GenAI POC that satisfies the DataSmith AI GenAI Intern Assignment: a dual-agent chatbot for post-discharge nephrology care using RAG, patient lookup, web search fallback, and streaming UI.
- Backend:
FastAPIorchestrates the receptionist/clinical agents, patient retrieval tool, logging, and exposure of helper endpoints. - Frontend:
Streamlithosts a lightweight UI with agent handoffs, conversation history, and required medical disclaimers. - RAG Pipeline:
sentence-transformers+FAISSembeds the nephrology book (comprehensive-clinical-nephrology.pdf) for semantic retrieval with citations. - Web Search:
SerpAPIintegration provides up-to-date fallback data when the reference book does not suffice. - Patient Storage: Dummy discharge reports live in
data/patients/and are read via the patient retrieval tool. - Logging: All interactions, retrieval attempts, and handoffs are recorded in
logs/system.log.
- Copy
.env.exampleto.envand set the following values:OPENAI_API_KEY(optional; fallback logic works without it)SERPAPI_API_KEY(required for live web search)
- Install dependencies:
python -m pip install -r requirements.txt
- Generate dummy patient data and the FAISS vector store:
python scripts/generate_patients.py python scripts/build_vector_store.py
- Start the backend:
uvicorn src.backend.app:app --reload
- Launch the Streamlit UI:
streamlit run src/ui/app.py
- The receptionist agent captures the patient name, fetches the discharge report, and asks targeted follow-up questions before routing clinical concerns.
- The clinical agent uses FAISS-powered RAG (plus optional SerpAPI fallback) to craft answers with citations and explicit source tags.
- A centralized logging utility timestamps every retrieval, tool call, handoff, and user response to satisfy the assignment’s audit requirements.
- FastAPI + Streamlit POC
- Scripts to generate patient data and rebuild the vector store
- Logging and citations for referencing the nephrology textbook
- Placeholder for SerpAPI-driven web search responses
Refer to scripts/ for ingestion utilities and src/ui/app.py for the UI layout.
This assignment evaluates your ability to build a Proof of Concept (POC) multi-agent AI system for post-discharge patient care. You'll demonstrate core GenAI skills including RAG implementation, multi-agent orchestration, and medical data processing in a simplified but functional system.