Why teams add their own attack prompts to a promptfoo red team with custom intents
A generic plugin set tests the attack categories that a vendor thinks matter, but your own organization often knows attacks that no generic list contains. Abuse attempts your support desk has already seen, prompts customers reported through tickets, and compliance scenarios written by your legal or risk team are all examples of attack material that a general red team may never generate. The intent plugin in promptfoo exists for this gap. It takes your own starting prompts and creates one base test case per intent, so the attacks you already know about become part of the scan instead of a separate manual exercise.
Intents can be entered one at a time as typed text or uploaded in bulk through the Custom Intents tab. Before you upload anything, decide where each prompt came from and what it is meant to test, because that origin will shape how you read the results. A historical abuse attempt, a customer-reported prompt and a scenario drawn from your threat model each probe the application differently, and a single list mixing all three makes findings harder to trace back to a source. Keep the source of each intent in your own records, and confirm with your team that the prompts you plan to upload may be stored and sent through the scan before you add them.
This page covers the intent plugin and the workflow around it: preparing and uploading intents, and combining them with strategies. It does not describe a complete red team plan. Scope, target selection, the purpose field and the choice of other plugins are covered in separate sections and sibling topics, so treat the intent plugin as one input to a broader plan. Check the current intent plugin documentation for the exact upload format and any limits on intent count before you prepare your files, since those details are not set out here.
How the intent plugin turns your prompts into test cases
The sequence runs from collecting your own attack prompts to a set of base test cases that strategies then vary before the target is probed. Each step leaves a checkable artifact so you can confirm the scan is testing what you intended.
Collect and classify your starting prompts
Gather the prompts you want the red team to start from: historical abuse attempts from your logs, prompts reported by customers, and scenarios drawn from your threat model or compliance obligations. Remove duplicates, strip personal data and secrets, and group the remaining items by the behavior they try to elicit. The output is a short, reviewed list in which each item is a single, clear attempt that a reviewer can explain in one sentence.
Add intents by typing or uploading
Add each item to the intent plugin either by typing it into the Custom Intents tab or by uploading the reviewed list in bulk. Typed entries suit a handful of cases, while uploads suit larger collections that already live in a file. Confirm the upload format and any column or line rules in the current promptfoo documentation for your version. Done means the intent list in the configuration matches your reviewed list, with no entries lost or merged during import.
Generate one base test case per intent
When the scan is generated, the intent plugin takes each intent and creates one base test case from it. The number of base cases should therefore match the number of intents you added. Check the generated cases against the originals, because wording can change during generation. Confirm this behavior in the promptfoo documentation for the version you run, since generation details can change between releases.
Review the base cases before any strategy runs
Read every base test case and compare it with the intent it came from. Remove cases that drifted from the original meaning, and keep a record of what was dropped and why. This review is the cheapest point to catch a wrong test, because strategies will multiply each base case into further probes. Done means the reviewed base set is approved and saved with the scan configuration.
Apply strategies to transform the base cases
Strategies then take each approved base case and deliver it in other forms, such as encodings, reframed wording or multi-turn variants, depending on which strategies you enable. Each strategy adds probes on top of the base set, so the total scan size grows with the number of strategies. Confirm which strategies are compatible with your intent cases and whether any need hosted inference in the current documentation.
Send the probes to the target and record responses
The transformed probes are sent to the application under test through the configured target. Responses are stored with the probe that produced them, so every output can be traced back to its intent, its base case and the strategy applied. Check that the run completed for all planned probes and that rate limits or errors did not silently drop cases. Done means the result set covers the planned count.
Grade results and trace each finding to its intent
Grading then decides, for each response, whether the target behaved badly. Because every result keeps its intent, you can report findings per abuse case rather than as an undifferentiated pile. Verify the grading on a sample of borderline results, and confirm the grading approach in the current documentation. Done means each finding links to the original intent a reviewer wrote, which makes retesting the same cases after a change straightforward.
Typed intents versus bulk uploaded intents
This table compares entering custom intents one at a time in the Custom Intents tab with uploading a full source list in bulk. Use it to decide which method fits your scenario count, how often the list changes and who reviews it before a scan runs. The main takeaway is that bulk upload suits a maintained library, while typed entry suits a few targeted scenarios.
| Factor | Typed in the Custom Intents tab | Bulk uploaded set |
|---|---|---|
| Best fit | A handful of targeted scenarios for a specific release or incident | A curated library of historical abuse attempts or compliance cases |
| Setup effort | Low, one entry at a time in the interface | Higher up front, because the source file must be prepared and checked |
| Ongoing maintenance | Edits happen in the UI, so changes are easy to lose track of | Changes are made in the source file and re-uploaded for each scan |
| Review workflow | Reviewers must inspect the entries on screen before the scan runs | Reviewers can read the full list in a file, comment on it and approve it |
| Version control of the source list | Little or none unless you copy the entries into a file yourself | Store the file in Git so every change has an author, date and diff |
| Traceability to sources | Depends on notes you add manually | Can carry an ID or source column per intent if your file includes one |
| Scale | Practical for small sets | Suited to larger sets that would be tedious to type |
| Confirm before you rely on it | Check the current upload format and any size limits in the intent plugin docs | Check the accepted file format and column names with the current promptfoo documentation |
Where good custom intents come from and what to leave out
Good custom intents start from real attacks and real obligations, and each one should be a clear starting prompt. The strongest sources are past incident logs, support tickets where customers reported unsafe or unexpected answers, threat-model scenarios written by your security team, and compliance test cases your assessors or internal policies already expect you to cover. Pull from each source deliberately rather than dumping everything in. Write every intent as a single, self-contained message a real user or attacker could send, with enough context to stand on its own. Vague entries such as "try to get refunds" produce vague base tests, while a specific request that names the product, the policy and the pressure being applied gives the plugin something to work from. Confirm with your security owner which sources are approved for test use before anyone copies material across.
Before uploading, strip personal data and live secrets from every intent. Support tickets often contain names, account numbers, email addresses, card fragments and session tokens, and incident logs can contain API keys or internal hostnames. Replace identifiers with clearly fake placeholders, remove credentials entirely, and check that the intent still reads as the attack pattern it represents. Then deduplicate. Several tickets often describe the same attempt, and near-identical intents inflate the number of base tests without adding coverage, which matters later when you size the scan. Keep a short note of where each intent came from so a reviewer can trace it.
Treat the intent file itself as sensitive. Even after cleaning, intents can describe how your product fails, which policies customers have tested, or fraud patterns that are still active, so store and share the file under the same data policy as the incident records it came from. Confirm who may edit it, whether it may be stored in version control, and whether its contents may be sent to any hosted service during generation or grading. That last question depends on how your red team is configured, so check it against your data-flow review before the first upload.
What goes wrong with custom intents and how to avoid it
Custom intents are only as useful as the prompts behind them. The six risks below affect scan quality, scan size, data exposure and the reliability of findings, and each one has a control you can check before a run.
Vague intents produce off-target probes
An intent such as "bypass security" gives the intent plugin little to work with, so the base test cases drift away from the abuse you actually saw. Write each intent as a specific request with the user role, the goal and the data or action involved. Before the scan, read the generated probes for a sample of intents and confirm they match the scenario you meant to test.
Intent plugin docsDuplicated intents inflate scan size
The intent plugin creates one base test case per intent, so near-identical entries multiply the work sent to the target and the grading calls. Collapse paraphrases from ticket exports and incident notes into one representative intent per scenario. Compare the intent count to the probe count in the run summary, and treat any unexpected growth as a sign of duplicates.
Stale intents miss current threats
Intents copied from last year's incidents may describe tools, prompts or policies the application no longer uses. Tag each intent with its source and a review date, and retire entries tied to features that have changed. Re-check the list whenever the purpose, tool set or model changes, so the suite reflects how the application is attacked today.
Customer data leaks into intent files
Customer-reported prompts often contain names, account numbers, addresses or pasted records. Once uploaded, those values sit in the intent file, in configuration and in report output that others may read. Redact or replace personal and financial data with placeholders before upload, and review the file with the same care as any dataset that leaves your control.
Intents conflict with the application purpose
An intent that asks the application to do something its purpose forbids, or that assumes a tool it does not have, produces results that are hard to interpret. A refund request framed for a product the application never sells will be judged against the wrong rules. Check each intent against the written purpose and remove or reword any that contradict it.
Thin purpose weakens grading
Graders decide whether a response is a finding by comparing it with the purpose, so a short purpose leaves custom intents without a clear standard. A borderline refusal may be marked as a failure, or a real data disclosure may pass. Before relying on results, state what users, data and tools the application handles, and spot-check graded findings against the intent that produced them.
Setting up custom intents in a promptfoo red team
This sequence takes you from a confirmed promptfoo install to a small scan of your own attack prompts, with a check at each step so you know each intent became a base test case before you spend probes on a full run.
Confirm promptfoo version and Node.js
Check that the promptfoo version you plan to use and your Node.js runtime meet the requirements for that release. The current npm release, 0.124.1, requires Node.js 22.22.0 or newer, so run the version commands on the machine or CI runner that will execute the scan and record both results. Done when
promptfoo --versionreturns the version you expect andnode --versionreports 22.22.0 or newer. If either check fails, fix the runtime before continuing, because later steps depend on the same install.Write the red team purpose
Before adding any attacks, write the purpose field in your red team configuration. Describe the application, its users, the data it can reach and the tools it can call, and state what a successful attack would look like for your organization. Your custom intents are only as useful as this description, because it guides how the attack prompts are framed and how the grader judges responses. Done when a colleague who did not write the file can read the purpose and say what the application is for and what must not happen.
Add the intent plugin to the configuration
Open your promptfoo red team configuration file and add the intent plugin to the list of plugins. The plugin takes your own starting prompts, such as historical abuse attempts or compliance scenarios, and creates one base test case per intent. Confirm the target endpoint is set in the same file so the scan has somewhere to send the prompts. Done when the config validates and the intent plugin appears in the plugin list with no other plugins that you did not intend to include.
Enter or upload intents in the Custom Intents tab
Open the Custom Intents tab in the promptfoo interface and either type each intent directly or upload a file containing your prompts in bulk. Use a mix of historical abuse attempts, customer-reported prompts and threat-model scenarios, and label each one so you can trace results back to its origin later. Done when the tab lists every intent you supplied, with no duplicates or blank entries, and you have saved the set.
Confirm one base test case per intent
Generate the test cases and count them against your intent list. The intent plugin should produce exactly one base test case per intent, so a list of 20 intents should yield 20 base cases. If the count is higher or lower, check for duplicated lines, blank rows or intents that the tool merged. Done when the number of base test cases matches the number of intents and you can open a sample and see your original wording in it.
Run a small scan with strategies
Run a deliberately small scan that includes the intent plugin and the strategies you plan to use with it, starting with a limited number of intents. Strategies deliver the base prompts in different forms, so each base case can produce more than one probe. Watch the probe count the run reports before you start, and confirm it matches your expectation from the previous step multiplied by the strategies you chose. Done when the scan completes without configuration errors and the probe count is what you calculated.
Review generated probes and results
Open the generated probes and the results from the small scan. Check that each probe still carries the intent it came from, that strategy transformations did not change the meaning of the attack beyond what you intended, and that the grader's verdicts are reasonable for a sample of responses. Record any intents that produced unclear or mislabeled results so you can refine the wording or grading guidance before a larger run. Done when you have a short list of confirmed findings, a list of intents needing revision, and agreement on whether to expand the scan.
How custom intents flow from source list to findings
The flow starts with your own source material, such as incident logs, customer-reported prompts and threat scenarios, which you enter or upload in the Custom Intents tab. The intent plugin turns each intent into one base test case, and the chosen strategies then reshape those base cases before they reach the target. Your side of the boundary holds the source data and the review step, while the target application only receives probes. Check that every finding traces back to a source intent before it goes into a report.
Source intents become probes against the target, then return for grading and human review.
Security and data handling for custom intent files
Custom intent files often contain real abuse attempts, customer complaints and internal threat scenarios, so they carry data and access risks of their own. The cards below cover how to classify, restrict, scrub and approve intent lists before they are uploaded to a promptfoo red team.
Treat intent files as sensitive
A custom intent file can reveal your threat model, the abuse cases you have already seen and the weak points you are watching. Store it with the same classification as your security test plans, not as a throwaway prompt list. Keep it in version control or a restricted document store, and decide who may read it before anyone uploads it to a scan. Confirm the storage location with your security team before work starts.
Limit who can edit intents
Editing an intent changes what the scan sends to your application, so write access should be narrower than read access. Assign one owner for each intent list, require review for changes, and keep the upload step separate from the step that edits the file. Self-hosted promptfoo does not provide role-based access control or built-in SSO, so enforce these limits through your repository permissions, file shares and deployment access.
Keep customer prompts free of personal data
Customer-reported prompts often include names, account numbers, addresses or medical details. Remove or replace these before the prompt becomes an intent, and keep the original ticket in your case system instead of the test file. Rewrite the attack pattern, not the customer's details. A short illustrative example: replace a real account number with a placeholder such as ACCOUNT_ID so the test still exercises the same behavior.
Check where probes and results go
Intent plugins generate test cases from your starting prompts, and hosted generation and grading send content to promptfoo's hosted API. Before you run, confirm which steps use the hosted path for your plan and configuration, and whether any intent text leaves your network. If that is not acceptable, plan local generation and grading instead. The promptfoo docs describe the intent plugin itself; the full data-flow review is covered in the separate data-handling topic.
Intent plugin docsRecord who approved the intent list
An intent list defines what your red team tested, so auditors and risk owners will ask who agreed to it. Record the approver, the date, the source of each intent and the version of the file that was used for each scan. Keep this record with the scan results so a later rerun can show whether the attack set changed. Your compliance lead should confirm the approval format your organization requires.
Keep intent history under version control
Each intent file version should map to a specific scan, so a finding can be traced back to the exact prompts that produced it. Commit changes with a reason, tag the version used for a formal test, and avoid editing a file in place after results exist. This also makes it possible to remove a prompt that turns out to contain personal data without losing the history of what was tested.
Questions teams ask about custom intents in promptfoo
Who does the work of adding custom intents to a promptfoo red team?
Your team usually supplies the intent sources and the purpose, and the person who builds the configuration adds the intents to the red team. Custom intents are entered as typed text or uploaded in the Custom Intents tab, so the mechanics are simple. The harder part is deciding which abuse attempts, customer-reported prompts and threat-model scenarios belong in the set and writing them so they reflect how your users actually behave. DeployOpen can take on the planning, curation and configuration as a fixed-scope engagement if you prefer to hand it over, with the scope agreed in writing before work starts.
What does our team need to supply before custom intents are useful?
Three things matter most. First, intent sources: historical abuse attempts, prompts reported by customers, and scenarios from your threat model or compliance obligations. Second, a clear purpose that describes the application, its users, the data it touches and the tools it can call, since the purpose shapes how the attacks are generated and graded. Third, a target endpoint that promptfoo can reach, along with the credentials and rate limits needed to run the scan. Remove any sensitive customer data from intent sources before they are uploaded, and confirm with your data owners how that material may be stored.
Can an in-house engineer set up custom intents without outside help?
Yes, an engineer who already runs promptfoo can add intents, provided they understand the target application and have access to the sources. The configuration itself is not complex. What tends to take time is reviewing the generated test cases, checking whether a case is a real attack on your application or a harmless prompt, and keeping the list current. If nobody on the team has run an LLM red team before, plan time for learning how grading and strategies behave before relying on the results.
How does intent curation affect ongoing effort?
Curation is the recurring part of this work. Each time you add a new abuse pattern, a customer report or a model change, someone has to decide whether the intent is still relevant, remove duplicates and retire prompts that no longer reflect the threat. A small, well-maintained intent list usually produces clearer findings than a large, unreviewed one. Assign an owner for the intent library, set a review cadence that matches how often your application or threat landscape changes, and record why each intent exists so later reviewers can judge it.
What cost drivers apply to custom intents on the Community edition?
The Community edition is free and includes red teaming with 10k probes per month, according to promptfoo's pricing page, so the main costs are people and the compute and model calls used during a scan. Each intent creates a base test case, and strategies multiply the number of probes sent to your target. Plan the probe budget against the monthly limit, the number of intents, the strategies you apply and how often you rerun the suite. Your own time for curation and review is usually the largest cost.
How do Enterprise and On-Premise change the cost of custom intents?
Enterprise adds team sharing, access control, SSO, continuous monitoring and priority support with SLAs, and it is sold at custom pricing, according to promptfoo's pricing page. On-Premise runs that functionality on your own infrastructure with a dedicated deployment engineer. The added cost comes from the license, the infrastructure you run it on, and the staff who operate it. Ask the vendor for a written quote that states what is included, the support terms, and whether the deployment engineer is part of the price. No price is given on this page, and DeployOpen quotes follow a written scope.
What should a quote for custom intents work include?
A quote should match a written scope. Ask for the number of intent sources to be reviewed, the target endpoints to be configured, the strategies and plugins to combine with the intents, the expected number of reruns, and the review steps for generated cases. Also ask who handles findings triage, what evidence is delivered, and how retesting is handled after fixes. Confirm which items are one-time work, such as the initial curation, and which recur, such as ongoing intent review and rescans. Clear boundaries prevent surprises when the intent list grows.
Keeping intent libraries current and useful as evidence
Treat the intent file as part of the red team configuration, not as a loose spreadsheet. Store the intent file in the same version control repository as the promptfoo configuration, so every scan can be traced to the exact set of starting prompts it used. A commit history then answers the question auditors and security reviewers ask most often: which attack prompts were tested, when were they added, and who approved them. Record the promptfoo version used for each run alongside the configuration, since the release you install determines how plugins and strategies behave. Confirm the version and release notes for your installed build in the promptfoo releases page before you upgrade, and rerun the library after any upgrade so you can tell a change in the application from a change in the tool.
Review the library on a fixed trigger rather than only when someone remembers. Good triggers include a confirmed incident or near miss, a customer report that exposes a new abuse pattern, a change of model or model version, a change to the system prompt or tools, and a new deployment to a regulated market. For each review, remove intents that no longer reflect a threat, add the new ones, and mark which entries were changed so the next scan's results can be compared fairly. Keep the original intents for a known incident so you can prove the fix still holds. Name an owner for the library and record each review date and decision in the repository.
Retain the run records that show testing was performed: the configuration and intent file for each scan, the promptfoo version, the target identifier, the report output and the remediation decisions taken on findings. Set retention periods with your legal and records teams, and store the records somewhere your own team controls. Be precise about what this evidence is. A passing or failing red team run shows that specific attempts were made on a given date against a given configuration. It is not an audit result, and it does not establish that a system conforms to any framework. Independent auditors and certification bodies decide conformity, and they will ask what your controls cover, which is why the records should show scope and limits as clearly as results.
How DeployOpen scopes and delivers promptfoo red team setup
DeployOpen approaches custom intents as part of a wider promptfoo red team, starting from the attack prompts your organization already knows about. We scope which abuse attempts, customer-reported prompts and threat-model scenarios go into the intent plugin, then build, test and document the setup so your team can rerun it. Engagements are fixed-scope, with the work agreed in writing before it starts.
How we scope
- Inventory the abuse attempts, customer-reported prompts and threat-model scenarios your teams already hold, and agree which ones belong in the intent plugin.
- Write the intent list, its grouping and its owners into the written scope, so each uploaded prompt has a clear reason for being tested.
- Confirm the target endpoint, the strategies to combine with intents and the grading approach before any probes are generated.
How we build
- Create the intent definitions in promptfoo, typing or uploading them through the Custom Intents tab, and check each one produces the expected base test case.
- Combine intents with the strategies agreed in scope and run a test pass to confirm the target responds and grading behaves as expected.
- Review borderline grading results with your team and adjust intent wording before the full suite is treated as the baseline.
How we hand over
- Deliver the intent file set, the red team configuration and a short runbook describing how to add, retire and rerun custom intents.
- Document which intents came from which source, so reviewers can trace each test back to its original incident, report or scenario.
- Walk your engineers through a rerun and leave the setup in infrastructure you control, with the sources and owners recorded.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, covering new intents as your threat model changes.
- Retainer work can include rerunning the custom intent suite after model, prompt or guardrail changes, with results shared in writing.
- Ask for the support scope, response expectations and retest approach in the written quote before the engagement starts.

