Gazit argues that prompt iteration is often trial and error rather than engineering. His Traceloop documentation chatbot answered unrelated questions and made mistakes, so he wanted a repeatable way to improve it.
Prompt Engineering is Dead
Speaker
Nir Gazit of Traceloop explains how to improve a RAG chatbot’s prompts with an evaluator and an automated agent at an AI Engineer event.
The evaluator runs a set of documentation questions through the chatbot and scores its answers. Gazit chose an LLM judge and created 20 examples, each with three expected facts, for 60 facts to check. The judge reports pass or fail with reasons, then rolls the results into a score.
A researcher agent collects online prompting guides, runs the evaluator, and uses failed checks and their reasons to generate a revised prompt. Gazit used CrewAI to run this loop, then evaluated each new version to see whether its score improved.
The initial score was 0.4. After two iterations, the score reached 0.9, meaning 90% of the expected facts were correct. Gazit said the resulting prompt was long, while the agent itself took substantial code to build.
Gazit cautions that optimizing against all 20 examples may produce a prompt that works for those questions but fails on new ones. He recommends having more examples and splitting them into training and test evaluation sets. He also notes that the optimizer needs prompts of its own, raising the possibility of using the same approach to improve the evaluator or agent.
Takeaways
- Define answer quality with concrete evaluation examples before changing prompts.
- Use an LLM judge when ground-truth facts are available and its reasons help diagnose failures.
- Track scores across prompt revisions so improvements are measurable.
- Keep test examples separate from those used to optimize the prompt to check for overfitting.
- Account for the code and prompts needed to build and operate an automated optimization loop.
Mentioned in this talk
Search inside this talk
What was claimed 2
- uses
“I've used CrewAI for this”
YouTube Unverified1 source· Talk
- metricautoprompting-demo: The score rose from 0.4 to 0.9 after two iterations; 0.9 represents 90% of expected facts correct.
“The initial score was 0.4. I ran it for just two iterations ... I stopped at 0.9”
YouTube Unverified1 source· Talk














