- Author
- Sarang Sanjay Kulkarni, Thoughtworks
- Published
- 16 June 2026
- Kind
- Industry case study published on Martin Fowler's site
- Original
- martinfowler.com/articles/reliable-llm-bayer.html
- Subject
- Harnesses and agent loops
- Themes
- Handing over control
What it is
Sarang Kulkarni is a Principal Consultant at Thoughtworks. The post explains how PRINCE was designed and what engineering choices kept it reliable.
What it says
- PRINCE grew from a search tool into a question-answering tool and then a multi-agent assistant.
- A LangGraph workflow runs clarify, plan, research, reflect and write steps with pause points.
- Each stage gets its own tailored context, which eases debugging, the post says.
- A planning step gave a dramatic gain in tool selection, the post says.
- Retrieval expands each query into five variants, then reranks about 20 chunks down to 7.
- State is saved after each step, so a failed run resumes at the failed node.
- An LLM review step for generated SQL was dropped after it wrongly flagged valid queries.
What evidence it gives
The evidence is a detailed description of one production system. It includes a worked example query, a 0.7 and 0.3 search weighting, and named metrics. It reports no scores. It says only that results are promising.
Interests and limits
The author works for Thoughtworks, which built the system with Bayer. The post says the design predates the terms context engineering and harness engineering. The post says AI tools helped draft it. Gains such as better tool selection are stated without numbers. Some parts, like domain sub-agents, are described as planned. A disclaimer says it makes no claims about regulatory decisions or product performance.