World's Fair 2025
CI in the Era of AI: From Unit Tests to Stochastic Evals — Nathan Sobo, Zed
Overview
This talk explores the challenges and strategies for testing AI-enabled features, particularly agentic editing in code editors. It emphasizes the shift from deterministic testing to embracing stochastic evaluations when LLMs are involved. The core thesis is that rigorous, empirical software development practices, adapted for the non-deterministic nature of AI, are crucial for building reliable AI-powered products.
Who should watch
- AI Engineers
- Product Managers building AI features
- Developers working with LLMs and agentic systems
- Anyone interested in testing non-deterministic software
Key takeaways
- Traditional deterministic testing methods become insufficient when LLMs introduce stochastic behavior.
- A multi-layered evaluation approach is effective: starting with broad, data-driven evals, then moving to focused stochastic unit tests, and finally to traditional deterministic tests.
- Empirical testing, even with random inputs and iterations, can uncover algorithmic problems and drive improvements in AI agent behavior.
- Techniques like programmatic assertions, fuzzy matching, and streaming diffs are essential for handling LLM output variations.
- Specific issues like incorrect indentation, mismatched XML tags, and problematic escaping behavior can be addressed through a combination of prompt engineering and robust testing.
- The speaker advocates for integrating AI testing within existing test suites rather than relying solely on specialized external frameworks.
- *Rigorous testing is fundamental to building reliable software period.*
- *Embrace this more statistical approach where we're running it 100 times 200 times and asserting a threshold of pass versus fail.*
Notable quotes
Nathan Sobo states that *rigorous testing is fundamental to building reliable software period.*
He also notes that *a lot of the techniques of just traditional good old-fashioned software engineering are still really applicable but we have to embrace this more statistical approach.*
Unofficial community note. Prefer the recording for nuance.