TLDRocket
Sign in

Building Reliable Agentic AI Systems

TLDR Dev

Bayer built PRINCE, an AI agent system that lets drug researchers ask plain-English questions across decades of messy preclinical data. It's a rare detailed look at how a big pharma actually wired agentic RAG for production, not a demo.

Preclinical drug research produces mountains of data, but most of it lives in silos: structured study metadata in one place, scanned PDF reports from decades past in another, and none of it easy to search with old-fashioned keyword tools. Bayer's answer is PRINCE, the Preclinical Information Center, and the company just published a detailed account of how it evolved from a basic search filter into something closer to a research assistant that can plan, retrieve, reflect, and write.

The interesting part isn't that Bayer bolted an LLM onto a search box. It's the three-phase arc they describe: Search, Ask, Do. Search just unified metadata across silos. Ask added retrieval-augmented generation so researchers could query unstructured PDFs in natural language instead of relying on incomplete or outdated annotations. Do is where it gets more ambitious — a multi-agent system built on LangGraph that can chain together research, validation, and drafting steps, including help with regulatory documents.

Under the hood, PRINCE runs a FastAPI backend with a React front end, pulling structured data through Athena and vector search through OpenSearch, while LangGraph checkpoints state into PostgreSQL and DynamoDB tracks broader app state. Bayer's engineers lean on internal GenAI platforms that expose OpenAI, Anthropic, Google, and open-source models through one unified endpoint, which lets them swap models per task and fall back automatically if a provider hiccups. Retries happen at both the individual call level and the step level, and failed agents get fed the error context so they can replan rather than just retry blindly.

What stands out most is the discipline around context. Bayer found that simply stuffing everything into a bigger context window made the system harder to steer, not easier — so instead of one giant prompt, each stage (planning, retrieval, reflection, writing) gets its own narrow slice of context. There's also a deliberate 'clarify intent' step up front that asks users follow-up questions rather than guessing across dozens of possible data sources, which cuts down on wasted, expensive retrieval passes. It's a very unglamorous kind of engineering — retries, checkpoints, evaluation via RAGAS and Langfuse — but it's exactly the plumbing that separates a flashy chatbot demo from something clinicians and researchers can actually trust with real decisions.

Bayer frames the payoff as faster, more confident decision-making and fewer redundant experiments, which in pharma terms means real time and money. Whether PRINCE actually shortens drug development timelines is something only Bayer's internal metrics will show, but the architecture itself is a useful blueprint for any large, regulated organization trying to make agentic AI reliable rather than just impressive in a demo.

My take

This is the unsexy but correct way to build agentic AI: less about clever prompts, more about state persistence, fallbacks, and refusing to dump everything into one giant context window. Every startup selling a slick multi-agent demo should read the plumbing section here, because reliability at scale looks like PostgreSQL checkpoints and RAGAS evals, not a flashy chat UI. I'd bet more on the pharma companies quietly doing this boring engineering than on the flashier agent startups still chasing benchmark headlines.

Read more about this at: TLDR Dev

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads 60+ sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.