The Inspiration
Prescription errors are a silent crisis. Even in 2026, many patients struggle to decipher handwritten scripts, leading to missed doses or dangerous drug interactions. I wanted to build a bridge between complex clinical data and accessible, patient-safe information.
How I Built It
RxScan AI is a Multi-Agent RAG (Retrieval-Augmented Generation) pipeline.
- OCR Processing: The system takes a prescription image and extracts text using vision-language models.
- Data Orchestration: I used LangChain to orchestrate the LLM (Groq) to map extracted text against the NIH RxNav API.
- The Hallucination Barrier: To ensure clinical accuracy, the system doesn't just trust the LLM. It performs a secondary "validation layer" where it verifies drug names against official clinical databases. If the confidence score is low, it flags the medication for pharmacist review.
Challenges I Faced
- Data Mapping: Mapping unstructured OCR text to structured medical databases like RxNav was non-trivial. I overcame this by implementing a fuzzy-matching logic layer in my API routes.
- Latency: Running RAG on medical data can be slow. By using Groq’s LPU inference engine, I reduced response times from seconds to milliseconds, creating a snappy experience even on mobile.
What I Learned
I learned that building AI for high-stakes fields like healthcare is 20% model tuning and 80% data validation. Reliable RAG is all about designing robust guardrails for when the AI is "unsure."
Built With
- api
- framer
- groq
- next.js
- nih
- rxnav
- tailwind
Log in or sign up for Devpost to join the conversation.