Overview
In this tutorial, you’ll learn how to add custom evaluations to a comedy multi-agent LLM app using Galileo. This tutorial is intended for Python developers building domain-specific AI applications. It assumes you have basic knowledge of:- Some familiarity with Python/Flask
- Python Package Manager of choice (we’ll be using uv)
- Code editor of choice (VS Code, Cursor, Warp, etc.)
- API keys for:
- Understand the importance of domain-expertise in Galileo
- Create a custom LLM-as-a-Judge metric to evaluate outputs
Background
For the sake of jumping right into action — we’ll be starting from an existing application and demonstrating how to add custom metrics to an existing application. The app we’ll be building off of is the Startup Sim 3000, an LLM-based Python application that generates either serious or silly startup pitches using OpenAI and real-time data. The app includes two agent chains:- Serious Mode: Uses NewsAPI data and GPT-4 to generate business-style startup pitches
- Silly Mode: Uses HackerNews headlines to inspire parody pitches of absurd tech startups
Create a new Galileo project
In order to set up custom metrics, we’ll need a Galileo project to log evaluations to first.Create a new project from the Galileo Console using the `New Project button`

Get your Galileo API Keys

Set up the project
Clone the project in your IDE of choice.
sdk-examples/python/agent/startup-simulator-3000 folder in the cloned repo.Set up a virtual environment and install dependencies.
Configure your .env file.
.example.env file, copy it, renaming it to .env and add in your own variables. Be sure the variables are added to your .gitignore file.When complete, it should look something like this:Start the Flask app and test out the application
Create a custom LLM-as-a-Judge metric in Galileo
Add metrics to your Log stream in Galileo


Add custom metrics

Create your own LLM-as-a-Judge prompt
Test your metric


Add your Custom Metric

Summary
In this tutorial, you learned how to:- Configure and observe spans in a creative AI agent app
- Translate your domain expertise into a measurable AI quality rubric
- Build a custom metric with LLM-as-a-Judge to evaluate startup pitches
Next steps
- Check out other cookbooks in the Galileo cookbook library
- Explore how to create custom metrics in Galileo using code
- Learn more about the different out-of-the-box-metrics available in Galileo