Inspiration

Medical lab reports are terrifying. You get a piece of paper full of numbers, acronyms like "ALT" or "MCHC", and flags that scream "HIGH" or "LOW". Most people immediately turn to Dr. Google, spiraling into anxiety about rare diseases before they even talk to their doctor. We wanted to build a bridge—a tool that doesn't just "read" the text (like standard OCR) but actually understands the medical context. We were inspired by the idea of an "empathetic medical translator" that could look at a messy photo of a report and explain it like a kind, knowledgeable friend, while also being smart enough to correct itself when given new information (e.g., "I hadn't fasted").

What it does

Lab-Simplifier is an AI-powered medical assistant that decodes complex lab reports into plain English.

  1. Visual Analysis: Users upload a photo of their lab report (even if it's crinkled or messy).
  2. Medical Reasoning: It doesn't just read values; it connects them. It understands that high BUN and Creatinine together might suggest kidney issues, whereas one alone might just be dehydration.
  3. Agentic Self-Correction: This is our "wow" feature. If the AI flags a value (e.g., High Glucose), the user can simply type, "I ate a donut right before this." The AI then re-thinks its analysis, overrides the previous warning, and generates a new report explaining why that result is now likely normal.
  4. PDF Export: It generates a clean, professional PDF summary that patients can bring to their actual doctor. ## How we built it We prioritized a clean, accessible tech stack:
  5. Gemini 3 Pro Preview: The core brain. We used its multimodal capabilities to process images and its advanced reasoning for the "Agentic" self-correction loop. We specifically used system prompts that encourage "re-evaluation" when provided with user context.
  6. Streamlit: For the frontend. It allowed us to rapidly build a reactive UI where the analysis and the "chat/update" loop feel seamless.
  7. Python: The backbone logic.
  8. FPDF: For generating the downloadable reports. ## Challenges we ran into
  9. Prompt Engineering for Self-Correction: Getting the LLM to truly change its mind was tricky. Initially, it would just add a note ("User says they ate"). We had to implement "Aggressive Instruction Injection" in the prompt to force the model to essentially overwrite its previous medical conclusion based on the new context.
  10. Messy Real-World Data: Lab reports vary wildly in format. Tuning the vision aspect to reliably extract table data from different layouts without hallucinating values required careful prompt iteration. ## Accomplishments that we're proud of
  11. The "Context Awareness": Seeing the AI flip from "Warning: Pre-diabetes" to "Normal: Post-prandial spike likely" just because the user mentioned food felt like true intelligence, not just search-and-replace.
  12. Speed: The application goes from raw image to full medical analysis in seconds. ## What we learned
  13. Multimodality is powerful but needs guidance: Gemini see the text perfectly, but it needs specific instructions to interpret the meaning of that text in a medical framework.
  14. User feedback loops are essential: AI is useful, but AI that listens to the user's specific context is transformative. ## What's next for Lab-Simplifier
  15. Longitudinal Tracking: allowing users to upload reports over time to see trends (e.g., "Your cholesterol has dropped 10% since last year").
  16. wearable Integration: Connecting with Apple Health/Fitbit data to provide even more context for the AI to reason with.

Built With

  • fpdf
  • google-gemini-3-pro
  • pillow
  • python
  • streamlit
Share this project:

Updates