Custom Datasets
A custom dataset is a set of attacks you already have, such as an internal prompt injection suite. Each attack is a test: a scripted conversation of one or more prompts. Check Point AI Red Teaming sends the prompts to your application exactly as written and judges each conversation. Use it to rerun a known suite against every release and compare the results.
A dataset scan differs from an objective scan in three ways:
- AI Red Teaming doesn’t generate or rewrite attacks. Each conversation runs in its own new session, and its prompts are sent once, unchanged and in order, whatever your application replies.
- Every conversation is judged as a prompt injection attempt. An attack succeeds when a response follows the injected instructions instead of the application’s own instructions. The judge sees the whole conversation and the tool calls your application made.
- The scan takes no objectives, strategy or attack language.
Prepare the file
A dataset is a CSV file encoded as UTF-8, with commas between columns. The first row is a header with these columns, in any order:
Header names are not case-sensitive, and conversation_id or Conversation ID also
match. Other columns are ignored, so you can keep notes or categories in the same file.
Spaces around an id or conversationId are removed.
Download the template to start from:
Conversations
Every row belongs to a conversation, named by its conversationId:
- A single-turn attack is a conversation with one row, so give it a
conversationIdof its own. In the template,C1andC2are single-turn attacks. - A multi-turn attack is several rows with the same
conversationId, sent in the order they appear. In the template,C3sends two prompts in one session. - The rows of a conversation must be next to each other. A
conversationIdthat reappears after other rows is rejected.
Quote prompts that contain punctuation
Attack prompts often contain commas, quotes, line breaks and delimiters. In a CSV file, a comma ends a cell and a line break ends a row, so a prompt that contains either must be wrapped in double quotes. Inside a quoted prompt, write each double quote twice.
A line break inside a quoted prompt is part of the prompt, so a prompt can span several
lines of the file. This file holds two conversations, and the second prompt of C2
spans two lines:
Quoting a prompt that doesn’t need it is harmless, so the simplest rule is to quote every prompt. The quotes that wrap a prompt are not part of it: AI Red Teaming sends what is between them.
A prompt with an unquoted comma would be cut at the comma, so the upload rejects any row
whose number of cells differs from the header’s:
Row 3 has 4 cells, but the header has 3. Wrap a prompt that contains a comma in double quotes.
A quote that is opened and never closed is rejected too:
the CSV can't be read (Quoted field unterminated). Check for unclosed quotes.
Save the file from a spreadsheet
Spreadsheet applications quote cells correctly when they save a CSV, so you can edit a dataset as a sheet with one column per header. Check three things before you upload:
- Save as CSV UTF-8. In Excel, choose CSV UTF-8 (Comma delimited) as the file type. The plain CSV type saves in your system’s encoding, and a file with accented letters or non-Latin scripts is then rejected as not UTF-8.
- Use commas between columns. In regions that use a comma as the decimal separator,
Excel saves CSV files with semicolons between columns. Such a file is rejected with
The file separates its columns with semicolons.Change the list separator in your system’s region settings, or save the file from Google Sheets, which always uses commas. - Keep prompts that look like formulas as text. A spreadsheet can read a cell that
starts with
=,+,-or@as a formula, and save the result in place of your prompt. This affects prompts such as--- END OF INSTRUCTIONS ---. When you open a CSV, import it instead: in Excel, use Data → From Text/CSV and set the prompt column to Text. In Google Sheets, use File → Import and clear Convert text to numbers, dates, and formulas. Check the upload preview for prompts that changed.
To turn a plain-text list with one prompt per line into a dataset of single-turn
attacks, paste the list into column C of a sheet and type prompt in cell C1. Type
conversationId in B1 and fill column B with a distinct value per row, for example
C1, C2 and so on. Optionally type id in A1 and number the rows. Then save as CSV
UTF-8.
Write the file from code
A CSV library quotes cells for you. In Python:
Avoid building rows by joining strings with commas: a prompt that contains a comma or a quote then breaks the row.
Limits
- At most 5,000 prompts per dataset.
- At most 10 prompts per conversation.
- At most 10,000 characters per prompt. A prompt can’t be empty.
- At most 100 characters per
idand perconversationId. Eachidmust be unique within the file. - At most 14 MB per file, and at most 12 MB of prompt text across all prompts.
A file that breaks a rule is rejected as a whole, and the error names each broken row. Rows are numbered as in a spreadsheet, so the header is row 1 and the first prompt is row 2. A blank line in the middle of the file counts as a row with an empty prompt. Duplicate prompts are accepted with a warning and both are sent.
Upload a dataset
- Select Datasets in the sidebar.
- Select Upload dataset and choose the file, or drag it onto the dialog.
- Name the dataset. It defaults to the file name.
- Optionally describe what the dataset tests, in up to 2,000 characters. Scan results show the name and description.
- Choose the folder to upload into. It defaults to the folder you’re filtering by.
- Check the preview: the number of tests and prompts, the first prompts, any ignored columns and any warnings. Then upload.
Each test is labeled OWASP LLM01 (Prompt Injection) and MITRE ATLAS AML.T0051.000 (LLM Prompt Injection: Direct), which the scan’s framework coverage uses.
Manage datasets
The Datasets page lists the datasets in the folder you’re filtering by. Select a dataset to open it. Its tests are numbered in file order, and the prompts of a multi-turn test are grouped under it, with their turn numbers.
- Rename or describe a dataset in the fields at the top of its view. Scans already started keep the name and description they started with.
- Move a dataset from its row menu (⋮ → Move to folder).
- Delete a dataset from its row menu or from its view. A dataset can’t be deleted while a scan using it is still running. Reports of finished scans keep their results after the dataset is deleted.
A dataset’s prompts can’t be edited after upload. To change them, upload the corrected file as a new dataset.
Folders and access
A dataset lives in a folder, like a target, and follows the folder roles. A dataset scan involves two folders, the dataset’s and the target’s, so access depends on your role in each:
A Viewer of the dataset’s folder can therefore run it against a target in a folder where they are a Member. One suite can test targets in different folders this way.
The scan belongs to the target’s folder. Its results show the dataset’s prompts to everyone who can see that folder, including people who can’t open the dataset itself.
Run a dataset scan
- Start a new scan for a target.
- Under Strategy, select Dataset.
- Choose the dataset, then launch the scan.
A dataset with conversations of more than one prompt needs a target that keeps a session between requests. For a single-turn target, such a dataset can’t be chosen, and the dataset list says why.
Read the results
The scan’s results list the dataset under the Custom risk category, with its name and description, and one result per conversation:
- A single-turn result is titled with its
conversationIdand itsid. - A multi-turn result is titled with its
conversationIdand the number of prompts it sent.
Each result shows the conversation, the verdict and the judge’s explanation. See Interpreting Results for how verdicts are scored.