Experiments
Experiments in Opik allow you to link traces (execution data) with dataset items to create a foundation for evaluation and comparison. Experiments let you track, analyze, and compare the performance of your LLM applications across different versions, models, or configurations.
What are Experiments?
An experiment in Opik connects traces (records of LLM executions) with dataset items, creating a linkage that enables structured evaluation and analysis. This connection allows you to:
- Compare different LLM implementations against the same dataset
- Evaluate model performance with various metrics
- Track improvements or regressions over time
- Analyze feedback scores across different versions
Creating and Managing Experiments
The TypeScript SDK provides several methods to create and manage experiments through the OpikClient
class.
Getting Experiments
Deleting an Experiment
Working with Experiment Items
Experiment items are the core components that link dataset items with traces. These connections enable you to analyze how your LLM application performs on specific inputs.
Creating Experiment Items
Retrieving Experiment Items
Experiment URL
Get the URL to view the experiment in the Opik web interface:
Data Structures
Experiment
Represents an experiment in Opik that connects traces with dataset items:
ExperimentItemReferences
References connecting a dataset item to a trace:
ExperimentItemContent
Content of an experiment item including evaluation data and feedback scores:
FeedbackScore
Represents a feedback score for an experiment item: