PyRIT AIRT Multilingual scenario

PyRIT's Multilingual scenario checks whether a model's safeguards hold when harmful objectives are translated into other languages, with an untranslated baseline for comparison.

On this page

How the PyRIT Multilingual scenario tests safeguards in other languages

A model that refuses a harmful request in English may not refuse the same request in Spanish, Swahili or Hindi. Safety training and content filters are often strongest in the languages the developers tested most, so an assistant can be safe in one language and weaker in another. PyRIT's Multilingual scenario is built to check that gap. It takes harmful objectives and sends them to your target in languages you select, so you can see whether refusals hold when the same request arrives in a different language.

The scenario works in two ways. It translates whole objectives into the languages you choose, and it translates individual words at random, which tests whether a model still catches a harmful request when it is mixed across languages within one prompt. A bare run, according to the PyRIT documentation for the AIRT scenarios, translates five objectives into five random languages and includes an untranslated baseline. The baseline matters because it shows whether the target refuses the objective in English at all. If it does not refuse in English, a failure in another language tells you less about the translation than about the underlying safeguard. Check the AIRT scenarios documentation for the current list of supported languages and the exact default behavior of your PyRIT version before you describe the run in a report.

Teams usually need this scenario in three situations: the product serves users in several languages, the model or its system prompt is deployed to markets where those languages are common, or a security review asks for evidence that safeguards were tested beyond English. In each case, decide the languages before the run. Choose the languages your users actually write in and any language your deployment team has flagged as a concern, then record the selection in your test plan so the results can be repeated.

The scenario does not establish that a model is safe in a language. It samples a small number of objectives and languages, so a clean run shows only that those samples were refused. It also depends on the scorer judging the response in the language it was written in, so confirm that your scoring setup handles the languages you selected, and review a sample of outputs by hand, especially for low-resource languages. Dialect coverage, code-switching by real users, speech input and cultural context are outside what this scenario measures. Plan separate coverage for those if your risk assessment requires it.

Which translation strategy and language selection fit each test goal

This table compares the full-objective translation strategy, the random word-level translation strategy and the untranslated baseline, with the language selection each one needs. Read each row as a test goal: the strategy that fits it, what it reveals and what you must confirm before trusting the result. The main takeaway is that the baseline is the control that makes translated results interpretable.

Test goalStrategy and language selectionWhat it revealsWhat to confirm
Baseline checkUntranslated objectives in English, used as the controlWhether the target refuses the objective in its strongest language before any translationThat the baseline objectives match the translated ones so differences are attributable to language
Full-objective translationWhole objective translated into languages you select, or five random languages in a bare runWhether safeguards weaken when the complete harmful request arrives in another languageWhich languages matter for your users, and that the translations preserve the intent of each objective
Random word-level translationIndividual words translated at random within the objectiveWhether safeguards catch mixed-language phrasing that partial translation can produceWhether the mixed text still reads as the same objective to your scorer and to a human reviewer
Targeted language coverageLanguages chosen from your user base, deployment regions or known weak spotsWhether gaps appear in languages your customers actually useThat your selected languages are supported by the translation method and the target model
Low-resource languagesLanguages with less training data, chosen deliberatelyWhether refusals are weaker where the model has less exposureThat your scorer can judge responses in those languages, or that a human reviewer can
Scorer validitySame objectives scored across all languages with one scoring approachWhether refusal and harm scores are consistent across languagesWhether the scorer was checked on non-English responses before you rely on its verdicts
Run comparison over timeFixed language set and fixed strategy kept between buildsWhether a model or safeguard change altered results by languageThat the language list and objective set are stored with each run so comparisons stay valid

Setting up and running a Multilingual scan with pyrit_scan

This sequence takes a team from a clean Python environment to a first Multilingual scan against a registered target, with a small run that proves the setup and the output and memory records that make the result reviewable. It is written for engineers who will run the scan and the reviewers who will read it.

  1. Confirm a supported Python version

    The engineer running the scan checks that the interpreter falls within the range the PyPI package supports, which is Python 3.10 up to but not including 3.15. The PyRIT documentation recommends Python 3.13, so use that version where your platform allows it. Confirm the version with the interpreter command your environment uses. The step is done when the version prints inside the supported range and the environment is isolated, for example in a virtual environment dedicated to red teaming.

  2. Install PyRIT from PyPI

    Install the pyrit package from PyPI with pip into the isolated environment, then confirm the pyrit_scan command is available on the path. Record the installed version in your run notes, since the scenario options and output format can change between releases. Check the PyRIT documentation for the release you install, and confirm the package source against the project's GitHub repository before installing in a controlled environment. The step is done when pyrit_scan responds to a help request from the shell.

  3. Place credentials in the PyRIT environment file

    Create the file ~/.pyrit/.env and store the credentials for the model endpoint you will test and for any scorer model you use. Restrict the file to the account that runs the scan, and keep it out of version control and shared runner logs. Do not paste keys into the command line, where they can appear in shell history. The step is done when the file exists with owner-only permissions and the key names match what your target configuration expects.

  4. Set run settings in the PyRIT configuration file

    Create ~/.pyrit/.pyrit_conf and set the memory, logging and default options your team agreed on, including where memory is stored. PyRIT memory uses SQLite or Azure SQL, so confirm which backend the evidence will be kept in before the first run. Keep the settings file under your team's control so that another engineer can reproduce the run. The step is done when the configuration loads without errors on a dry check and the memory location is one you can find later.

  5. Register the target you will test

    Register the model or application endpoint as a PyRIT target so that pyrit_scan can address it by name. Confirm the target type fits your system, whether a hosted model API, a custom HTTP or WebSocket endpoint, or a web app driven through Playwright. Check that the registered target answers a benign test message before any multilingual objectives are sent. The step is done when a single test prompt returns a response through the registered target name.

  6. Select the Multilingual scenario and languages

    List the available scenarios and targets, then select the Multilingual scenario against your registered target. Choose the languages to test, and confirm the language list with the team that owns the safeguards, since coverage should match the languages your users write in. Without an explicit selection, the bare run translates five objectives into five random languages and includes an untranslated baseline, so decide whether that default suits your question. The step is done when the scenario, target and language choices are written into the run notes.

  7. Run a small first pass

    Run the scenario with a limited dataset size so the setup is proven before a larger run. Use a label that identifies the run, so its records can be found in memory later. Watch the first responses and the console for authentication errors, unsupported language output or scorer failures. Treat the first pass as a setup test, not as the assessment result. The step is done when the run completes without infrastructure errors and every objective has an outcome recorded.

  8. Check the output and memory records

    Read the scenario output, then open the memory records for the run and confirm that each translated objective, the translation applied, the target response and the score are stored together. Compare the untranslated baseline with the translated results so that any difference is attributable to language rather than to the objective itself. Confirm that the records can be retrieved by the run label. The step is done when a reviewer who did not run the scan can trace one objective from the original text through translation to the stored response and score.

Security and operational risks of multilingual testing

Multilingual runs produce harmful content in languages your reviewers may not read, and that content lands in logs, memory and result files. The cards below cover where that material is stored, who can read it and how credentials and vulnerabilities in PyRIT itself should be handled.

Harmful translated content in logs

Translated objectives and model replies can appear in console output, CI job logs and debug traces. A translated harmful prompt is still harmful, and it may be easier to miss in review because reviewers may not read the language. Check what PyRIT writes to standard output and whether your pipeline captures it. Confirm the logging level for shared runners before the first run, and keep multilingual runs off public build logs.

Memory stores every translated turn

PyRIT memory keeps the original objective, each translated variant, the converter used and the target's reply. A word-level translation run can therefore store many derived prompts per objective. Decide which memory database holds these records, how long they stay, and whether the same labels used for other scenarios apply. Ask the team that owns the database whether translated harmful text falls under existing retention rules.

PyRIT docs

Memory backend choice

PyRIT memory stores conversations and results in SQLite or Azure SQL. A local SQLite file is easy to start with but lives on the machine that ran the scan, so its file permissions, disk encryption and backup status are the controls that matter. Azure SQL moves access control to database roles and network rules. Pick the backend before the first multilingual run, because moving records later adds work.

Credentials in ~/.pyrit/.env

PyRIT reads target credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. Any user or service account that runs the scan can read that file, so a shared runner or a developer laptop becomes a credential store. Restrict the file to the account that runs the scan, keep it out of source control and backups you do not control, and confirm with your secrets team whether a vault-backed approach fits your environment.

Who can read results

Anyone with access to the memory database, exported conversations or the results folder can read the translated harmful content. Review access lists for the database, the export location and any shared drive where reports are copied. Limit read access to the reviewers who own the finding, and record who exported what and when. Confirm these controls with your security team before results leave the test environment.

Reporting PyRIT vulnerabilities

If a multilingual run exposes a flaw in PyRIT itself, such as a defect that leaks memory contents or credentials, report it privately rather than in a public issue. The project's security policy directs reports to the Microsoft Security Response Center. Include the PyRIT version, the scenario and the steps to reproduce, and avoid pasting harmful model output into the report.

PyRIT on GitHub

How translated objectives reach the target and get scored

In the PyRIT AIRT Multilingual scenario, each objective is read from a dataset, passed through a translation converter, sent to the target, and then scored. The translation step sits between the dataset and the target, so the scorer judges the target's reply to translated text, not the original English objective. Every stage writes to PyRIT memory, which stores the conversation, the converted prompt, the target's response and the score, using SQLite or Azure SQL. Before you rely on a run, confirm in your own environment which memory backend it writes to and that each record keeps the language used, so you can trace any result back to its prompt.

Translation can change what the scorer sees in two ways. First, the target may answer in a different language or script than the prompt, and a scorer tuned to English may miss harmful content or flag a benign reply. Second, the translation itself may be imperfect, so the prompt may be less clear, or carry a different meaning, than the original objective. PyRIT scorers evaluate responses with LLMs, Azure AI Content Safety or custom logic, and each has its own language coverage. Check whether the scorer you choose handles the languages in your run, and spot-check scored responses from each language before you trust the totals.

The untranslated baseline is what makes the multilingual numbers interpretable. Run the same objectives in English through the same target and scorer, then compare the results with the translated runs. If the target refuses an English objective but answers the translated one, the gap points to the language, not the objective. If both fail equally, the weakness is in the target's general safeguards. Keep the target, scorer, dataset and objective set fixed between the two runs, and record the scorer version and configuration so the comparison holds when you repeat it.

Request flow for a Multilingual run

A Multilingual run starts with the objective dataset, where each objective is paired with a language choice. The translation path converts the whole objective into the selected language, while the random word-level path translates individual words, and the untranslated baseline passes the original objective straight to the target. Each prompt goes to the target, then the scorer judges the response and PyRIT records the conversation and result in memory. Check that the baseline ran alongside the translated variants, since its result is what shows whether the language change alone altered the outcome.

How objectives move through translation, the target, scoring and memory.

Limits to confirm before relying on multilingual results

A Multilingual scenario result is only as trustworthy as the translation, the scorer's reading of the response and the target's own language coverage. The cards below cover the four things to confirm in your environment before you treat a low attack success rate as evidence that safeguards hold in other languages.

Translator language coverage

The Multilingual scenario translates objectives into selected languages and also translates individual words at random. Ask which languages the translation step handles reliably, and check whether a translated objective keeps its original meaning. A harmful request that is garbled or softened in translation tests a weaker prompt than the one you intended, so a low success rate may reflect poor translation rather than strong safeguards. Sample translated objectives in each language you plan to report on, and have a fluent reviewer read them before any run.

AIRT Scenarios docs

Scorer accuracy in non-English text

A scorer decides whether a response is harmful, and that judgment can drift outside English. Confirm whether the scorer you configure judges non-English responses accurately, including responses that refuse, partially comply or answer in a mix of languages. Measure it: label a small set of responses in each language yourself, run the scorer on them, and record where it disagrees with your labels. Do not report attack success rates for a language until the scorer has passed that check.

Target language support

A target that does not handle a language well may refuse, respond in English or return degraded text, and each of those looks like a result. Confirm which languages your model or application supports, and whether its safety training covers them. Separate a target that cannot understand a prompt from one that understands it and still complies. Record the target's stated language support alongside each result so readers can judge what the number means.

PyRIT version in use

Scenario behavior, converters and scorers change between releases, so a Multilingual result is tied to the version that produced it. PyRIT v1.1.0 was released on 4 September 2026. Record the exact version, the Python version and the configuration file contents with each run, and confirm with the project's releases page whether translation or scoring behavior changed since your last assessment. Rerun your baseline after any upgrade before comparing numbers.

PyRIT releases

Untranslated baseline comparison

A bare run includes an untranslated baseline alongside translated objectives, so the difference between the two is the signal you need. Confirm that your run includes the baseline and that you compare translated results against it, not against an absolute threshold. If the English baseline already fails, a multilingual result adds little. If the baseline passes but translated objectives fail, the gap points to language-specific weakness that needs its own remediation and retest.

Questions teams ask before running multilingual red teaming

How much effort does a multilingual PyRIT assessment take?

Effort depends mostly on how many objectives you test, how many languages you select, and how long each review cycle takes. A bare Multilingual run translates five objectives into five random languages and includes an untranslated baseline, so the first run is small by design. Scaling up adds work in three places: preparing objectives that represent your real use cases, reviewing translated outputs by people who read the target languages, and triaging the results. Ask any partner to split the estimate into setup, execution and review so you can see where the hours go.

Can our in-house team run multilingual red teaming on its own?

Yes, if you have an engineer comfortable with Python and a command line, and a reviewer who reads each language you test. PyRIT is installed with pip, supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13. The harder part is not the tooling but judging whether a translated response is harmful, which needs native or fluent reviewers. Teams without that language coverage often pair an internal engineer with an outside reviewer for the languages they cannot cover.

What do we need to provide before the work starts?

Plan to provide four things:

  • Access to a registered target, such as a model endpoint, custom HTTP or WebSocket app, or web chat UI, in a test environment
  • Credentials stored in the location PyRIT reads, typically ~/.pyrit/.env, with secrets kept out of shared logs
  • The list of languages that matter to your users, plus the reviewers who can judge them
  • Time from your safety, legal or product reviewers to read flagged outputs and decide on fixes

Agree on who owns each item in the written scope before the first run.

What drives the cost of a multilingual assessment up or down?

The main drivers are the number of objectives, the number of languages, target latency and the scorer you choose. More objectives and languages multiply the number of requests. A slow target lengthens every run, and rate limits can force you to run in smaller batches. Scorers that call an LLM add model usage per response, while a simpler scorer adds less. Review time is often the largest cost, so ask for a quote that states how many outputs reviewers will read and in which languages.

How long does a first multilingual run take to plan?

Planning length depends on whether the target, credentials and reviewers already exist. If they do, planning mostly means choosing objectives, languages and a dataset size for a first run, which is usually quick. If the target needs registration, the credential setup needs approval, or reviewers must be found for specific languages, those steps add time before any prompt is sent. Ask for a written timeline that separates these dependencies from execution.

Should we translate our own objectives or rely on the built-in translation?

The Multilingual scenario translates objectives into selected languages for you, so a first run needs no manual translation. Your own objectives are still worth reviewing, because the harms that matter to your product may not appear in a generic dataset. Confirm with your reviewers that machine translation preserves the meaning of each objective in the languages you test, since a poor translation can make a result look safer or riskier than it is.

Does a multilingual test tell us whether our safeguards are compliant?

No. A red teaming run shows whether specific objectives, in specific languages, got past your safeguards on the day you ran it. It produces evidence you can review, but it does not certify your system. Independent auditors and certification bodies make compliance determinations, and DeployOpen prepares systems, controls and evidence for those assessments rather than issuing them.

What the results mean for your release decision

Read the gap between the untranslated baseline and the translated results before you decide anything. The baseline is the same objective in English, so a rise in successful attacks under translation points to the language itself as the variable. Compare like with like: the same objectives, the same target configuration and the same scorer across both conditions. Then check whether the gap is concentrated in a few languages or spread across all of them. A concentrated gap usually points to uneven safety training or weak moderation in specific languages, while a broad gap suggests the safeguards depend on English-language pattern matching. Also check the scorer. If the scorer is an LLM judge that is weaker in some languages, a result may reflect scoring error rather than a model failure, so confirm that sample responses in the failing languages have been read by a fluent reviewer.

Turn confirmed gaps into specific fixes. Options include adjusting the model's safety tuning for the affected languages, adding or retuning input and output filters that run in those languages, and writing a language-specific policy that states which languages the product supports and how it handles requests outside them. Where you restrict languages, make sure the restriction is enforced at the application layer and not only described in documentation. Assign each finding an owner and a decision: fix, restrict, or accept the residual risk with a named approver. Record the reasoning, because a reviewer will ask why a language was left open.

Retest after every change that touches the model, prompts, filters or scorer, and rerun the same language set so results are comparable with the earlier run. Use the memory labels and scenario results from the earlier run to show what changed. Also plan for drift: new model versions and new supported languages can reopen a gap that was previously closed, so schedule the multilingual scenario as part of regular release testing. Confirm with your own security team which pass rate or attack success threshold, if any, governs release. The scenario output reports results but does not set your acceptance criteria, so write those down before the run.

How DeployOpen scopes and delivers a PyRIT Multilingual assessment

DeployOpen runs PyRIT AIRT Multilingual assessments inside the client's own environment, so the target, language choices and results stay under the client's control. We agree the scope, languages and evidence in writing before any test runs, then hand over the configuration and results so your team can repeat the assessment.

How we scope

  • Confirm the AI system, endpoints and access paths PyRIT will test, and who owns each one.
  • Agree which languages and objectives are in scope, and which harm datasets apply to your sector.
  • Record in the written scope what counts as a finding, how results are reviewed, and what is delivered.

How we build

  • Register the target and configure PyRIT with credentials kept in your secrets store, not in job logs.
  • Set up the Multilingual scenario with the agreed language selection, translation and word-level strategies, and an untranslated baseline.
  • Test the scenario on a small dataset first, then run the full set and check that scoring matches reviewer judgment.

How we hand over

  • Deliver the scenario configuration, run settings and memory labels so the run can be reproduced.
  • Document each finding with the language, strategy, prompt, response and score that produced it.
  • Walk your security and AI teams through the results and the safeguard gaps that need fixing.

How we support

  • Retest fixed safeguards with the same languages and strategies to confirm the gap closed.
  • Rerun the scenario after model, prompt or safety layer changes that could affect multilingual behavior.
  • Ongoing support, upgrades and continuous testing are available as a retainer, scoped in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.