Skip to content

Using Prompt Studio

Prompt Studio offers three distinct prompt creation journeys to enhance your AI experimentation process. You can select any of the three prompt creation journeys (Generate a prompt, Start from scratch, Prompt library) to initiate your prompt experimentation process. A prompt experiment involves testing and comparing the performance of different AI models using a specific input, known as a prompt. This input can be a phrase, a question, or a paragraph of data, which the AI model uses to generate an output. Prompt experiments are useful for testing and comparing AI models for specific use cases and applications.

On the prompt canvas, you can easily input prompts and select from configured models to automatically generate outputs. You can also add variables, import your dataset, and use in-built prompt templates to get optimized results. You also have access to various enhanced options on the prompt canvas. For more information, see Options on the Prompt Canvas.

Here are the steps to create prompts on the prompt canvas:

  1. Add prompts - Enter your prompts into the designated area.
  2. Apply variables - Introduce any necessary variables to customize your prompts. You can add variables manually or import variables from a dataset.
  3. Add models - Select and add the appropriate models you want to use to generate output.
  4. Generate output - Initiate the output generation process based on your configured prompts and models.

Add Prompts

  1. The System prompt field helps you assign a role to the model. System prompts are optional. You can use the toggle to enable or disable it as needed.

    System prompt

  2. In the Prompt field, you can provide the instructions that you want the model to follow. For assistance, you can click "Generate prompt" to help expand your prompt into a more detailed and elaborative prompt.

    Human prompt

You can also click the "Prompt library" icon (highlighted in yellow in the image above) to explore a selection of templates that contain carefully crafted prompts designed for various use cases.

Note

System Prompts: These are instructions to guide how the model should respond. They define the overall behavior or tone of the model. For example: "You are a helpful assistant."
Human Prompts: These are the questions or requests made by the user. They specify what the user wants the model to do or answer. For example: "Summarize this error log and tell me the likely cause of the issue."

Apply Variables

You can incorporate variables into your prompt. A variable represents the 'key' part of the 'key-value' pair. For datasets, you can use the columns of an uploaded CSV file as variables in the prompt. For a limited number of variables, you can manually type in the values and test the output.

Variables enable you to run prompts with different values simultaneously, generating answers for all of them at once. By attaching variables to your prompts and defining their values, you can execute multiple prompts concurrently.

You can create variables anywhere in the prompt window or system prompt window. To add variables to your prompt, you must use the syntax {{variable}} and then assign a value to the variable. The variables are substituted with their assigned values during prompt execution, and the generated output reflects these values accordingly.

Steps to add variables:

  1. In the Prompt field, add the variables in double curly braces. For example, {{xyz}}. When you add variables in the Prompt field, the Variables column appears, displaying the added variables.

  2. In the Variables window, assign the variables a value (name/text).

    Variables column

    You can click Add an empty row to add multiple rows in the Variables window.

  3. In the Prompt window, check how your entered prompt appears. The variables are substituted with their assigned values.

    Prompt column

Import Test Data

The Import test data option lets you upload datasets with variables from a CSV file. The values for variables in {{}} braces are populated from this file. For a selected column, the variable values are automatically populated from that column for up to 10 rows (if available in the dataset). You can manually edit these entries as needed.

To correctly map the values, ensure the column names in the .csv file match the variables exactly (case-sensitive), such as {{Name}} for a column named "Name." Also make sure the data starts from the first row and first column of the .csv file so that your variables are pulled in correctly.

Note

You can import a maximum of 10 rows of data simultaneously.

Steps to import data:

  1. To import your CSV file with data, on the prompt canvas, click Test data > Import test data.

    Import test data

  2. In the Import test data dialog, upload the CSV file from your local computer or select from existing datasets.

    Import test data dialog

  3. Once you upload the file, you can see a preview of all the data in your CSV file. Click Proceed to accept the file.

    Import test data preview

The prompt canvas will directly fetch the row data from the .csv file into the Variables window. The variables are substituted with their assigned values during prompt execution, and the generated output reflects these values accordingly. You can now easily utilize the data in your prompts, managing and executing multiple variables at once.

Select Models

Test your prompts with different AI models to identify which one best aligns with your needs. You can add and compare multiple models to determine which model provides the most suitable output. You can evaluate factors like accuracy, tone, and relevance to identify the model that provides the most suitable and effective output for your specific use case.

Note

You can add a maximum of 5 models for comparison.

Steps to add a model:

  1. In the prompt canvas, click the Select Model field. A list of models is displayed in the drop-down list.
  2. Select your preferred model for your prompts.
  3. To add multiple models, select different models in the columns on the right.

    Select model

    You can also click the model settings icon to adjust the model parameters like temperature, top k, top p, and max tokens. For more information on other model-related options such as model settings, bookmarking a model, or removing a model, see Options on the Prompt Canvas.

Generate output

After selecting your models, you can generate the output for your prompt. Ensure you have added the desired number of models for comparison before generating the results.

Note

You can generate a maximum of 10 rows of data simultaneously.

Steps to generate the output:

  1. On the prompt canvas, click Run to generate the output.

    Select model

  2. Once the generation is complete, the output is displayed in the model column of the prompt canvas. You can review the matrix in the generated output area to determine which prompt and model best meet your needs.

    The following data is displayed:

    • The response/output from the models.
    • The total number of tokens sent to the model and returned in the response.
    • The time taken by the model to respond with the answer.

For more information on the available options on the prompts canvas, see Options on the Prompt Canvas.