~/talk

Unit testing LLM Agents

Talkat PyCon Israel 2024 · on Monday, 2024-09-16· [ai-assisted-development, testing, python]
github:akariv
slides:none on file

Proposes a practical test setup that runs the agent in a scripted conversational scenario by pairing an actor LM (simulates the user, given a task and stop conditions) with an evaluator LM that scores the whole conversation and returns JSON {success, score, reason}. Implements a Python loop that exchanges messages until the actor signals stop, then asks the evaluator to validate; runs the same scenario many times with temperature sampling (example: 100 runs) to improve coverage. Works in hobby projects, JSON can be flaky so use schema enforcement and a stronger model for evaluation.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10What are LM agents
  3. 3:00What is unit testing
  4. 4:45Problem with unit testing LLMs
  5. 7:15Using LLM as evaluator
  6. 9:03Testing LM agents
  7. 13:08Actor LM prompt design
  8. 15:35Evaluator LM prompt design
  9. 16:22Leveraging temperature
  10. 17:05Conclusion
  11. 17:45Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.