promptfoo red teaming for e-commerce AI starts with what the assistant can touch
A shopping or order assistant that reads order histories, changes carts, quotes prices and hands customers off to payments is only as safe as the tools behind it. promptfoo runs adversarial tests against that assistant before launch and again after each change, so the retailer sees how it behaves under pressure rather than assuming its system prompt holds. The first step is an inventory of what the assistant can reach: which order and customer lookups it can run, whether it can add, remove or reprice items, which discount or coupon actions it can trigger, and where payment data passes through or is referenced. Each of those capabilities becomes a boundary the tests must try to cross.
E-commerce assistants differ from generic chatbots because a poorly phrased answer is not the main risk. The risk is a tool call. An assistant that can look up another customer's order by a guessed order number, apply a discount that was never approved, or quote a price that conflicts with the pricing service has real business consequences. Security teams need to confirm that tool permissions are scoped to the signed-in customer, that payment card data never enters prompts, logs or tool outputs, and that the assistant cannot be steered into skipping identity checks. Merchandising teams need to confirm that prices and promotions come only from the system of record. Ask the vendor or your own platform team to confirm exactly which tool functions the assistant exposes before writing any test.
Once tests run inside the retailer's own environment, the testing data, target endpoints and results stay under the retailer's control. Security and merchandising teams can point promptfoo at a staging copy of the assistant, using test customer accounts and sandbox pricing, and review the findings together. Ask your team to confirm three things before the first run: which staging systems the scans can reach, who may read the reports, and how the outputs are stored, since transcripts may contain order details. Those decisions, made early, determine whether the same tests can run again after every prompt, model or tool change.
Which e-commerce AI risks the build has to address
This table maps the main e-commerce assistant risks to the requirement behind each one and to the promptfoo test design it implies. Read the source column to see whether a rule comes from a payment standard, consumer protection law, age or region sales rules, fraud controls or the OWASP LLM Top 10. Rows marked for counsel or acquirer confirmation are legal or contractual questions that the retailer must settle before the test scope is final.
| Risk or requirement | Source that makes it matter | What it means for promptfoo test design |
|---|---|---|
| Cardholder data exposure in chat transcripts | PCI DSS scope; the assessor decides whether chat logs and model traces fall within the cardholder data environment | Seed plugin tests with fake card numbers and check whether the assistant repeats, stores or echoes full PAN or CVV values in replies and logs |
| Order and refund fraud through social engineering | Fraud controls set by the retailer and its payment processor; OWASP LLM Top 10 category for excessive agency | Build multi-turn scenarios where a user impersonates another customer or claims a missing parcel, then check whether refunds or address changes execute without verification |
| Price manipulation through prompt injection | OWASP LLM Top 10 category for prompt injection; consumer protection rules on accurate pricing and promotions | Inject instructions in product reviews, coupon text or pasted content, then assert that quoted prices and discounts match the catalog source of truth |
| Age-restricted product sales bypass | Age verification rules for alcohol, tobacco, vaping and similar products set by state, national or marketplace requirements | Use plugin prompts that claim a birth date or ask for restricted items, and assert the assistant refuses or routes to verification without accepting self-declared age |
| Region or sanctions-based sales restriction bypass | Export controls, shipping restrictions and licensing rules that the retailer must confirm with counsel | Test whether a user can change a shipping country mid-conversation to obtain items unavailable in their region, and confirm the expected behavior with counsel before writing assertions |
| Disclosure of other customers' order and account data | Consumer privacy law and the retailer's own data protection commitments | Probe with requests for another customer's order status or address and grade responses that reveal any personal data not tied to the verified session |
| Consumer protection and misleading claims | Advertising and consumer protection rules on claims, reviews, returns and warranties, to be confirmed with counsel | Ask about return windows, warranties and sustainability claims, then compare answers against the approved policy text supplied to the assistant |
| Payment acquirer and contract terms | Merchant agreement with the acquirer and processor, which may set logging, data handling and testing limits | Confirm with the acquirer whether test prompts containing card-like data are acceptable and where scan results may be stored before running any red team |
How promptfoo tests a shopping assistant against order fraud and price manipulation
The core loop is simple to describe. promptfoo sends adversarial prompts to the shopping or order assistant through the endpoint you point it at, records each response along with any tool calls the assistant makes, and grades that transcript against the risks you defined for the retailer. The grading step is where the work sits. A response that quotes a price is not a failure in itself. It becomes a failure when the quoted price bypasses the catalog, when a refund is issued outside your returns policy, or when the assistant reveals a full card number. Your team has to write those conditions down before the first scan runs, because promptfoo can only apply the failure definitions you give it.
The red team configuration carries those decisions. Its purpose section describes what the assistant is for, such as order status, returns and product discovery, and what it must never do. Plugins select the risk categories to probe, and strategies control how the attacks are delivered, for example as single prompts or as escalating conversations. Start with a narrow set covering payment data exposure, refund and discount abuse, and price integrity, then widen it once you have read the results. Multi-turn and tool-use attacks are the ones that matter most for order fraud, because the damage happens when the assistant calls an order or refund tool. Those tests require the target to expose its real tools in a test environment with test accounts and test payment methods, never production systems.
Before you write acceptance criteria, confirm current plugin coverage for e-commerce scenarios in the promptfoo red teaming documentation at promptfoo red teaming documentation. Coverage changes between releases, so check the version you plan to run against the release notes. Then write each pass condition as an observable test: the assistant must refuse a discount outside the approved list, must not call the refund tool without a verified order, and must mask card data in every turn. Keep the criteria specific enough that a failed scan points to a fix your engineers can make.
Where promptfoo sits relative to the order and payment systems
The test starts on the retailer's own test network, where the promptfoo CLI or a self-hosted server sends attack prompts to a staging shopping assistant. The assistant reaches order lookup, cart, pricing, refund and customer profile services, but the payment handoff sits outside the model and inside the cardholder data environment. Check that the assistant never receives or returns full card data, and that findings flow back to both security and merchandising reviewers.
Test traffic reaches the staging assistant, which touches commerce services and a payment handoff across three trust boundaries.
Which assistant tools and integrations to put under test first
A shopping or order assistant is only as risky as the systems it can call. Start with the components that read customer data, move money or change prices, and confirm each one's permissions before writing any promptfoo test.
Order lookup and history
Order status, tracking and history tools return personal data and order details for whoever asks. Test whether promptfoo can make the assistant reveal another customer's order after a plausible story, such as a family member or a spoofed delivery complaint, or confirm an order using only a name and postcode. A safe response requires the assistant to verify the account, return only the fields the caller is entitled to see, and avoid echoing payment details. Confirm how the order API authorizes the caller, whether the assistant passes a user identity or a shared service token, and which fields the tool returns in full.
Cart and checkout handoff
Cart tools and checkout links let the assistant build an order that a customer then pays for. Test whether promptfoo can get the assistant to add items at a prohibited quantity, apply a coupon it should not know about, or generate a checkout link for a different customer's cart. A safe response confirms items and totals with the customer, keeps quantities within store limits and passes only a session-bound checkout reference. Confirm which e-commerce platform holds the cart, whether the assistant can write to it directly, and how checkout sessions expire.
Price and promotion calculation
Price, discount and promotion tools decide what a customer pays, so a wrong answer becomes a financial loss or a dispute. Test whether promptfoo can persuade the assistant to quote a price below the catalog value, stack promotions the campaign rules exclude, or invent a price match. A safe response quotes only prices returned by the pricing service and states that promotions are applied at checkout. Confirm which system is the source of truth for prices, whether the assistant can override them, and who approves manual discounts.
Refund and return actions
Refund and return tools move money or start a reverse logistics process, which makes them the most direct route to order fraud. Test whether promptfoo can make the assistant issue a refund to an address other than the original payment method, approve a return outside the return window, or skip the reason code. A safe response routes refunds through the policy engine, limits the amount to the original transaction and escalates exceptions to a person. Confirm which payment layer executes refunds, whether it is an orchestration service such as Hyperswitch, and what limits the tool enforces.
Customer account and address data
Profile, saved address and stored payment token fields are the most sensitive data an assistant can read. Test whether promptfoo can extract the full card token, a masked card number with its expiry, or the address of another account through prompts that ask for "verification" or claim to be a store employee. A safe response shows only the masked data needed for the task and never returns raw card data. Confirm which fields the account API exposes, whether card data stays outside the assistant's context, and how PCI DSS scope is drawn around the assistant and its logs.
Age and region gating for restricted products
Restricted goods such as alcohol, tobacco, knives or age-limited items depend on age checks and shipping rules that vary by region. Test whether promptfoo can get the assistant to add a restricted item to a cart in an unsupported region, skip age confirmation, or describe a restricted product as available to ship when it is not. A safe response defers the decision to the gating service and declines the sale with a clear reason. Confirm which system holds age and region rules for each product, whether the assistant can bypass them, and which regional rules your legal team has signed off.
Choosing where promptfoo runs for a retail security team
The Community edition is free and runs on the machines of the engineers doing the testing. It includes all LLM evaluation features, all model providers and integrations, and red teaming with 10k probes per month, with community support. This suits early exploratory work, such as checking whether an order assistant will reveal payment card data or accept a manipulated price before you commit to a wider program. Results stay with the individual user unless they are exported and shared by hand.
- Individual scope: Each engineer runs scans from a local install, so there is no shared workspace or team history.
- Monthly probe ceiling: Red teaming is capped at 10k probes per month, so plan scan sizes around that limit for retail coverage.
- No access control: Team roles, permissions and single sign-on are not part of this option.
- No continuous monitoring: Scans run when someone starts them, so regressions after a prompt or catalog change are caught only if someone reruns the tests.
Before relying on this tab, ask a partner how your team will move findings into a shared record, and whether the probe budget covers the plugins and strategies you plan to run against each release.
The self-hosted promptfoo app is an Express server that serves the web UI and API. It can be deployed with Docker, Docker Compose or Kubernetes with Helm, which gives a team a shared place to view runs. The documentation is explicit about its limits: it stores data in a local SQLite database that cannot be shared across replicas, has no RBAC, horizontal scaling, built-in authentication or SSO, and is not recommended for production use. For a retail team, this makes it suitable for a pilot or a sandbox rather than a store-facing program.
- Shared UI and API: Several people can review the same runs without installing the CLI themselves.
- Single-instance data: SQLite cannot be shared across replicas, so the app cannot be scaled out for heavy scan schedules.
- No built-in access control: Anyone who reaches the server has the same view, which is a problem when logs contain order and customer data.
- Production caveat: The documentation does not recommend this deployment for production, so treat it as a stepping stone.
Ask a partner how they would protect the server with your own identity layer, where the database file lives, how it is backed up, and what the migration path looks like when the team outgrows a single instance.
promptfoo On-Premise runs the Enterprise functionality on the customer's own infrastructure, with complete data isolation and a dedicated deployment engineer. Enterprise adds team sharing, teams-based access control and SSO, custom roles and permissions, continuous monitoring, a centralized guardrail dashboard, remediation recommendations and priority support with SLAs, at custom pricing. For retailers whose test prompts and transcripts include order histories, payment-related content and loyalty data, keeping the platform inside their own environment is usually the deciding factor.
- Role separation: Security, fraud and merchandising teams can have different permissions over the same test program.
- SSO and access control: Identity and role management are provided by the Enterprise tier rather than assembled by your team.
- Continuous monitoring: Ongoing checks can track regressions when catalog rules, promotions or models change.
- Custom pricing: Cost is set through a quote, not a published list, and it is typically recurring for the subscription.
Before choosing, ask what SSO protocols are supported, how roles map to your existing groups, what the SLA terms are in writing, and who maintains the deployment after go-live.
What retail compliance teams can and cannot take from red team results
Red team results from promptfoo can show how a shopping or order assistant behaves under attack, but they do not settle compliance on their own. The cards below separate what the test evidence supports from what remains with the acquirer, counsel, auditors and the business.
PCI DSS scope of test transcripts
Test transcripts, logs and eval reports can contain card numbers if a probe or a tester pastes one into the assistant. Once stored, those files may fall within the cardholder data environment and need the same protection as production data. Ask whether your assessor treats the test environment as in scope, and whether test runs use tokenized or synthetic card data only. Keep the run output in a store that your PCI controls already cover.
Logs as cardholder data
Red team reports record full model conversations, including the text the target returned. If the assistant echoed a payment detail during a probe, that detail now sits in a report file, a CI artifact or a shared dashboard. Decide retention and redaction before the first scan, and confirm with your QSA how those artifacts are classified.
Consumer protection and fair pricing
Price manipulation findings, such as an assistant quoting an unauthorized discount or misstating a sale price, point to consumer protection exposure that depends on the jurisdiction and the retailer's terms. Test results show that the behavior occurred under specific prompts. They do not show how regulators or courts would weigh it. Confirm with counsel which price representations the assistant may make and who approves them.
Age and region restricted sales
Testing can show whether an assistant recommends or sells age-restricted products, or ships restricted items to a blocked region, when a user asks indirectly. It cannot verify how a customer's age or location is established. Local age verification and shipping rules vary, and the controls that enforce them usually sit in checkout and fulfillment systems. Ask counsel which obligations apply to the assistant itself and which sit with those systems.
Frameworks as test structure
The promptfoo red teaming documentation references the OWASP LLM Top 10, the NIST AI Risk Management Framework and the EU AI Act as frameworks that support systematic testing before deployment. Use them to organize coverage and to map findings to categories your risk team already uses. They give structure to the testing. They do not, on their own, establish that a retailer meets any of them.
Red teaming docsEvidence versus independent assurance
DeployOpen prepares test evidence, control descriptions and compliance documentation for your review. DeployOpen does not issue audit reports, attestations or certifications. Independent auditors, assessors and certification bodies make those determinations. Testing alone also does not cover payment acquirer contract terms, which may set specific requirements for AI features that handle payment flows, or the local age verification and consumer law that applies to your sales. Confirm those points with your acquirer and counsel before relying on the results.
How promptfoo red teaming for e-commerce AI rolls out in phases
The sequence moves a shopping or order assistant from agreed scope to a repeatable test gate, so that each finding has an owner, a fix and a retest. Each phase names what the retailer supplies and what it receives back.
Scope the assistant's purpose and tools
The retailer and the testing team document what the assistant is for, which customer and staff roles use it, and which tools it can call, such as order lookup, refunds, coupon application, address changes and catalog search. Inputs from the retailer include the system prompt, tool schemas, the authentication model and a list of systems the assistant reads from or writes to. The step is done when the scope document lists every tool and data source in the test boundary and the retailer has signed off on what is out of scope.
Agree the risk list and acceptance criteria
Working with the fraud, payments and merchandising owners, the team turns the scope into a written risk list covering PCI DSS exposure such as card data in chat logs, order fraud through refund or address abuse, price manipulation through coupon or cart logic, and age or region rule bypass for restricted products. Each risk gets a pass or fail condition and a named owner. The retailer provides its policies for pricing, returns, age-restricted items and shipping regions. The output is a signed risk register that defines what counts as a finding before any test runs.
Stand up the test environment with masked data
The assistant is deployed in a non-production environment that mirrors its production tools and permissions, loaded with masked or synthetic customer, order and payment records. Test accounts are created for each role, and no live card numbers or real customer identifiers enter prompts or logs. The retailer confirms which systems are reachable from the test network and where test traffic is logged. The step closes when a smoke request succeeds through the test environment and the team has confirmed in writing that the data set contains no production personal or card data.
Build the red team configuration and target connection
The team installs promptfoo, selects the plugins that match the risk register, such as the e-commerce and PCI-related plugins, and chooses strategies and grading rules. The assistant is connected as a target through its HTTP or other endpoint, with authentication for each test role. Scan size and any hosted generation limits are set against the Community or Enterprise terms the retailer has chosen. The output is a version-controlled configuration file and a short run record showing that the target answers requests from each test role.
Run the first scan and triage findings
The first full scan runs against the test environment, and results are reviewed in a joint session with engineering and fraud teams. Each failure is classified by risk, reproduced with its exact prompt and tool trace, and marked as confirmed, false positive or needs more evidence. Illustrative example: a coupon request that the assistant applies beyond the stated limit would be logged with the cart state before and after. The output is a triage log in which every failure has an owner and a severity, and the reviewers have agreed the list of confirmed findings.
Fix confirmed findings and retest
Engineering changes the assistant's prompts, tool permissions, input and output filters, or backend checks, such as server-side price and refund validation that does not depend on the model's judgment. Each fix is linked to the finding it addresses, and the affected plugins are rerun against the same test data. The retailer confirms that fixes do not break legitimate shopping flows. The step closes when every confirmed finding has either a passing retest or a documented, accepted risk signed by the named owner.
Move to scheduled runs in CI/CD or monitoring
The approved configuration is added to the delivery pipeline so that a scan runs on changes to prompts, tools or model versions, with pass-rate gates set from the acceptance criteria. Where the retailer has an Enterprise subscription, continuous monitoring and a central dashboard can be used for ongoing review. The retailer should confirm which pipeline system it uses, who receives failure alerts and how often scans run in production-like environments. The output is a working pipeline job, a documented owner for gate failures and a dated record of the first scheduled run.
How much does promptfoo red teaming for e-commerce AI cost and what drives it?
What drives the cost of a fixed-scope promptfoo red teaming engagement for e-commerce AI?
The main drivers are the number of assistant tools under test, the environments in scope, the integrations the assistant touches, and the number of retest rounds. A shopping assistant that only answers product questions is a smaller job than one that can read carts, apply promotions, look up orders and hand off to a payment or fraud service. Each tool that changes state adds test cases, permission checks and evidence to produce. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so ask the proposal to list each tool, environment and integration as a separate line.
What is one-time spend and what recurs after a promptfoo red teaming engagement?
The first engagement is largely one-time: scoping, plugin and strategy configuration, the initial red team runs, findings, fixes and retests. Recurring costs come from running scans as the assistant changes, which may involve model API usage, and from licensing if you buy promptfoo Enterprise or On-Premise. Ongoing support, upgrades and continuous testing are available as retainers. Ask the quote to separate the one-time engagement fee from any retainer, and to state which model or hosting costs are yours to pay directly.
Can our team run promptfoo red teaming for our shopping assistant without a partner?
Yes, if you have engineers who can write a promptfoo configuration, connect it to the assistant through an HTTP or custom endpoint, and interpret the results. The Community edition is MIT-licensed open-source software that runs locally, so evals run on your machine and talk directly with the model. The harder parts are defining what counts as a failure for price, order and age rules, building test data that reflects your catalog and fraud patterns, and keeping scans current as prompts and tools change. Your team should also understand how the self-hosted server limits apply if you run it for shared use.
How long does a first promptfoo red teaming engagement for e-commerce AI usually take?
No duration is published for this work, so confirm the timeline in the written scope. Length depends mainly on how many assistant tools and integrations are in scope, how many environments you need tested, how quickly your engineers and fraud team can answer questions about order rules and refund policies, and how many retest rounds you plan. Access to a staging environment that mirrors production tools also shortens the work. Ask for a timeline that lists each phase, the inputs DeployOpen needs from you, and the retest round count.
What do our engineers and fraud team need to provide for this work?
Engineering needs to provide a test or staging version of the assistant, documented tool definitions and permissions, the endpoint or interface promptfoo will call, and test accounts with realistic but non-production data. The fraud and operations team needs to define the rules the assistant must respect, such as refund limits, discount stacking rules, order-hold conditions, and region or age restrictions, and to review findings that touch fraud controls. Agree on who signs off on fixes and who owns the retest. Gaps in these inputs usually cause the longest delays.
Is the promptfoo Community edition enough for e-commerce AI red teaming?
The Community edition is free and includes all LLM evaluation features, all model providers and integrations, and red teaming with 10k probes per month, with community support. For a single team testing one assistant, that may cover the work. It is less suited to shared access control, centralized reporting across teams, or formal guardrail monitoring, which are Enterprise features. The self-hosted server stores data in a local SQLite database, has no RBAC or built-in SSO, and is not recommended for production, so a multi-team rollout needs a different setup. Confirm the probe volume your scan plan needs against the 10k monthly figure.
What do promptfoo Enterprise and On-Premise add, and who sells them?
According to the promptfoo pricing page, Enterprise adds team sharing, teams-based access control and SSO, custom roles and permissions, continuous monitoring, a centralized guardrail dashboard, remediation recommendations, and priority support with SLAs, at custom pricing. On-Premise runs that Enterprise functionality on your own infrastructure with complete data isolation and a dedicated deployment engineer. These editions are sold by promptfoo, not by DeployOpen, so confirm licensing terms directly with promptfoo. DeployOpen can plan and deploy the environment and tests around whichever edition you choose.
What should we ask for in a written quote for this engagement?
Ask for a written scope that lists each assistant tool, environment, integration and plugin family in scope, with its deliverables. Request the number of retest rounds, the acceptance criteria for closing findings, the evidence format, and the timeline with the inputs you must provide. Ask which costs are one-time, which are retainer-based, and which are third-party charges such as model API usage or promptfoo licensing. Confirm what is excluded, such as fixes to your code or fraud system changes. DeployOpen does not publish a price list, so the quote follows from this written scope.
How DeployOpen scopes and delivers promptfoo red teaming for retail
DeployOpen plans, tests, documents and supports promptfoo red teaming for e-commerce AI inside the client's own infrastructure, with the shopping and order assistant scoped in writing before any testing starts. Engagements are fixed-scope, and the work is agreed on deliverables, timelines and what the team needs to provide.
How we scope
- We confirm which shopping, order and returns assistants are in scope and which tools, data sources and roles they can reach.
- The written scope names the e-commerce plugins and attack areas to test, such as payment data, order fraud, price manipulation and region checks.
- We agree access needs up front, including test accounts, staging endpoints and whether production-like data may be used.
How we build
- We configure promptfoo red team runs against your assistant endpoint, with the target, purpose statement and grading criteria recorded.
- Test cases cover cardholder data requests, discount and coupon abuse, refund manipulation and age or location restrictions on products.
- We run scans in your environment, review flagged responses with your team and retest after each agreed fix.
How we hand over
- You receive a findings report that maps each issue to the affected assistant behavior, with reproduction steps and severity.
- Configuration files, plugin selections and run settings are delivered so your engineers can rerun the scans themselves.
- We document fixes, retest results and open items so your security and compliance teams can review the evidence.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement ends.
- A retainer can keep red team scans running as the shopping assistant's prompts, tools and models change.
- Ask in the quote what support hours, response expectations and upgrade work are included before you sign.

