Here is a beautifully structured, highly professional Markdown project details document ready for your hackathon submission page:


Inspiration

Medical decisions should be guided purely by patient health, yet corporate influence in healthcare remains a massive black box. Every year, pharmaceutical companies spend billions of dollars on consulting fees, promotional sponsorships, speaker honorariums, and luxury travel for prescribing physicians. This creates an implicit bias toward high-cost brand-name drugs, leaving patients to shoulder heavy financial burdens. We were inspired to build DocTruth to bridge this transparency gap, unmask corporate-clinical relationships, and empower patients with direct clinical and financial truth.

What it does

DocTruth is a premium, high-fidelity medical transparency dashboard. It allows any patient to search for a licensed physician, audit their pharmaceutical financial relationships, and discover cost-saving generic and biosimilar alternatives.

By running an interactive audit, DocTruth:

  1. Unmasks Financial Sponsors: Discloses exact transaction registries, detailing consulting fees and promotional payouts tied to specific drug manufacturers.
  2. Maps Bio-Equivalents: Analyzes prescribed brand-name drugs and provides bio-equivalent generic matches with cost savings of up to 85%.
  3. Discloses Safety Logs: Retrieves active FDA black-box warnings and safety alerts.
  4. Drafts Clinical Discussion Guides: Features a floating AI Patient Advocate chatbot trained directly on the audited physician’s financial profile and chemical compound data, giving the patient tailored questions to ask during their next appointment.

How we built it

DocTruth is built as a cloud-native single-page application using a modern serverless stack:

  • Orchestration: Built using Google's declarative Agent Development Kit (google-adk) to coordinate a Multi-Agent Council (Chief Medical Director, Forensic Financial Auditor, and Pharma Equivalence Chemist).
  • AI Model: Driven by Gemini 2.5 via the Google GenAI SDK to drive streaming, state-aware agentic decisions.
  • Backend: Powered by an async FastAPI web server, utilizing Server-Sent Events (SSE) to stream real-time agent "thoughts" and tool discoveries to the client.
  • Integrations: Integrates directly with public federal REST endpoints, including the CMS Open Payments API and FDA National Drug Code Directory API.
  • Observability: Fully instrumented using standard OpenTelemetry protocols to stream operational trace spans (detailing agent handoffs, tool calls, and prompt template versions) to the Arize Cloud (Phoenix AX) observability dashboard.
  • Cloud Deployment: Containerized using a secure, multi-stage Dockerfile (optimized under python:3.11-slim) and deployed on Google Cloud Run for serverless, autoscaling performance.

Challenges we ran into

  • Telemetry Context Leaks: Standard OpenTelemetry auto-instrumentation and context variables can collide with async python generators in FastAPI's StreamingResponse, leading to trace truncation. We overcame this by implementing explicit manual trace spans wrapped in strict try...finally block boundaries to guarantee that 100% of spans are closed and successfully sent.
  • OTel Authorization Handshakes: Sending spans to the remote Arize Cloud gateway silently discarded packets without throwing trace errors. We resolved this by expanding the connection headers to include standard Bearer authorization structures and interface indicators, while registering the mandatory "openinference.project.name" resource attribute to ensure proper routing on the Arize gateway.
  • Dynamic Client Caching: To prevent hitting federal API limits on duplicate searches, we built a highly robust caching engine. When running in a serverless environment (like Cloud Run) where a database isn't deployed, the cache gracefully falls back to a high-speed in-memory Python dictionary stored in the container's RAM.

Accomplishments that we're proud of

  • Collaborative Multi-Agent Council: Watching the Forensic Auditor and Pharma Chemist agents successfully work in parallel under the coordination of the Chief Medical Director is incredibly rewarding.
  • Complete Clinical Accountability: Successfully logging every single prompt template version, tool execution, and LLM input directly into Arize Cloud as transparent, nested trace graphs.
  • Seamless Cloud Performance: Achieving an elegant, fully responsive SPA experience that loads in milliseconds, streams live agent steps, and scales dynamically on Google Cloud Run.

What we learned

  • Advanced Agentic Design: Building with Google's ADK taught us how to design robust, declarative agents with focused tools rather than relying on giant monolithic system prompts.
  • Strict Telemetry Compliance: We gained deep expertise in configuring clean, manual OpenTelemetry span processors and understanding the strict metadata structures required by enterprise AI observability platforms like Arize Cloud.

What's next for Doc Truth

  • Insurance Formulary Integrations: Integrating with insurance copay APIs to calculate exact, out-of-pocket patient savings depending on their health insurance coverage.
  • Doctor Search Expansion: Scaling our search system to support multi-faceted queries across state boundaries, medical specialties, and clinical practices.
  • Prescription Scanning: Implementing optical character recognition (OCR) to allow patients to upload photos of their prescription bottles and instantly initiate a conflict-of-interest audit.

Built With

  • active-ingredients
  • and-black-box-safety-warnings)-observability-&-telemetry:-opentelemetry-(otel-sdk)
  • arize-cloud-(phoenix-ax)-cloud-services:-google-cloud-platform-(gcp)
  • docker
  • fastapi
  • google-artifact-registry-databases-&-caching:-motor-(async-mongodb-driver)
  • google-cloud-build
  • google-cloud-run-(serverless-container-hosting)
  • hatchling-ai-models:-gemini-2.5-(via-the-google-genai-sdk)-apis-&-data-sources:-cms-open-payments-api-(federal-registry-of-corporate-pharmaceutical-payouts-to-licensed-doctors)-fda-national-drug-code-directory-api-(drug-chemistry
  • javascript-(es6+)
  • languages:-python-3.11
  • openinference
  • python-driven-high-speed-in-memory-ram-caching-development-tools:-uv-(fast-python-dependency-resolver-&-sync-manager)
  • uvicorn
  • vanilla-css3-core-frameworks:-google-adk-(agent-development-kit)
  • vanilla-html5
Share this project:

Updates