Every clinician has experienced the frustration of knowing what they need but not the exact name to search for. You know you need an antiemetic suitable for a pregnant patient in the first trimester, but which specific drug name should you type? Traditional keyword-based drug search requires you to already know the answer before you can look it up. AI-powered semantic search changes this entirely [1].
The Problem with Keyword Search
Conventional drug references rely on exact string matching. You type "metformin" and you get metformin. But clinical thinking rarely starts with a drug name — it starts with a patient, a diagnosis, and a set of constraints. Keyword search cannot handle queries like "oral anticoagulant with least drug interactions" or "antidepressant that does not cause weight gain." These are the questions clinicians actually ask [2].
How Semantic Search Works
MedNext Formulary uses vector-based semantic search powered by Cloudflare Workers AI and Vectorize. Here is what happens when you type a natural language query:
- Query embedding — your search text is converted into a 768-dimensional vector that captures its semantic meaning, not just its keywords [2]
- Vector similarity search — the query vector is compared against pre-computed embeddings of all 2,866 drug monographs in the MedNext database
- Relevance ranking — results are ranked by cosine similarity, surfacing the most clinically relevant drugs for your specific scenario
- Trade name resolution — if your query includes a brand name, the system automatically maps it to the correct generic drug using our database of 2,710 trade name mappings
Real-World Examples
Here are some examples of queries that work with MedNext semantic search but would fail with traditional keyword search [1]:
- "blood thinner for atrial fibrillation in elderly patient with renal impairment" — returns DOACs and warfarin with relevant dosing considerations
- "pain relief safe in third trimester" — returns paracetamol and appropriate alternatives while excluding contraindicated NSAIDs
- "antibiotic for cellulitis penicillin allergy" — surfaces alternative antibiotics with appropriate spectrum coverage
- "Lipitor" — correctly maps to atorvastatin via trade name resolution
The Technology Behind It
MedNext runs its AI infrastructure entirely on Cloudflare's global edge network, meaning search queries are processed at the data centre closest to you. This delivers sub-second response times regardless of your location. The AI model (Llama 3) provides natural language understanding, while Vectorize handles the high-dimensional similarity search across the entire drug database [2].
Importantly, no patient data is ever sent to the AI model. The search operates purely on drug information — your queries are not logged, stored, or used for training.
Available on MedNext PRO
AI-powered semantic search is a MedNext PRO feature, available with the monthly ($5.99/month) or annual ($49.99/year) subscription. Free tier users can still search by exact drug name using keyword search, with full access to browse the drug index. Upgrading to PRO unlocks the full power of natural language clinical search, along with drug interaction checking, dosing calculators, and complete monograph access.
References
- Thirunavukarasu AJ, Ting DSJ, Elangovan K, Gutierrez L, Tan TF, Ting DSW. Large language models in medicine. Nat Med. 2023;29:1930-1940.
- Singhal K, Azizi S, Tu T, et al. Large language models encode clinical knowledge. Nature. 2023;620:172-180.