Why promptfoo flags results that are not real findings
Picture a security team whose first promptfoo red team report lists dozens of failures, many of them behavior the application was built to show. A support bot that declines to reveal internal pricing rules is marked as leaking business logic. A refusal that points users to a human agent is marked as a failed answer. Most false positives come from graders that lack context about the target application, and a vague purpose is the most common reason. The grader judges each response against general criteria, so when it does not know who the users are, what data the application may discuss or which tools it is allowed to call, it has no basis for telling acceptable behavior from a real failure.
The grader only sees what the red team gives it: the attack prompt, the target's response and the grading instructions tied to the plugin being tested. It does not see your architecture, your policies or your intended audience unless that information is written into the configuration. The purpose field carries most of that context. Teams usually need this work before a report goes to a CISO, an AI review board or an external assessor, because a report full of unexplained failures costs more time to defend than the scan took to run. The fix is configuration plus human review of borderline results, not switching grading off, since disabling grading removes the signal the scan exists to produce. The purpose, grader guidance and examples are covered in the rest of this page, and the wider setup is part of the promptfoo false positives guide, which is the official reference for this problem.
Before you tune anything, confirm which model grades results and whether it can see the context you intend to supply, because a strong purpose will not help a grader that never receives it. Compare a sample of flagged results against the behavior your application is designed to show, and sort each one into a real gap, an acceptable refusal or an ambiguous case. The pattern in that sample tells you what to fix: repeated refusals flagged as failures usually point to missing scope in the purpose, while flags on responses that reveal nothing sensitive usually point to plugin criteria that do not match your data. Record which changes you made and why, so an auditor or a later reviewer can trace how a finding was classified. Treat this as an iterative loop that you repeat after each significant change to the application, its prompts or its guardrails, not a one-time cleanup before the first report.
What causes promptfoo graders to mislabel results
Most false positives in a promptfoo red team trace back to the grader being asked to judge a response without enough context about the application. The causes below operate in parallel, and each leaves a recognizable pattern in the report, so reviewers can match a suspicious finding to its likely cause before it reaches a remediation list.
Vague or missing purpose
The purpose field tells the grader what the application is for, so a grader with a one-line or empty purpose has no basis for deciding whether an answer is off-topic, unsafe or simply correct. The pattern to look for is a cluster of findings on ordinary, in-scope questions where the flagged response is a reasonable answer for the product. Compare the purpose text against the application's actual user base, data and tools, and confirm that it names them.
False positives docsNo statement of intended behavior
Even a clear purpose rarely says what the application should do when it is attacked. Allowed refusals, required disclaimers, escalation to a human and permitted data disclosures are all intended behavior, and a grader without them tends to treat a correct refusal as a failure or a required handoff as an unsafe answer. The pattern is findings where the response declines politely or points to a support channel. Write these expectations into graderGuidance so the grader knows what passing looks like.
Grading that ignores tools and retrieval
If the application calls tools or retrieves documents, a response may look like a leak or an unauthorized action when it is in fact grounded in data the user was entitled to see. A grader that reads only the final text cannot tell whether a figure came from an authorized lookup or from an injected instruction. The pattern is findings that quote account data or document text the user could legitimately access. Confirm that the target output passed to the grader includes the tool calls and retrieved context where the setup allows it.
Plugin criteria applied to legitimate domain behavior
A default plugin rule written for general consumer chat can flag behavior that is normal in a regulated domain, such as a clinician asking about dosage limits, a bank explaining fee disclosure or a security team discussing malware samples. The pattern is one plugin producing a high share of findings that cluster around a single kind of legitimate request. Use graderGuidance on that plugin to state which domain behavior is expected and which crosses the line.
Grading model without enough reasoning
The model that grades responses must follow long policies, notice subtle differences between a refusal and a partial answer, and handle the language the application uses. A small or weak grading model tends to over-flag, for example by matching surface keywords such as a drug name or account number. The pattern is inconsistent verdicts on near-identical responses. Compare results from a stronger grading model on a sample set before deciding that the target application has a real weakness, and record which model graded each run.
How purpose, graderGuidance and graderExamples each fix grading
The purpose field describes the application to the grader and to the attack generator. Promptfoo's false positive guidance names vague purpose descriptions as a common cause of mislabeled results, because a grader that does not know who the users are or what the application is allowed to do will judge a reasonable answer as a violation. Write purpose as a plain description of the deployed system: who uses it, what data it can reach, which tools it can call, and what it must refuse. Include the business rules that matter for grading, such as the return window for a retail assistant or the fact that a support bot may show a customer's own order history but never another customer's.
- Name the users and their normal tasks: State who the app serves and the requests they legitimately make, so benign answers are not flagged.
- Describe data and tools precisely: List the systems, record types and actions the app can access, and what it must not disclose or change.
- Set the refusal boundary: Say what the application should decline and what it may answer with caveats.
- Avoid claims you have not verified: Do not write that the app "never" leaks data unless you have tested that claim, because the grader will treat the statement as the standard.
- Keep it current: Update purpose when tools or data sources change, since stale context produces both missed findings and false alarms.
Before a run, ask the application owner to confirm each sentence of purpose against the real system.
The graderGuidance key takes free-form instructions that take priority over promptfoo's default grading criteria. Use it when a rule is specific to your application and the default criteria would misjudge it. For example, an assistant that is required to include a regulatory disclaimer should not fail for omitting a disclaimer in a context where the disclaimer is irrelevant, and a refund assistant may legitimately quote policy text that a generic grader reads as disclosure. Because guidance overrides defaults, a single sentence can change many verdicts, so it needs the same review as code.
- State the pass condition in plain terms: Describe what a compliant response looks like for your application, not only what a violation looks like.
- Scope each instruction: Tie rules to the plugin or behavior they govern so they do not leak into unrelated checks.
- Resolve conflicts explicitly: If two instructions can apply to the same response, say which one wins.
- Avoid contradictory guidance: Instructions that pull in opposite directions produce inconsistent grades that look like grader noise.
- Avoid instructions that hide real failures: Do not write guidance that would pass a response leaking data, simply because the leak looked polite.
After changing guidance, rerun a small set of known passes and known failures to confirm the verdicts moved only where you intended.
The graderExamples key supplies worked examples of an output with its pass or fail verdict, score and reason. Examples can apply globally or to a single plugin, and they show the grader how to apply your standard to edge cases that prose instructions describe poorly. Each example should be a response you have read and judged yourself, with a reason written in the same words you want the grader to use. Examples carry more weight than abstract rules when the boundary is subtle, such as a partial answer that reveals a policy but not a customer record.
- Use examples for borderline cases: Choose responses that sit near the line, since clear cases are handled by the default criteria.
- Scope examples to a plugin: Put a per-plugin example where it applies, and use global examples only for rules that hold everywhere.
- Write the reason as the standard: The reason field teaches the grader what evidence matters, so make it specific.
- Avoid encoding unverified results: An example that marks a response as a pass should reflect a judgment you have checked with a domain reviewer, not an output you assumed was safe.
- Keep the set small and reviewed: A few well-chosen examples are easier to audit than a long list that drifts from current policy.
Ask a second reviewer to read each example and its reason before the run, because a wrong example will repeat its error across every matching result.
How to tune grading before the first trusted report
This sequence measures where promptfoo's grader disagrees with your own judgment on known responses, then fixes the purpose and grader settings until the verdicts and their stated reasons hold up before any finding reaches a report.
Build a labeled set of known responses
Collect a small set of target responses that you have already judged by hand, with a mix of safe refusals, clearly unsafe answers and borderline cases. The engineer who owns the application and a security reviewer should agree on each label and write one sentence on why it is safe or unsafe. The set is done when every entry has a label, a rationale and a note on which plugin it exercises. Keep the set fixed so later reruns compare like with like.
Run a small scan against the labeled set
Run promptfoo's red team grading against the labeled responses, keeping the scan small enough that each result can be read by hand. Record the grader's verdict and its stated reason for every item. Scan size is set separately from grading, so keep the number of probes low for this step and leave probe limits and plugin counts for the sizing work. The step is done when every labeled response has a verdict and a reason in the output.
Log each false positive and false negative
Compare each verdict with the human label and sort the mismatches into false positives, where the grader fails a safe response, and false negatives, where it passes an unsafe one. For each mismatch, note the plugin, the response text and the grader's reason in a short table. A pattern such as refusals being read as leaks usually shows up here. The step is complete when every mismatch is recorded with its plugin and reason, and the team agrees on the list.
Rewrite the purpose with users, data and tools
Revise the purpose field so the grader knows what the application is for, who uses it, which data it may show and which tools it can call. Vague purposes are a common cause of grader error, so name the permitted behavior explicitly, such as which account data a logged-in customer may see and which actions require confirmation. Check the revised purpose by reading it against the mismatched responses: each misjudgment should now have a clear rule it violates or respects. The step is done when the purpose answers those questions for the application owner.
Add graderGuidance for the misjudged rules
Write graderGuidance as free-form instructions for the rules that the grader got wrong. Guidance takes priority over default grading criteria, so state the rule plainly, for example that a refusal with a safe alternative is a pass, or that a balance quoted to the authenticated owner is not a data leak. Keep each instruction tied to a mismatch in the log. Confirm in the output that the grader's reason now cites the guidance on the affected items. The step is complete when each recorded misjudgment is covered by a rule.
Add graderExamples for recurring edge cases
Add graderExamples for the edge cases that repeat across the labeled set. Each example supplies an output, a pass or fail, a score and a reason, and can apply globally or to a single plugin. Use examples for borderline patterns that guidance alone describes poorly, and take the expected reason from the human rationale you wrote in step one. Check that each example's reason matches its stated pass or fail, because a contradictory example teaches the grader the wrong rule. The step is done when every recurring edge case has one example with a consistent reason.
Rerun the same scan and compare the reasons
Run the same labeled set again with the revised purpose, guidance and examples, without changing the responses. Compare each new verdict and reason against the human label, and confirm that the stated reason matches the response text, not just the pass or fail result. Count the remaining false positives and false negatives and record any new ones introduced by the changes. The step is complete when the before and after results are side by side and every remaining mismatch is either fixed or listed for human review.
Route borderline findings to human review
Before results go into a report, set a rule for which findings a person must read: any failure with a weak or generic reason, any item where the grader and the labeled set disagree after tuning, and any new category the tuning did not cover. Assign a named reviewer and record their decision with the finding. Re-run the labeled set whenever the purpose, guidance or grader model changes, so the tuned behavior is verified again. The step is done when the review rule is written down and each borderline finding has a reviewer decision attached.
Grading options and when each one fits
This table compares the grading controls available in promptfoo red teams, what each one changes, and when it is worth the effort. Read it as a sequence: fix the purpose first, add guidance and examples where graders still disagree, and keep manual review for the findings that carry real consequences.
| Option | What it controls | When to use it | Trade-off |
|---|---|---|---|
| Purpose text | The context the grader has about users, data, tools and allowed behavior | Always, before any other change, since vague purposes are a common cause of false positives | Takes writing time and must be kept current as the application changes |
| graderGuidance | Free-form instructions that take priority over default grading criteria | When a plugin consistently flags behavior your application is meant to allow | Guidance written too broadly can hide real failures, so test it against known cases |
| Global graderExamples | Sample output with expected pass, score and reason, applied to all plugins | When the same kind of misjudgment repeats across several plugins | Examples add prompt length and can push graders toward unrelated patterns |
| Per-plugin graderExamples | Sample output with expected verdicts for one plugin only | When one plugin, such as a domain or PII check, misreads a specific response type | More files to maintain, and examples need review when the plugin or target changes |
| Hosted grading provider (default) | Grading performed by the default hosted model | When you accept hosted grading under your data-handling review and want the simplest setup | Grading output and prompts leave your environment, which the data-flow review must cover |
| Local grading model via redteam.provider | Grading performed by a model you run, keeping grading traffic in your environment | When data handling rules prevent hosted grading | Judgment differs from the default, so validate it against your own labeled examples before trusting results |
| Manual review of borderline results | A person confirms or overturns verdicts flagged as uncertain or high impact | For findings that feed a report, a sign-off or a remediation decision | Adds reviewer time on every run, so limit it to borderline and high-severity results |
How a finding moves from probe to report
The flow starts with a probe sent to the target application. The grader receives the target's response together with the purpose, graderGuidance and graderExamples for that plugin, then returns a pass or fail, a score and a reason. Results that are borderline go to a named reviewer who checks them against the application's real behavior. Only confirmed findings reach the report, and each confirmed correction is written back into the guidance and examples so the next run grades the same way. The grader model sits inside a boundary, so check whether it runs locally or on a hosted service before you send sensitive responses to it.
Grader verdicts pass through a named human review before any finding reaches the report.
Reviewing borderline findings before they reach a report
Automated graders still need a human check at the edge of their judgment. The practices below define which results get reviewed, who reviews them, how each decision is recorded, and how corrections improve the next scan.
Define what counts as borderline
Set written criteria before the first scan so reviewers do not decide case by case. Useful triggers include low or middling scores, reasons that contradict the pass or fail verdict, and refusals that still disclose part of the answer. A partial refusal is often the hardest case because the grader may read the refusal wording and miss the leaked detail. Agree these triggers with the team that owns the application and revisit them after the first run.
Assign a reviewer who knows the app
Pick a reviewer who understands the application's users, data and tools, since the grader often lacks that context. A security engineer may spot an injection but miss that a refund reply breaks a business rule, and the reverse is also true. Confirm that the reviewer has access to the purpose text and the system prompt so they judge the response against the real intended behavior, not a general idea of safety.
Record each decision and its reason
Log every reviewed finding with the reviewer, the date, the verdict (confirmed, dismissed or changed), and a short reason tied to the application's stated purpose. Keep the record next to the scan output. Suppressing a finding without a record weakens your evidence for audits, because an assessor cannot tell a sound dismissal from a hidden failure. Ask your compliance team which fields they need before you start.
Feed corrections into graderGuidance
Turn each dismissed false positive into a rule. Add the lesson to graderGuidance, which takes priority over default grading criteria, and add a representative case to graderExamples with the output, pass value, score and reason. Keep examples few and specific, and test each change on the cases it was meant to fix. Review confirmed findings too, so a correction does not hide a real failure.
Rerun the same scan after changes
After any change to guidance or examples, rerun the same scan against the same target so the results are comparable. Compare which findings flipped, check that confirmed failures still fail, and watch for new false negatives that the change might introduce. Record the configuration version with each run so a reviewer can later see which rules produced which verdicts.
Choosing the grading model and what changes when you switch
Grading quality depends on the model that acts as the grader. Every red team result is a judgment made by a model reading the target's response against the grading criteria, so a grader that lacks context will mislabel results whichever model it is. A stronger or more domain-aware grader may reduce some mislabels, particularly on subtle refusals or partial disclosures, but it cannot repair a missing or vague purpose. If the grader does not know who the users are, what data the application holds and what it is allowed to do, a better model will still judge against the wrong standard. Fix the purpose, graderGuidance and graderExamples first, then compare graders on the corrected setup.
Switching graders changes results, so treat the grader as a variable under test. Before you change the grader, save a set of borderline findings with their current verdicts, then re-run the same examples on the new model and record every label that moves. Confirm the grading provider options and any hosted inference requirements in the current promptfoo red team documentation before you commit to a setup, because the options available to you depend on how generation and grading are configured. Re-test after any change to the grader, the target model or the grading guidance, and keep the before and after results together so a reviewer can see why a verdict changed.
The choice of grader also decides where data travels. A hosted grader sends the target's responses and attack content to an external service, which needs sign-off from your security and privacy reviewers. A local grader keeps that content on your infrastructure but may be less capable, which can increase false positives on the same examples. The data-flow review and the local model setup are covered on their own pages in this cluster, so check those before you pick a grader for a regulated application. Record the grader model, its location and the date of each grading run in your evidence so the choice can be reviewed later.
Security and data considerations for tuned grading
Tuned graders carry the context of your application, so the purpose, guidance and examples become sensitive artifacts in their own right. The cards below cover where that content lives, what must stay out of it, how over-tuning can hide real findings, and how grading changes are recorded and reviewed.
Protect examples as sensitive configuration
A useful graderExamples entry often quotes a real policy clause, a refund rule or a customer scenario, so the examples file holds business-confidential text. Store the red team configuration in the same repository controls you apply to application code, with branch protection, restricted write access and review before merge. Ask who can read the repository, since a grader example copied from a support ticket can expose more than the finding it was meant to explain.
Keep secrets and personal data out
Write examples with placeholder values only, such as invented account identifiers and generic names, and never paste a real API key, token, session cookie or customer record into graderGuidance. Examples are sent to the grading model with each evaluation, so anything in them leaves the boundary of the example file. Scan the configuration for credentials before commit and label every illustrative example as illustrative in its comments.
Watch for over-suppression
Each tuning change makes the grader more lenient in some direction, and a broad rule can pass a real vulnerability as safe. For example, a guidance line that accepts any refusal-like wording may mark a partial leak as a pass. Test every tuning change against a set of known failures that must still be flagged, and have a second reviewer check that the suppressed findings in a rerun are truly benign before the grading change is accepted.
Log every grading change
Record who changed the purpose, graderGuidance or graderExamples, when, why, and which findings the change moved from fail to pass or back. A simple change log in the repository, linked to each commit, lets an auditor or security lead trace why a finding was closed. Without it, a later report can show a clean result that nobody can explain. Keep the log with the configuration it describes so the two stay in step.
Review hosted grader traffic
When the grading model is hosted, the prompts that carry the target response, purpose and examples are sent to that service. Confirm which provider handles grading, what data each request contains, and how the provider retains it under your agreement. Compare this with the promptfoo documentation on local operation before choosing a hosted grader, and record the decision in the same review as the grading configuration.
Red team configuration docsQuestions teams ask about tuning promptfoo grading
How much effort does tuning promptfoo grading take?
The effort depends mostly on how many plugins you run, how complex the application is, and how much time your reviewers can give to reading borderline results. A single chatbot with a narrow purpose and a short plugin list usually needs one tuning pass. A multi-tool agent with several domain plugins needs a purpose, guidance and examples for each plugin family, plus a review round after each change. Ask any partner to break its estimate into application discovery, writing purpose and guidance, building a labeled set, reviewing borderline findings and retesting. Each part is one-time work, but you will repeat the review loop whenever the model, prompt or tools change.
Can our own team tune promptfoo grading in-house?
Yes, if one or more people know the application well and can read grader reasons critically. The skill that matters most is judging whether a grader's reason is correct for your product, not knowing promptfoo internals. Your team needs access to the target, the ability to run scans, and time to write down what a correct refusal or a real leak looks like in your context. Teams often struggle when no one owns the purpose text, or when the reviewer is the same person who built the scan and so cannot see gaps in the purpose.
What do we need to provide for a grading tuning engagement?
You need to provide four things: application owners who can describe users, data, tools and permitted behavior; a set of sample responses from the target, including ones you consider safe and unsafe; a named reviewer who can make the final call on borderline results; and access to the target endpoint so that graded outputs can be reproduced. Without the sample responses, the labeled set has nothing to measure against. Without a reviewer with authority, disputed findings stay open and the report is weaker. Confirm each item in writing before work starts, since the scope depends on it.
How do we know promptfoo grading is good enough?
Measure it against a labeled set that you own. Take a sample of graded results, have a qualified reviewer label each as a true finding or a false positive, and then compare the grader's verdicts to those labels. Track disagreements by plugin, because a grader can be accurate for one category and misleading for another. Keep the labeled set separate from the examples you give the grader, or the score will look better than it is. Repeat the check after each change to purpose, guidance or the grading model, and keep the results so you can show how decisions were made.
When do we need a consultant for red team grading review?
Consider outside help when findings go to regulators, auditors, customers or executives, and the review trail matters as much as the result. An independent reviewer can document why a borderline result was accepted or dismissed, and can check that the process is repeatable. Internal teams can still do most of the work, but an outside party is useful when the internal reviewer also built the scan, since that creates a conflict in judging its own grading. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications; independent auditors and certification bodies do that.
Does tuning grading reduce our security coverage?
It can, if the tuning is done poorly. A purpose or guidance that is too broad can teach the grader to pass responses that are actually unsafe, which turns false positives into false negatives. To avoid this, keep negative examples in graderExamples that show clearly failing responses, and test the tuned grader against them after every change. Review whether a reduction in findings reflects a real improvement in the application or a looser grader. Record the number of findings before and after tuning, and check that the sensitive categories still produce failures when they should.
Does tuning grading change which promptfoo edition we need?
Confirm this against the current promptfoo pricing page before you decide. The Community edition is free and includes all LLM evaluation features and red teaming with a monthly probe limit, with community support. The Enterprise edition adds team sharing, access control, SSO, continuous monitoring and remediation recommendations at custom pricing. Writing purpose text, guidance and examples works in the open-source tool itself. Team review workflows, shared review history and centralized monitoring are features to check against the Enterprise listing, not assumptions to make from the open-source documentation.
How DeployOpen works on this
DeployOpen plans, configures and tests promptfoo red team grading for the LLM applications you run in infrastructure you control. The work starts from your written scope and ends with borderline findings reviewed and documented before anything reaches a report.
How we scope
- Agree in writing which applications, endpoints and plugin sets the grading tuning covers.
- Collect the application purpose, user roles, data types and tools so graders have the context they lack.
- Define which finding categories count as failures and which are acceptable behavior for your product.
- Confirm the grading model you are allowed to use, including whether it runs on your own infrastructure.
How we build
- Write a detailed purpose and graderGuidance for each plugin group, based on your application's actual behavior.
- Draft graderExamples with output, pass, score and reason entries drawn from your own expected responses.
- Compare grader decisions against a labeled set of known safe and unsafe responses before wider runs.
- Document each configuration change and the false positive pattern it was meant to remove.
How we hand over
- Deliver the promptfoo configuration files, grading examples and a short review procedure for your team.
- Provide a list of borderline finding types that must be checked by a person before a report is issued.
- Record the grading model, versions and settings used so results can be reproduced later.
- Walk your security and engineering staff through the configuration and the review steps.
How we support
- Offer ongoing support and continuous testing as a retainer after the initial tuning is complete.
- Re-check grading accuracy when the application, prompts, model or plugin set changes.
- Confirm with your team which support terms, response expectations and upgrade handling apply before work begins.

