Inspiration
Access to trustworthy, up-to-date medical information is critical for clinicians, patients, and researchers alike. We were inspired by the need for a tool that not only delivers accurate disease knowledge and comparisons, but also provides transparency, citations, and privacy—especially in environments where internet access is limited or sensitive data must remain local. The rapid evolution of AI models like Perplexity Sonar and open-source LLMs made us realize we could build a hybrid solution that brings the best of both worlds to healthcare.
What it does
MediCore AI is an intelligent medical research assistant that:
- Answers disease-related questions with structured, evidence-based information.
- Provides side-by-side comparisons of multiple diseases, including symptoms, treatments, and prognosis.
- Visualizes the reasoning process behind complex answers (chain-of-thought).
- Suggests intelligent follow-up questions to deepen user understanding.
- Offers real-time, citation-backed responses via Perplexity Sonar API, and can seamlessly fall back to a local AI model (llama.cpp) for offline or privacy-sensitive use cases.
How we built it
- Backend: Built with Python and Flask, exposing RESTful endpoints for queries, comparisons, and feedback.
- AI Integration: Integrated Perplexity Sonar API for world-class, web-grounded medical Q&A; added llama.cpp for local LLM inference.
- Frontend: Developed a responsive, modern web UI using HTML, CSS, and vanilla JavaScript for an intuitive user experience.
- Query Routing: Implemented a smart router to select the best AI model (cloud or local) based on query complexity and system availability.
- Data Processing: Engineered robust routines to structure, validate, and cite medical information from raw AI outputs.
- Testing: Used Pytest for backend logic and manual walkthroughs for usability.
Challenges we ran into
- Model Interoperability: Ensuring consistent, high-quality responses from both Sonar API and local LLMs required careful prompt engineering and output normalization.
- Citation Extraction: Extracting and displaying reliable citations from AI-generated text was more complex than expected.
- Performance: Running large language models locally (especially on limited hardware) required optimization and thoughtful resource management.
- User Experience: Designing a UI that presents complex medical data in a clear, actionable way was an ongoing challenge.
- Fallback Logic: Seamlessly switching between cloud and local models during API downtime or network loss required robust error handling.
Accomplishments that we're proud of
- Successfully built a hybrid AI system that works both online and offline, ensuring maximum accessibility and privacy.
- Developed an intuitive interface that makes advanced medical research approachable for both professionals and laypeople.
- Achieved reliable, structured disease comparisons and chain-of-thought visualizations.
- Integrated real-time, citation-backed answers with transparent sourcing.
- Created a scalable foundation for future medical AI tools.
What we learned
- The value of hybrid AI architectures: Combining cloud APIs with local models offers the best balance of accuracy, privacy, and resilience.
- The importance of transparency in medical AI: Users need to see not just answers, but also the reasoning and sources behind them.
- Prompt engineering and output parsing are essential for consistent, high-quality results across different LLMs.
- Real-world healthcare applications demand robust error handling, fallback mechanisms, and user-centric design.
What's next for MediCore
- User Accounts & Personalization: Allow users to save questions, track research, and receive tailored updates.
- Enhanced Visualization: Add interactive charts and statistics for epidemiology and treatment outcomes.
- Mobile App: Develop a mobile-friendly version for clinicians and patients on the go.
- Integration with EHRs: Enable secure, context-aware medical Q&A directly within electronic health record systems.
- Continuous Learning: Fine-tune local models on medical datasets for even higher accuracy and domain specificity.
- Multilingual Support: Expand accessibility to non-English-speaking healthcare communities.
Built With
- css
- flask
- html
- javascript
- perplexity
- python
- sonar
- vanilla
Log in or sign up for Devpost to join the conversation.