HealthLens is a lightweight, privacy-aware AI copilot that turns health reports and trusted websites into fast, cited answers. It ingests your PDF/CSV/TXT files, a single URL, or runs a shallow, robots-aware crawl of approved sites, then uses hybrid search (BM25 + vector) and Gemini to stream concise responses with inline citations and top snippets—so you always see where facts came from.
Problem & Why It Matters
Public-health teams and clinicians drown in documents when time is tight. During an ER admission or an outbreak briefing, the relevant facts are buried across PDFs, CSV exports, emailed situation reports, and web advisories. Manually skimming takes too long and is error-prone—especially when lives and resource allocation depend on rapid, defensible answers.
What HealthLens Can Be Used For
- Emergency triage assist (local docs only): Drag-and-drop patient PDFs (referrals, discharge notes, labs) stored on your secure network to get a first, cited summary (allergies, meds, notable history, red-flags) without uploading files to public services.
- Outbreak briefings: Ingest MoH/WHO situation reports and surveillance summaries; ask “Where did cases spike last week?” and get an answer with inline citations and top snippets.
- Epidemiology/QI analysis: Tag uploads by region/month, retrieve consistent evidence for weekly reports, and export the AI answer as markdown for auditing.
- Rapid literature/context scans: Use the web ingest or the shallow crawler to pull a controlled set of pages (robots-aware, depth/page limits) from trusted domains (e.g., WHO Disease Outbreak News).
- Knowledge consolidation for on-call teams: Keep a single, searchable index of SOPs, incident runbooks, treatment protocols, and prior RCA documents.
Important: HealthLens does not replace clinical judgment. It’s a retrieval and summarization tool that surfaces evidence you already trust, with citations.
How It Helps (Benefits)
- Speed with transparency: Answers are streamed in seconds with citations to the exact passage, improving trust and explainability.
- Single source of truth: Turn scattered files into a searchable knowledge base (hybrid keyword + vector search) that’s easy to maintain.
- Lower cognitive load: Sentence-aware chunking + snippet highlights bring the right paragraph to the top.
- Governed by you: You choose what is indexed (files only, web only, or both), and you control where it runs.
Privacy-Conscious Deployment
- Local-only mode: If you need to keep PHI strictly on your network, disable the web ingest/crawler and use file uploads from secure storage. (The app only processes the files you provide.)
- Scoped access: Use a dedicated Service Account with least-privilege; store keys in a secret manager; restrict network egress to your Vertex/Elastic endpoints.
- Metadata controls: Tag by region/month (or “internal/PHI”) to route queries and audits appropriately.
Example Scenario (Clinician)
Situation: A night-shift ER doctor receives a transfer with a 200-page PDF of prior notes and labs. The patient is unstable; time is short.
With HealthLens: The doctor drops the PDF into the Upload tab (no external websites used). HealthLens indexes locally, then the doctor asks:
- “List critical allergies, current meds, and the most recent abnormal labs.”
- “Any prior episodes of sepsis or ICU admission?”
Output: 4–6 bullets with inline citations (linking back to the exact page/section in the patient PDF) and a takeaway line. The answer is a starting point for rapid orientation—not a diagnosis—and the source snippets are visible for verification.
Example Scenario (Outbreak Team)
Situation: District office suspects a cholera cluster. Guidance is scattered across weekly bulletins and press notes.
With HealthLens: The analyst pastes 10 URLs from the MoH site (or uses the shallow crawler limited to
moh.gov.xx) and tags them “Northern, 2025-07”. They ask:
- “Show 7-day trend and affected sub-districts cited from official updates.”
- “List reported risk factors and recommended WASH interventions with sources.”
Output: A concise, cited summary plus top snippets and a confidence badge, exportable as markdown for the morning sitrep.
Under the Hood (Why It Works)
- Google Cloud Vertex AI
- Gemini (e.g., 1.5 Flash) for streamed, concise answers using only retrieved context.
text-embedding-004embeddings (768-dim) for high-quality vector search.
- Gemini (e.g., 1.5 Flash) for streamed, concise answers using only retrieved context.
- Elastic (serverless-compatible)
dense_vector+text/keywordfields; hybrid retrieval (BM25 + kNN with a script-score fallback).
Ingestion
- Upload (PDF/CSV/TXT): Extract → sentence-chunk → Vertex embeddings → Elastic index; optional tags: region, month. CSVs include a small preview for context.
- Single Web Page: Paste a URL → robots-aware fetch → clean main text → index. Perfect for one-off advisories.
- Shallow Crawl: Seed URLs → BFS with same-domain toggle, max pages, max depth, allow/deny regex. Live progress per page and a final full list of all pages visited, plus OK/Errors sections.
- UX for high-pressure work
- Sticky Ask bar, loading states, streamed tokens, sources + snippet side-panel, and download as .md for audit trails.
What It Is Not
- Not a medical device or decision system.
- Not a replacement for clinician expertise or established outbreak protocols.
- Not an unrestricted web crawler; it’s opt-in and constrained by your settings.
The Takeaway
HealthLens turns your trusted documents and selected web advisories into fast, cited answers—so clinicians and public-health teams can orient quickly, verify evidence, and act with confidence, without pushing sensitive files to external, uncontrolled services.
What's next
- Richer data pipes: BigQuery + Fivetran connectors for routinely updated clinical/outbreak datasets.
- Smarter retrieval: Elastic ELSER/semantic_text, content de-duplication, and incremental re-indexing.
- Quality & safety: faithfulness checks, stronger citation scoring, optional PHI redaction + role-based access.
- Scheduling & alerts: nightly scoped crawls, weekly auto-briefs, and change alerts for tracked pages.
- UX upgrades: saved queries, pinned sources, export to PDF/Markdown, and team sharing with audit logs.
Built With
- elastic-search
- google-cloud
- gradio
- python
- vertex

Log in or sign up for Devpost to join the conversation.