Inside Bayer's PRINCE: engineering an agentic RAG system for drug research
Bayer and Thoughtworks built PRINCE, a cloud platform that turns decades of preclinical safety study reports into a conversational research tool. The system tackles a familiar enterprise problem: critical knowledge was locked in scanned PDFs and inconsistent structured metadata accumulated across years of system migrations, where the PDF reports remained the authoritative source. PRINCE evolved through three phases — Search (filtered queries over structured metadata), Ask (natural-language Q&A via retrieval-augmented generation over unstructured reports), and Do (a multi-agent assistant that orchestrates workflows and drafts regulatory documents).
The technical core is an agentic RAG pipeline orchestrated with LangGraph behind a FastAPI backend and a React UI. Requests move through specialized stages — clarifying intent, planning, researching via RAG and Text-to-SQL, validating completeness, and writing a response — with deliberate pause points and feedback loops. Report embeddings live in OpenSearch while curated structured data is queried through Athena. The authors frame their decisions around two ideas: context engineering (what each model sees and how information flows between research, reflection, and writing steps) and harness engineering (the orchestration, retries, fallbacks, validation, observability, and human review scaffolding wrapped around the models).
The broader lesson is that production reliability in agentic systems comes less from the model itself than from the engineering around it. Bayer prioritized trust through transparency, explainability, and human-in-the-loop checkpoints — necessary in a regulated pharmaceutical setting where governance and compliance are non-negotiable. It’s a useful reference case for teams moving LLM agents from demo to production, showing how multi-agent orchestration, resilient error recovery, and named-entity annotation combine to make generative AI dependable enough for high-stakes work.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.