Skip to content

Case study · Healthcare

RAG Clinical Knowledge Assistant for a Hospital Network

We built a retrieval-augmented generation (RAG) knowledge assistant that lets a hospital network's staff ask questions in plain language and receive answers grounded in more than 500,000 clinical documents, each with citations to the source.

4 September 20266 min read

A bright, modern hospital procedure room
500,000+
Clinical documents indexed
4 steps
Discovery to hypercare
90 days
Post-launch hypercare

Client

Hospital network (name withheld)

Industry

Healthcare

Technologies

  • Retrieval-augmented generation (RAG)
  • Vector search
  • OCR text extraction
  • NestJS
  • PostgreSQL
  • Next.js

01 · The challenge

Across its facilities, the network had accumulated a very large body of clinical knowledge: treatment protocols, departmental SOPs, formulary notes, policy circulars and reference material, totalling more than 500,000 documents. They were spread across shared drives and internal systems in a mix of formats, including scanned PDFs.

Finding the current, approved version of a protocol could take a long time, and keyword search often returned dozens of near-identical files. Staff needed a faster way to reach the right passage, but leadership was clear that any AI tool had to respect existing access permissions, show where every answer came from and avoid inventing information.

02 · The solution

We built an ingestion pipeline that collects documents from the agreed sources, extracts text (including from scans), splits it into meaningful sections and records metadata such as department, document type, version and access group. Each section is indexed for both semantic and keyword search so that precise drug names and codes are found as reliably as general concepts.

When a staff member asks a question, the assistant retrieves only the passages that person is permitted to see, prefers the latest approved versions, and asks the language model to answer strictly from those passages. The response shows the cited documents and sections so the reader can open the original. If nothing relevant is found, the assistant says so.

The project ran through discovery with clinical and IT stakeholders, design of the search and answer experience, agile build with evaluation sets of real staff questions, and production rollout with 90 days of hypercare. The pattern behind it is described on our AI knowledge base page.

Inside the project

The work in pictures

A doctor in a white coat using a phone

Clinicians ask questions in plain language, right where they work.

An operating theatre with equipment and screens

Protocols and SOPs for every ward are indexed so the right section surfaces quickly.

A surgical team gathered around the camera

Every answer cites its source, so staff can verify guidance before acting on it.

Highlights

What made it work

  1. 01

    Answers grounded in approved documents

    Responses are generated only from retrieved clinical passages, and every answer cites the document and section it used.

    A hospital ward with beds and curtains

    Ward-level procedures sit alongside theatre and diagnostic guidance.

  2. 02

    Permissions carried into search

    Access groups from the source systems are applied at retrieval time, so staff only receive content they are already entitled to view.

    A hand X-ray displayed on a radiology screen

    Radiology and diagnostic protocols are searchable with the same question box.

  3. 03

    Hybrid semantic and keyword retrieval

    Combining both methods helps the assistant find exact drug names, codes and abbreviations as well as conceptual matches.

    A stethoscope resting on a white surface

    Unanswered questions show document owners where guidance has gaps.

  4. 04

    Large-scale ingestion pipeline

    A repeatable pipeline processes more than 500,000 documents, including scanned files, and keeps the index current as content changes.

Before and after

How the work changed

Before

  • Staff search folders and PDFs for the right protocol
  • Answers depend on who you ask
  • No view of what staff cannot find

After

  • Plain-language questions return the relevant section
  • Every answer cites its source document
  • Unanswered questions point to guidance gaps

Technologies

The stack behind the project

  • Retrieval-augmented generation (RAG)
  • Vector search
  • OCR text extraction
  • NestJS
  • PostgreSQL
  • Next.js

Results

What changed

Outcomes are published only once confirmed with the client. They describe this project and are not a guarantee for others.

Measured outcomes for this project are being confirmed with the client and will be published here.

FAQ

About this project

No. It is a reference tool that helps qualified staff find the relevant passage in approved documents quickly. Every answer links to its sources so the reader can verify it, and decisions about patient care remain with clinicians.

The assistant is instructed to say that it could not find supporting material rather than produce a plausible guess. Questions without answers are logged so document owners can see where guidance may be missing.

Yes. Retrieval-based assistants can be paired with models hosted inside an organization's own environment. Our local LLM deployment page explains when that is the right choice.

Planning something similar?

Tell us about your goals. We'll share how we approached comparable projects and what a first release could look like.