Skip to main content
Prompts in Galileo allow you to create, store, and reuse LLM prompts across your experiments. They provide a structured way to manage your LLM interactions.

Prompts in the Galileo console

Prompts in the Galileo console The Prompts page of the Galileo console shows you the existing prompts associated with your selected project. Click on All prompts to view all prompts in your organization. Click the Create Prompt button to create a new prompt.

Prompts in code

Create prompts

Connect prompt templates to dataset inputs

When you use datasets in Galileo, the attributes stored in the input in your dataset are made available to your prompt templates using mustache templating. This allows you to create dynamic prompts that adapt to the data in each row. Suppose you have the following dataset:
To reference fields from your dataset in your prompt, use double curly braces:
  • {{ city }} will be replaced with the value of the city field inside the input dictionary.
  • {{ days }} will be replaced with the value of the days field inside the input dictionary.

Get prompts

Once prompts have been created in Galileo, they can be retrieved by name. For project level prompts, pass in either the project name or Id.

List prompts

To list all prompt templates in a project or organization:

Delete prompts

To delete a prompt:

Use prompts in experiments

Prompts can be used in experiments to evaluate different prompt templates:

Best practices

When working with prompts:
  1. Use descriptive names that reflect the prompt’s purpose
  2. Include clear system messages to set context
  3. Document any required input variables
  4. Version your prompt templates appropriately
  5. Test prompt templates with various inputs before using in production

Datasets

Learn about more datasets, the data driving your experiments.

Experiments

Learn how to use datasets and experiments to improve your application.