Inspiration

Medication errors are the third leading cause of death in the U.S., causing over 200,000 preventable deaths each year and costing the global healthcare system billions. While there are many patient-facing solutions (symptom checkers, appointment apps, report analyzers), there are far fewer tools designed to directly assist clinicians.

Doctors face an ever-growing medical knowledge base, and it is simply impossible for any one human to remember every drug interaction, contraindication, or genetic factor. This inspired me to build an AI agent—not just an assistant—that empowers clinicians with personalized, evidence-based insights. The goal is to reduce medication errors and provide safer, more precise treatment decisions.

What it does

PharmaGene helps clinicians prescribe with confidence by analyzing patient medical records, prescriptions, and genetic markers, then providing safe, personalized medication recommendations.

It goes beyond being a simple QA tool. PharmaGene:

  • Reviews patient history and treatment plans to flag possible medication risks.
  • Cross-checks real-time data from trusted resources such as the WHO, FDA, NCCN and more.
  • Uses a web engine to fetch the latest medical research and guidelines.
  • Provides structured, explainable responses powered by OpenAI’s GPT-OSS-120B large-scale reasoning model.

In short, PharmaGene acts as a clinician-facing AI co-pilot, ensuring safer prescriptions and reducing the risk of harmful errors.

How I built it

PharmaGene was built by orchestrating multiple components into a seamless AI agent for clinicians. I used LangChain and LangGraph to integrate and manage different tools, including retrieval, reasoning, and web search. Patient medical records are preprocessed using recursive text splitting (with overlap) and embedded into FAISS, an efficient in-memory vector database, allowing fast and accurate retrieval of relevant chunks.

At the core, OpenAI’s GPT-OSS-120B powers reasoning and structured response generation. Its scale and capabilities play a key role in analyzing both patient data and external knowledge sources, producing trustworthy, context-aware medical insights.

I further integrated a custom web search engine to pull information from trusted resources such as FDA, WHO, and national regulatory bodies, ensuring up-to-date, evidence-backed guidance. Finally, I built a lightweight and deployable front-end with Streamlit, making it easy for clinicians to interact with PharmaGene in real time.

Challenges I ran into

Agent orchestration: Deciding when and how the AI should invoke different tools, and ensuring it doesn’t over-query unnecessarily, was a major challenge.

Data chunking & token limits: Patient reports are often long and complex, requiring careful tuning of chunk size and overlap to balance retrieval quality with token efficiency.

Reliable sourcing: A lot of research was needed to ensure the system only surfaces trusted medical data from official sources, avoiding unreliable or outdated information.

Time constraints: Building a full-stack application with advanced features during a short hackathon was tough — trade-offs had to be made to deliver a functional prototype.

Accomplishments that I'm proud of

  • Developed and deployed a working prototype capable of analyzing real patient records and providing safe, evidence-based treatment insights.

  • Successfully integrated both vectorized patient data retrieval and trusted external knowledge bases, enabling clinicians to get a complete, up-to-date picture.

  • Built an intelligent AI agent powered by GPT-OSS-120B, capable of reasoning across multiple sources and giving structured, reliable responses.

  • Delivered a tool that demonstrates how AI can reduce medication errors, improve patient safety, and ultimately help clinicians save lives.

What I learned

Through building PharmaGene, I learned how to combine vector databases with a custom web search engine to create a powerful, domain-specific AI system. This taught me the importance of balancing structured retrieval with real-time trusted updates.

I also explored the field of pharmacogenomics, where genetics influence how patients respond to medications. Diving into this domain was eye-opening and emphasized the urgent need for clinician-facing AI agents in healthcare, not just patient-facing tools.

On the technical side, I gained experience in agent orchestration, improving accuracy and efficiency by carefully designing tool use. I also learned how to design a specialized medical AI product, where safety, trust, and interpretability are just as important as functionality.

What's next for PharmaGene

Looking ahead, I want to expand PharmaGene into a full-fledged clinical platform:

Long-term memory: Implement permanent memory so patient records and past interactions are retained across visits, enabling longitudinal care.

Multi-platform deployment: Extend the prototype into a production-ready solution with mobile and web apps, ensuring accessibility for clinicians in diverse settings.

Knowledge base expansion: Incorporate additional clinical guidelines, pharmacogenomic data, and real-world case studies to make recommendations even more robust.

Multilingual support: Enable doctors and patients worldwide to interact with PharmaGene in their own language.

Voice integration: Add speech-to-text (ASR) and text-to-speech (TTS) capabilities, allowing clinicians to interact with PharmaGene hands-free during consultations.

Ultimately, I envision PharmaGene becoming a trusted AI medical co-pilot for clinicians, reducing medication errors, improving patient outcomes, and helping build a safer global healthcare system.

Built With

  • faiss
  • gpt-oss-120b
  • groq
  • langchain
  • langgraph
  • python
  • tavilysearch
Share this project:

Updates