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

- 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

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

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

Every answer cites its source, so staff can verify guidance before acting on it.
Highlights
What made it work
01
Answers grounded in approved documents
Responses are generated only from retrieved clinical passages, and every answer cites the document and section it used.

Ward-level procedures sit alongside theatre and diagnostic guidance.
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.

Radiology and diagnostic protocols are searchable with the same question box.
03
Hybrid semantic and keyword retrieval
Combining both methods helps the assistant find exact drug names, codes and abbreviations as well as conceptual matches.

Unanswered questions show document owners where guidance has gaps.
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.
FAQ
About this project

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


