Skip to main content

Working with Datasets

How datasets power and support AI experimentation.

Updated this week

What are Datasets?

Datasets are collections of structured data that allow you to run prompts with dynamic inputs.

By using variable placeholders in your prompt templates (marked with {{ }}), you can automatically replace these placeholders with values from your dataset, enabling systematic prompt experimentation at scale.

Why Use Datasets?

Datasets allow you to run with dynamic inputs as part of your prompt experimentation, replacing the variable placeholder in your prompt template with the relevant variable value in each row of your dataset. There are few key benefits:

  • Scalability: Test hundreds or thousands of prompt variations efficiently

  • Consistency: Maintain uniform testing conditions across all experiments

  • Automation: Process multiple prompts without manual intervention

  • Optimization: Identify optimal prompt structures across different inputs


How to Use Datasets

Creating Datasets Manually

  • Create a Dataset from Your Prompt

    • Type {{ }} in your prompt to define a variable (example: {{country}})

    • A new dataset table will automatically appear below your prompt

    • The table's column header will match your variable name (e.g., "country")

    • Click on "Untitled Dataset" to rename your dataset to something meaningful

  • Add Data to Your Dataset

    • Click the first cell under your column

    • Type your value (example: for {{country}}, type "France")

    • Press Enter to automatically create and move to a new row

    • Continue adding values (example: "Germany", "Spain", etc.)

    • Want more similar examples? Click "Generate Rows" and AI will suggest additional entries based on your existing data

Importing Dataset from a File

  • Open the dataset menu

    • Click "Select Dataset" in your dataset header

    • Click "Create new dataset"

    • Follow the instructions to upload your file

  • Select Your File

    • Supported file type: CSV

    • Browse and select your file from your computer

    • The dataset will automatically populate with your data

  • Connect to Your Prompt

    • Look at the column headers in your uploaded dataset

    • Use these headers in your prompt with {{ }} syntax

    • Example: If your column is named "product_name", use {{product_name}} in your prompt

For more information about managing your uploaded datasets, check out our guide on Managing stored datasets in the Datahub.

Did this answer your question?