๐ก Inspiration
Every year, $4.4 billion is spent on unnecessary emergency room visits in the US alone. As a developer and someone who has witnessed the anxiety parents face when their child has a fever, I saw an opportunity to use AI for social good.
The problem is real:
- Parents, especially first-time caregivers, often rush to the ER for common symptoms due to anxiety
- Emergency departments are overwhelmed with non-urgent cases
- Generic AI assistants like ChatGPT lack medical specialization and safety guarantees
- There's no reliable, accessible tool that provides evidence-based triage guidance
I wanted to build something that could:
- Reduce unnecessary ER visits by providing reliable guidance
- Empower parents with knowledge from trusted medical sources (AAP, NHS)
- Ensure safety through deterministic red-flag detection
- Be accessible - completely free and available 24/7
๐ฏ What it does
PediSafe is a specialized AI-powered triage assistant that helps parents assess their child's fever and make informed decisions about seeking medical care.
Key Features:
- ๐ฆ 4-Level Color-Coded Triage System (RED/ORANGE/YELLOW/GREEN)
- ๐ Safety-First Architecture with deterministic red-flag detection
- ๐ RAG-based AI using validated AAP and NHS clinical guidelines
- ๐งช Automated Test Suite - 16 test cases validating safety and accuracy
- ๐ Bilingual Support (English/Spanish)
- ๐ 100% FREE using Cerebras AI and Hugging Face embeddings
- ๐ฑ Modern, Intuitive UI designed for stressed parents
How it works:
- Parent describes child's symptoms (age, temperature, duration, etc.)
- Layer A (Safety): Deterministic rules catch critical symptoms immediately
- Layer B (AI): RAG retrieves relevant medical guidelines and generates personalized advice
- Parent receives color-coded triage level with clear action steps and source citations
๐๏ธ How we built it
Architecture:
Multi-Layered Safety Architecture
โโโ Layer A: Deterministic Red-Flag Detection (Fail-Safe)
โ โโโ Keyword matching for critical symptoms
โ โโโ Age-based temperature rules
โโโ Layer B: RAG-Powered AI Reasoning
โ โโโ Vector search with FAISS
โ โโโ Context injection from medical guidelines
โ โโโ LLM generation with Cerebras Llama 3.3 70B
โโโ Knowledge Base: AAP + NHS validated guidelines
Tech Stack:
- Frontend: Streamlit with custom CSS for modern UI
- LLM: Cerebras Llama 3.3 70B (FREE, ultra-fast inference)
- Embeddings: Hugging Face sentence-transformers (FREE, local)
- Vector Store: FAISS (local, efficient)
- Framework: LangChain for RAG orchestration
- Deployment: Docker, Streamlit Cloud
- Languages: Python 3.12
Development Process:
- Research: Studied AAP and NHS pediatric fever guidelines
- Architecture Design: Implemented multi-layered safety approach
- RAG Implementation: Built knowledge base with 5 medical documents (AAP + NHS)
- Safety Layer: Created deterministic rules for critical symptoms (red flags + age-based thresholds)
- UI/UX Design: Designed intuitive, stress-free interface with gradient design
- Bilingual Support: Added English/Spanish translations with i18n system
- Automated Testing: Built comprehensive test suite with pytest (16 test cases)
- Validation: Achieved 81% overall success rate (13/16 tests passing)
- โ 100% detection of critical symptoms (<3 months fever, red flags)
- โ 0 false negatives on emergency cases
- โ 0 hallucinations detected
- โ 100% correct source citations
- Optimization: Achieved <1 second response time with local FAISS + Cerebras
๐ง What we learned
Technical Learnings:
- RAG Architecture: How to build production-ready RAG systems with proper context retrieval
- Safety-Critical AI: Importance of deterministic fail-safes in healthcare applications
- Automated Testing for AI: Building comprehensive test suites for LLM-based applications
- LLM Selection: Cerebras offers incredible speed (10x faster than GPT-4) at zero cost
- Vector Search: FAISS optimization for fast similarity search
- Prompt Engineering: Crafting prompts that generate consistent, structured medical advice
- Hallucination Detection: Techniques to prevent AI from inventing symptoms
Healthcare Domain:
- Medical guidelines are highly structured and age-specific
- Parents need clear, actionable advice - not medical jargon
- Color-coding and visual hierarchy reduce cognitive load during stress
- Source citations build trust and credibility
Product Design:
- Bilingual support is crucial for healthcare accessibility
- Mobile-first design matters for parents on-the-go
- Clear disclaimers are essential for medical information tools
๐ง Challenges we faced
Challenge 1: Ensuring Safety
- Problem: Generic AI can give inconsistent or dangerous advice
- Solution: Implemented deterministic Layer A that ALWAYS catches critical symptoms before AI processing
Challenge 2: Cost & Accessibility
- Problem: OpenAI API costs could limit accessibility
- Solution: Switched to FREE Cerebras API + local Hugging Face embeddings = $0.00 cost
Challenge 3: Medical Accuracy
- Problem: AI hallucinations could be dangerous in healthcare
- Solution: RAG architecture grounds responses in validated medical guidelines with citations
Challenge 4: Response Time
- Problem: Parents need quick answers during stressful situations
- Solution: Cerebras ultra-fast inference + local FAISS = <1 second responses
Challenge 5: User Trust
- Problem: Parents need to trust the advice
- Solution: Always show source citations (AAP/NHS URLs) and clear disclaimers
๐ฏ Accomplishments
โ
Working prototype with real medical guidelines (5 AAP/NHS documents)
โ
100% FREE to use - Cerebras Llama 3.3 70B + HuggingFace embeddings
โ
Multi-layered safety architecture (Layer A + Layer B)
โ
Automated test suite - 16 test cases covering critical, edge, and false positive scenarios
โ
Test results - 13/16 passing (81% success rate):
- โ
100% detection of life-threatening emergencies (<3 months fever: 3/3, red flags: 5/5)
- โ
0 false negatives on critical symptoms (NEVER misses emergencies)
- โ
100% false positive prevention (2/2)
- โ ๏ธ 2 tests failing on non-critical precision (persistent fever, high temp + good behavior)
โ Zero hallucinations - AI doesn't invent symptoms
โ Source validation - Always cites AAP/NHS with full URLs
โ Bilingual support (EN/ES) with comprehensive i18n system
โ Modern, intuitive UI with gradient design and color-coded triage
โ Fast responses (<1 second with local FAISS vector search)
โ Comprehensive documentation (README, TEST_README, TEST_RESULTS, TESTS_FINALES)
โ Docker deployment configuration ready
โ ๏ธ Current Limitations (Not Safety-Critical):
- May under-prioritize persistent fever >72 hours (classifies YELLOW instead of ORANGE)
- May under-prioritize very high temp (40ยฐC) with good behavior (classifies GREEN instead of ORANGE)
- Both issues involve non-emergency scenarios - system NEVER misses true emergencies
- Requires clinical validation before real-world medical use
๐ What's next for PediSafe
Immediate (Post-Hackathon):
- Fix the 2 failing tests (persistent fever, high temp + good behavior)
- Improve prompt engineering for edge case handling
- Add more test cases for validation
- Clinical review by pediatricians
Short-term (Next 3 months):
- Clinical validation study with medical professionals
- Improve triage accuracy to 95%+ across all scenarios
- Add more languages (French, Mandarin, Hindi)
- User feedback system and continuous improvement
Long-term (6-12 months):
- Expand to other pediatric conditions (rashes, cough, vomiting)
- Mobile app (React Native)
- HIPAA-compliant deployment for healthcare providers
- Integration with telemedicine platforms
- Symptom tracking and history
Vision: Make PediSafe a clinically-validated tool for parents worldwide, reducing unnecessary ER visits by 20% while maintaining 100% detection of true emergencies.
Log in or sign up for Devpost to join the conversation.