nn.Module). It them compiles these modules using “teleprompters” that optimize the module for a particular task. The term “teleprompter” is meant to evoke “prompting at a distance,” and could involve selecting few-shot examples, generating prompts, or fine-tuning language models.
Phoenix makes your DSPy applications observable by visualizing the underlying structure of each call to your compiled DSPy module.
Launch Phoenix
- Phoenix Cloud
- Command Line
- Docker
- Notebook
Sign up for Phoenix:Set your Phoenix endpoint and API Key:From your new Phoenix Space
- Sign up for an Arize Phoenix account at https://app.phoenix.arize.com/login
-
Click
Create Space, then follow the prompts to create and launch your space.
- Create your API key from the Settings page
-
Copy your
Hostnamefrom the Settings page - In your code, set your endpoint and API key:
Having trouble finding your endpoint? Check out Finding your Phoenix Endpoint
Install
DSPy uses LiteLLM under the hood to make some calls. By adding the OpenInference library for LiteLLM, you’ll be able to see additional information like token counts on your traces.
Setup
Connect to your Phoenix instance using the register function.Run DSPy
Now run invoke your compiled DSPy module. Your traces should appear inside of Phoenix.Observe
Now that you have tracing setup, all predictions will be streamed to your running Phoenix for observability and evaluation.

