TypeScript SDK Reference
Experiments
Run experiments with multiple datapoints
Galileo Experiments allow you to evaluate and improve your LLM applications by running tests against datasets and measuring performance using various metrics.
Running an Experiment with a Prompt Template
The simplest way to get started is by using a prompt template.
- If you have an existing prompt template, you can fetch it by importing and using the
getPromptTemplate
function from thegalileo
SDK. - In the
runExperiment
options below,datasetName
expects a dataset that you created through either the console or the SDK. Ensure you have saved a dataset before running the experiment!
Running an Experiment with a Runner Function
For more complex scenarios, you can use a runner function. In this case, you may use either a saved dataset or a custom one.
Running an Experiment with a Custom Dataset
When you need to test specific scenarios:
Running an Experiment with Custom Metrics
For sophisticated evaluation needs:
Related Resources
- What are Datasets? - Learn about Datasets and how to work with them
- Creating Datasets - Creating and using datasets in TypeScript
- Creating Prompt Templates - Creating and using prompt templates in TypeScript