medifind-ai-engine
Verifying local drug availability and bio-equivale
Created on 5th September 2026
•
medifind-ai-engine
Verifying local drug availability and bio-equivale
The problem medifind-ai-engine solves
High Healthcare Costs & Generic Unawareness
Patients frequently overpay for expensive branded medications simply because they lack clear, instant visibility into lower-cost generic alternatives that contain identical active ingredients and deliver 50% to 75% cost savings.
Local Inventory Uncertainty
Finding specific formulations or available generic substitutes often forces patients to physically visit multiple retail pharmacies, resulting in wasted time, frustration, and potential treatment delays caused by localized stockouts.
Verification Overhead for Healthcare Providers
Patients and pharmacists need a fast, centralized way to verify active ingredient bio-equivalence, check dosage instructions, and review key clinical warnings before safely switching to a generic alternative.
How MediFind Solves This
- Instant Generic Alternative Engine: Automatically indexes thousands of drug formulations, mapping brand-name medications to their active ingredients to display direct, bio-equivalent generic substitutes.
- Dual-AI Safety & Supply Verification: Orchestrates parallel AI inference via Gonka Gateway—utilizing Kimi-K2.6 for clinical bio-equivalence and dosage evaluation, alongside DeepSeek-V4 for regional retail store stock estimations.
- Dynamic Consumer Cost Savings Calculator: Calculates immediate monthly and annual cost savings (in RM), empowering patients to make financially informed healthcare choices.
- Automated Pharmacist Brief Generation: Produces downloadable, audit-ready clinical summaries with unique request IDs to ensure safe consultation between patients and healthcare professionals.
Challenges we ran into
Dual-Model API Concurrency & Rate Limits (HTTP 429)
- The Challenge: Running dual-model orchestration (Kimi-K2.6 for safety and DeepSeek-V4 for supply) via
ThreadPoolExecutortriggered API rate limits (429 Too Many Concurrent Requests). - The Fix: Implemented exponential backoff retry loops, thread submission staggering (
time.sleep(0.3)), and graceful fallback data structures to prevent complete application failure during rate limit bursts.
Multithread Exception Handling & UI Stability
- The Challenge: Uncaught exceptions inside parallel thread execution caused
ValueErrorunpack crashes onf_a.result(), bringing down the entire Streamlit UI. - The Fix: Wrapped all future result calls (
f_a.result()andf_b.result()) in isolatedtry-exceptblocks to guarantee valid tuple returns and preserve UI responsiveness.
Memory Optimization on Streamlit Cloud
- The Challenge: Ingesting the full production dataset (~147,000 medicine records) repeatedly exceeded Streamlit Cloud’s free-tier memory allocation limit (~1 GB RAM).
- The Fix: Optimized dataset handling using
@st.cache_data, compressed.csv.gzstorage, and added a dual-mode toggle ("Sample ~10k" vs. "Full ~147k") to keep memory footprints low during active user sessions.
Tracks Applied (1)
AI For Society
Gonka Router
Discussion
Builders also viewed
See more projects on Devfolio
