A conversational AI agent that turns a plain-English request straight into a finished report

The agent inspects the data, writes and runs its own analysis code, builds the charts and assembles the report.

Navi Insights built a conversational AI agent for PEP Health. The agent exists in two versions. One is built and proven, working on one hospital system's data. The other is generalised to cover the client's entire customer base and to run on self-hosted Llama 3.3. The one step still ahead is a final end-to-end check against a live model server.

How it works

01

Starts from a plain-English request

A user asks a plain-English question in a chat window, something like ‘how have our scores trended this year’. There are no spreadsheets and no dashboard to configure. The agent inspects the data itself.

The agent already comes wired with four core report types: volume trends, entity landscape, source comparison and qualitative themes.

02

Writes and runs its own analysis code

The code works out the real numbers and builds the charts. The agent checks its own results and iterates as many times as it needs to before it is confident.

A fixed dashboard only ever answers the questions it was built to answer. Because this agent writes fresh analysis code for every request, it can take on a genuinely new question the moment someone asks it.

03

Assembles one self-contained report

The output is a single, self-contained report with embedded charts, styled to the client's visual identity. No extra software is needed to open or share it.

The report is ready to download, email or present.

User's plain-English request, plus what data is available. Llama 3.3 70B, self-hosted on the client's own AWS infrastructure. Decides: is more analysis needed? Agent writes and runs its own analysis code against real data, builds charts on the fly. Styled to the client's look, ready to download and share.01 PERCEPTIONUser's plain-Englishrequest, plus whatdata is available02 BRAINLlama 3.3 70B,self-hosted on the client's ownAWS infrastructureDecides: is more analysis needed?FINISHED REPORTStyled to the client'slook, ready todownload and shareanalysiscomplete03 ACTIONAgent writes and runs its ownanalysis code against real data,builds charts on the flyneeds more analysisresults checked, fed back User's plain-English request, plus what data is available. Llama 3.3 70B, self-hosted on the client's own AWS infrastructure. Decides: is more analysis needed? Agent writes and runs its own analysis code against real data, builds charts on the fly. Styled to the client's look, ready to download and share.01 PERCEPTIONUser's plain-English request,plus what data is available02 BRAINLlama 3.3 70B,self-hosted on the client's ownAWS infrastructureDecides: is more analysis needed?needs more analysisresults checked,fed back03 ACTIONAgent writes and runs itsown analysis code againstreal data, builds charts onthe flyFINISHED REPORTStyled to the client's look,ready to download and shareanalysis complete
The agent loop. The agent takes in the request and decides whether it needs to do more analysis. If so, it writes and runs a piece of code, checks what came back and loops again. It only stops once it is confident the analysis is complete. This is a simplified diagram of the generalised version, as designed, not a real trace.

What is proven, and what is still ahead

The two versions share an identical design: the same conversational loop, self-written analysis and report styling. What changed is scope and infrastructure. The earlier version is a working demo, proven on one hospital system's real data. It works end to end on a file the user uploads.

Navi Insights built the generalised version to cover the client's entire customer base, connect automatically to the full data warehouse and run on the client's own infrastructure.

This version has been checked against a simulated response, but not yet against a live model server. The next step is to stand up that server and run the agent through a final end-to-end check, then roll the agent out for the client's team to use on real requests.

The agent is designed to take around 60 per cent of the manual effort out of writing reports by hand. That is a design goal, not a measured result.

Built, generalised: one live test away 60.6M+

Patient comments in PEP Health's full data warehouse, which also covers 4.6M+ facilities and practitioners. This is the scale the generalised version is built to reach.

How Navi Insights built the agent

Reasoning engine

Patient feedback is sensitive by nature. The generalised version is built to run on Llama 3.3, a large language model, within the client's own AWS infrastructure. Hosting the model this way was chosen so that real data never has to leave a controlled environment.

Analysis

The agent writes and runs its own Python analysis code in a controlled sandbox, rather than following a fixed template.

Request and report

Every report starts with a person typing a request and ends with a person downloading, emailing or presenting it.

  • Llama 3.3 70B, self-hosted
  • vLLM
  • AWS
  • Python
  • Controlled sandbox
  • Streamlit
Related case

PEP Health

Service line classifiers for PEP Health patient comments

Read the PEP Health case →

Get in touch

Reach out and tell us what you're working on. Every message gets a personal reply within two working days.

Prefer email? Write straight to hello@naviins.com.

SendingSending your message. This takes a moment.
Message sentThank you. One of the directors replies, usually within two working days.
Start a conversation