Skip to content
0727
InsightsAcademyCasesEventsSign in
中文/EN
Cases/Bayer
← Back to cases
← Previous2 / 127Next →

Bayer

PRINCE: preclinical study search and a multi-agent research assistant
First-party enterprise source Pharmaceuticals / preclinical research Embedded deployment ⚙ Technical reference Deep case | Key delivery chain is substantially documented Evidence level A Internal production use / ongoing iteration
A Evidence level
Building Reliable Agentic AI Systems
Publisher: martinfowler.com / Thoughtworks project team · Project-participant technical retrospective · Direct case-level source
Claim origin: Project participants and Bayer-Thoughtworks coauthored paper · Independent verification: No · Accessed: 2026-09-23
Evidence level measures whether a source can be located and reviewed; it does not mean vendor-reported claims were independently audited.
Deep case | Key delivery chain is substantially documented 12 / 12
Business context2 / 2
Transformation workflow2 / 2
Technical workflow2 / 2
Human roles & governance2 / 2
Measured outcomes2 / 2
Source traceability2 / 2
All six dimensions meet the current completeness threshold.
PRINCE links decades of preclinical reports and structured study data in one traceable workflow. Its transferable lesson is to make citations, read-only SQL, human review, failure recovery, and continuous evaluation part of the production design.
Business problem

Bayer's preclinical data was fragmented across systems: structured study metadata sat alongside decades of PDF safety-study reports, while historical migrations left some metadata missing or inaccurate. Keyword search could not reliably answer questions spanning studies and documents, so researchers spent substantial time finding and checking the approved reports.

Solution

Bayer and Thoughtworks evolved PRINCE from a structured-data search platform into a research assistant. The team integrated study metadata and reports, used RAG for PDF evidence and Text-to-SQL for structured data, and used LangGraph to coordinate intent clarification, planning, research, evidence sufficiency checks, and answer writing. Answers link back to source documents. Researchers review prompts before regulatory-related drafting and remain responsible for the final text.

Technical architecture & production workflow
Step 01
Ingest internal study data and PDF reports into S3, extract and chunk documents, and attach study and section metadata
→
Step 02
Query harmonized structured study metadata through Amazon Athena
→
Step 03
Embed report chunks in OpenSearch; filter by metadata and combine keyword and vector retrieval with reranking
→
Step 04
Generate read-only SELECT statements with relevant schemas and examples, validate operations, and cap returned rows
→
Step 05
Use LangGraph to coordinate intent clarification, planning, Researcher, Reflection, and Writer, with citations in answers
→
Step 06
Persist workflow checkpoints in PostgreSQL and application state in DynamoDB; retry failed steps or switch model providers
→
Step 07
Store traces and expert evaluation sets in Langfuse; evaluate live queries daily without reference answers
Key technology & infrastructure components
React / FastAPILangGraphAmazon S3 / Athena / OpenSearchHybrid RAG retrieval and rerankingRead-only Text-to-SQL validationPostgreSQL / DynamoDBLangfuse / RAGASHuman review and source citations
Human roles & accountability

Researchers can select or adjust data sources and verify answers against linked report pages and original passages. For regulatory documents, a user reviews and edits the drafting prompt, then reviews, validates, and finalizes the output. Domain experts curate evaluation questions and reference answers; the team uses user feedback and production traffic to monitor quality.

FDE delivery actions
  • Start with researchers' cross-system workflow for finding safety-study evidence and build a searchable data entry point
  • Connect PDF originals with incomplete historical metadata while retaining approved reports as verifiable sources
  • Route unstructured retrieval and structured SQL queries by question type, with bounded tool permissions
  • Use expert-curated question sets and real user feedback to evaluate retrieval, answers, and complex-query response time
  • Add checkpoints, node retries, model fallback, and production tracing to multi-step workflows
  • Preserve scientists' review, validation, and final accountability before and after drafting
Reusable delivery patterns
  • When historical metadata is unreliable, treat approved original documents as traceable sources of truth
  • For structured tables and unstructured reports, design separate SQL and retrieval paths before synthesizing evidence
  • Multi-agent workflows need recoverable state, explicit tool boundaries, and stage-specific evaluations
  • High-stakes research and regulatory documents need granular citations and expert sign-off
Business outcomes & delivery results

A paper coauthored by Bayer and Thoughtworks reports that PRINCE integrates more than 18,000 internal studies. Among 15 to 20 frequent users surveyed, 75% reported significantly less time spent searching for information. After the multi-agent system was introduced, average response times for complex queries improved by 30%. The system's ability to fully meet user needs scored 3.1/5 on average; no drug-development timeline or financial return was reported.

Evidence boundaries & verification notes
  • martinfowler.com hosts the article, but its author is Thoughtworks consultant Sarang Sanjay Kulkarni, not Martin Fowler.
  • Bayer and Thoughtworks project participants coauthored the paper; peer review does not make its outcome claims independently audited.
  • The 75% figure comes from feedback by 15 to 20 frequent users. The 30% figure concerns average response time for complex queries; the paper does not publish a full baseline or test sample.
  • The paper also reports a 3.1/5 user-needs score. Neither a shorter drug-development cycle nor automated regulatory decision-making is established.
  • Domain-specific Researcher sub-agents and automatic metadata repair are described as future work, not deployed capabilities.
Primary source: Building Reliable Agentic AI Systems ↗ Additional sources: Bayer-Thoughtworks coauthored paper | PRINCE evolution, implementation, and user feedback ↗
Traceable does not mean independently audited
Open primary public source
0727.ai · Trusted agents, built together.Case research: FDE-case-library ↗ · MIT