Back to Blog
RAGLLMsLangGraphHealthcare AIPython

Building Sadeed: An Agentic Clinical Co-Pilot with Zero-Hallucination RAG

•3 min read
Building Sadeed: An Agentic Clinical Co-Pilot with Zero-Hallucination RAG

Winning 4th place at the AI Hackathon 2026 in Monufia Governorate was an incredible milestone! 🏆

But the real beauty of the achievement wasn't just the ranking—it was the intense 5-day challenge of transforming a conceptual idea into a production-ready medical AI system designed to save oncologists time and support critical, evidence-based decision-making.

The Problem: Information Overload in Oncology

Imagine an oncologist trying to make a rapid, precise treatment decision for a gastric cancer patient. The challenge? The latest medical guidelines (such as WHO, NICE, and ESMO) span hundreds of complex pages. Doctors constantly battle information overload under tight time constraints.

To solve this, our team (AI Innovators Team) built "Sadeed"—an AI Clinical Co-Pilot tailored specifically for oncologists.

Achieving Zero-Hallucination in Healthcare AI

In the medical domain, there is zero room for hallucinations or made-up facts. To guarantee absolute reliability, we engineered a Strict RAG Pipeline using LangGraph, combining Hybrid Retrieval with a custom medical chunker to parse complex tables and layouts accurately. Every single answer generated by the system comes with strict citations (page and paragraph numbers) pointing directly to the official medical source.

The 4-Stage Core Architecture

  1. Ingestion (Searchable Vector DB): Garbage in, garbage out. Medical data is packed with complex tables (e.g., TNM Staging). Standard parsers break layouts, so we utilized LlamaParse to extract full layouts into structured Markdown, chunking text into 512-token segments with preserved metadata, stored securely in Supabase (pgvector).

  2. Retrieval Optimization (Precision@K): We merged semantic vector search (pgvector) with exact keyword search (BM25 Okapi), fusing them using RRF (Reciprocal Rank Fusion), followed by a Gemini Flash Re-Ranker to filter down to the Top 5 most relevant contexts.

  3. Grounded Generation (Structured, Cited RAG): To eliminate hallucinations, we enforced a closed-world prompt structure outputting JSON with mandatory citations, leveraging a two-model architecture (Gemini 3.5 Flash for query analysis and Gemini 2.5 Pro for generation).

  4. Safety & Guardrails (Agentic RAG): Built as an 8-node state machine using LangGraph (query_analyzer ➔ hybrid_retriever ➔ confidence_evaluator ➔ grounded_generator ➔ citation_formatter ➔ faithfulness_checker ➔ finalize), incorporating NLI-based faithfulness checks to filter out contradictions.

Acknowledgments

This achievement was made possible by the phenomenal teamwork of the AI Innovators Team:

  • Al-baraa Hegaz
  • Kareem Sherif
  • Shaimaa Shabana
  • Sherin Amin

Special thanks to our mentor, Engineer Fareed Ali, and our instructors Engineer Rahma Nabil and Engineer Sama Negm El-Dine, alongside the outstanding organizers at Creativa, ITIDA, TIEC, Orange Digital Center Egypt, and Instant Software Solutions.

Check out the open-source GitHub repository here: Sadeed on GitHub