Prosperaize

Users could find any record on a pharma data platform. They couldn’t get an answer out of it.

How we replaced a failing SQL agent and gave market access teams answers across 90+ jurisdictions in under a minute.

90+ jurisdictions, answered in under a minute
Client
Pharma data platform
Industry
Life Sciences
Asked by
Engineering leadership
To a build decision
14 weeks: diagnosis, data, validation
Built with
LangGraph · domain SQL views · an API
Published
20 April 2026

Results at a glance

What changed for the platform and its users.

55%

regular use among platform users, grown from 10% after launch. Nothing was mandated.

Platform usage

300+

columns across seven domain views, up from 10 columns on one.

Data coverage

<1

minute for questions that took days. The agent reliably writes 100+ line SQL.

Production use

1

week to open the agent to other teams and agents through an API.

After launch

01 · The question

“Our users can find any record. Why can’t they get an answer?”

The platform gives market access teams at global pharmaceutical companies regulatory, HTA and reimbursement data across 90+ jurisdictions. A team preparing a launch needs precedent from it: what each HTA body decided for comparable drugs, on which evidence, with which restrictions, and why.

Users could find any record. A landscape question still broke down into filters, exports and spreadsheets, or a wait of days for an expert’s report.

The company had already tried an AI agent. An external vendor spent months and a significant budget on it. It arrived as a narrow first version, a single view with 10 columns, and failed in real use. Engineering leadership decided to replace it, and this time to test the architecture before funding the build.

90+

Jurisdictions behind one question. Three of them hold the answer.

Platform record
One question.90+ jurisdictions, each with its own rulesOne answer, with its sources.

02 · What we found

The data had never been described for a machine reader. No agent could have worked on it, whoever built it.

10

columns the first agent could see, on a single view. Basic SQL only, no structured outputs, no guardrails.

Codebase review, at diagnosis

>24

hours per landscape question: filter, export, cross-tabulate, or ask an expert, who asked a data engineer.

Client workflow, at diagnosis

0

of the jurisdiction-specific constraints were written where an agent could read them. They lived with the domain experts.

Data review, at diagnosis

03 · What we delivered

Four capabilities the company owns.

An intelligence layer that handles the full complexity of market access data, in every jurisdiction in the dataset.

01Metadata foundationColumn descriptions, business-context annotations, country-specific constraints and value ranges. It made the database understandable to an AI agent. The least visible work, and everything else depended on it.
02Domain-organized data architectureSeven purpose-built views spanning 300+ columns, with the critical joins and country-specific business logic encoded. Instead of asking the agent to work out the database, we reorganized the database so the agent could use it.
03Production SQL agentBuilt on LangGraph, with query validation, deterministic SQL, multi-turn conversation and strict output guardrails. The same question produces the same SQL every time.
04Cross-platform intelligenceDocument summarization and an API that makes the agent available to other teams and other agents, on a composable architecture built for expansion from the start.

04 · How it ran

It started with a diagnosis, not a strategy.

They had an agent in production that was not working. The first question was whether it could be saved.

  1. 01RescueDiagnosing the agent they already hadTwo weeks of workshops with engineering leadership and the team supporting the agent, and a review of the codebase. Its structure could not carry the questions users needed answered, so it had to be replaced. Leadership accepted that verdict, and its cost, on the evidence.
  2. 02Find · data onlyFixing the data before touching the agentStrategy was skipped by agreement: demand had already proven the use case. The data could not be skipped. Two weeks with the domain experts produced the first metadata layer.
  3. 03ProveTesting the architecture and the economics before funding the buildA ten-week validation, on the understanding that the first architecture might not pass. It did not: one documented no-go. Domain views then worked against the real data, and a cost-per-query analysis showed the agent could carry its own cost on the platform.
  4. 04BuildBuilding it to production standardProduction engineering with standards set from the start, and domain logic stored as data rather than code. Removing the old agent’s integrations added weeks of work.
  5. 05RunBack where they started, with a system that compoundsAfter launch we added multi-turn conversation, document summarization and an API. The API took a single week, because the architecture was composable.

Go or no-go · after ten weeks

Paid before any build

The readout, against what was agreed before the build.

Agreed before the buildFirst architecture: the agent joins 10+ tables itselfSecond architecture: seven domain views, the hard joins built in
Answers hold on the real schema and dataDid not holdHeld
A cost per query the platform can carryNot testedPays for itself
VerdictNo-go, documentedGo: build it

Why the no-go was cheap: ten weeks of validation produced one documented no-go, one working architecture and a cost per query the business could carry. The first attempt produced the negative answer alone, after months of work and a full budget spent, in production.

05 · Results

Market access teams get answers across 90+ jurisdictions in under a minute.

—

In-house experts stopped coordinating multi-day data engineering cycles and moved to client-facing work.

—

Data engineers reclaimed sprint capacity for the platform instead of ad-hoc query requests.

—

Follow-ups go from a decision into its trials, its regulatory approval, its reimbursement conditions and its rationale, in one place.

06 · What they learned

Enterprise text-to-SQL is a domain engineering problem, not a prompt engineering problem.

The pivot that worked was not a better model or a better prompt. It was reorganizing the data so the agent no longer had to solve problems that people also struggle with.

Users need to ask questions, not compose filtersThe company’s own query templates were the evidence. The agent generalized a handful of templates into any question.
Test the architecture on the real schema before funding the buildThe first agent skipped that step. The rebuild spent ten weeks on it and produced one no-go and one architecture that held in production.
Domain rules belong in data, not codeWhen a rule changes, the knowledge layer changes, and the agent follows.
Composable architecture pays in post-launch speedThe API took one week because expansion was a design constraint from the first day.

If this sounds like your company

The data is there. The access layer is the gap.

Your data product finds records but does not answer questionsIf users export to spreadsheets or rely on templates for the questions that matter, the access layer is the gap.
You already paid for an AI agent that underperformsThe sunk cost is the agent plus the architecture that grew around it. Decide whether to fix, replace or remove it before that grows.
Your experts spend their time on retrieval instead of judgmentA production-grade query layer returns that time to the work that needs them.
You want AI that compounds instead of stalling after launchComposable architecture and domain logic stored as data let each capability build on the last.

Have a system that finds but doesn’t answer?

Schedule a call with a partnerFree until 11 December