Knowledge Base
Prompt Studio Documentation
Prompt Studio
Goal
Prompt Studio helps transform datasets of any format into structured datasets where each row is a fine-tuning-ready example. This ensures compatibility with AI model training requirements while simplifying the process.
Key Features
- Structured Output: Automatically generate a dataset where every row is a valid training or fine-tuning example for AI models.
- Customizable Prompt Roles: Configure prompts for system, user, and assistant to handle diverse use cases.
- Dynamic Macro Embedding: Define and embed macros directly into prompts using dataset fields, NQL expressions, or literal values.
- Interactive Preview: Validate outputs row-by-row in a conversational format to ensure accuracy.
How to Use Prompt Studio
Step 1: Select a Dataset
- Start by selecting a dataset from the Dataset module in the Prompt Builder.
- This dataset will serve as the source for creating rows aligned with fine-tuning requirements.
Step 2: Define Prompts
For each participant (System, User, Assistant):
- Click the Select button under the respective role.
- Write the prompt text, incorporating placeholders for macros (e.g.,
{{macro_name}}
) where dynamic values should be embedded. - After defining macros in prompts, configure them to pull the appropriate values:
- Field: Map the macro to a column in the dataset.
- NQL (Narrative Query Language): Define a query expression that dynamically generates the macro value.
- Literal: Provide a fixed text value for the macro.
- Save the configuration for each prompt.
Step 3: Preview Outputs
The Preview screen provides an interactive validation tool:
- View the prompts for each row in the dataset in a conversational format, showing the system, user, and assistant messages.
- Use the Prev and Next buttons to navigate through dataset rows and confirm all macros are correctly resolved and formatted.
Step 4: Save the Prompt Mapping
Once the prompts and macros are finalized:
- Use Data Studio to generate a new materialized dataset where each row adheres to the structure defined in the prompts.
- This structured dataset is ready to be used in the fine-tuning process for AI models.
Output Format
The resulting dataset will contain rows formatted as structured conversations, with prompts dynamically filled based on the macros and configurations. This ensures a seamless transition to fine-tuning AI models.