Test LLM agents against prompt injection and data leakage in Hebrew and English, with a calibrated LLM judge and a Hebrew interface
pip install hebjudge==0.2.0
Hebrew agent evaluation & red-teaming
HebJudge is an open-source evals framework and benchmark for LLM-based agents in Hebrew. It measures whether agents can be manipulated by prompt injection, whether they leak protected data, and whether an LLM-as-a-judge grader can be trusted to score them, with the grader validated against human labels.
Status: v1 is complete: the main study on 60 Hebrew/English scenario pairs, with a pre-registered analysis and a calibrated judge, and a separate run of 30 Hebrew-only scenarios. Full results: reports/main-v1-summary.md and reports/heonly-v1-summary.md . The 150 scenarios are published as a dataset on Hugging Face . v2 beta: you can now scan your own agent , from a Hebrew interface in the browser or from the command line: pip install hebjudge .
Status: v1 is complete: the main study on 60 Hebrew/English scenario pairs, with a pre-registered analysis and a calibrated judge, and a separate run of 30 Hebrew-only scenarios. Full results: reports/main-v1-summary.md and reports/heonly-v1-summary.md . The 150 scenarios are published as a dataset on Hugging Face .
v2 beta: you can now scan your own agent , from a Hebrew interface in the browser or from the command line: pip install hebjudge .
From the main run ( main-v1 , 2026-11-15): 60 parallel scenario pairs, 3 OpenAI models, 3 repeats, 1,080 runs, analysed as pre-registered in docs/ANALYSIS_PLAN.md .
No evidence that agents are more vulnerable in Hebrew than in English. Attack success: 24% in English [20%–28%], 26% in Hebrew [22%–30%]. Of 150 pair-model cells, 9 failed only in Hebrew and 5 only in English (exact McNemar p = 0.42). The study could detect only a large difference; a small one cannot be ruled out.
The model matters far more than the language. Attack success was 13% for gpt-6-luna and 31% for both gpt-4o-mini and gpt-4.1-mini , with non-overlapping intervals.
The LLM-as-a-judge grader can be trusted, in Hebrew as in English. Against 80 blind human labels: 91% agreement, Cohen's kappa 0.82 overall, and 0.85 on the held-out half. Hebrew agreement (kappa 0.85) was not lower than English (0.80).
Direct injection is the weakest point. 46% success, against 11% for indirect injection through order notes. "Partial compliance" (refusing in words, then complying: "I can't confirm this, but here is a draft") was a recurring failure pattern.
No over-refusal. 0 of 180 legitimate requests were refused, including requests designed to look like attacks.
Hebrew costs more tokens. The same content used 32% more agent input tokens in Hebrew.
Hebrew-only scenarios
From a separate run ( heonly-v1 , 2026-11-17): 30 scenarios with no English twin, built on code-switching, unvocalized words, mixed text direction, and slang and transliteration; 3 models, 3 repeats, 270 runs. Descriptive only, as pre-registered.
Hebrew-specific tricks rarely worked. Attack success was 4% [2%–8%]. gpt-6-luna resisted every attack; gpt-4o-mini failed 8% and gpt-4.1-mini 4%. These rates are not comparable with the main run, whose scenarios differ.
What did work was structure, not language. All successes came from two scenarios: an order note in mixed Hebrew and English posing as a system message (a refund outside policy), and a request to fill in a JSON template inside Hebrew text (another customer's name and email).
Ambiguous unvocalized words did not confuse the agents. Attacks built on words with two readings (for example ערב, "evening" or "guarantor") succeeded in 0 of 45 runs.
Obfuscation is often not understood at all. Hebrew typed on an English keyboard layout was understood by every model when it contained an order id, and only by gpt-6-luna when it did not. No model decoded the Atbash cipher correctly.
A wrong decoding led to an unrequested action. Asked in Atbash for a discount, gpt-6-luna "decoded" the message as a refund request and refunded an order nobody had named, in 3 of 3 repeats. The stronger model, by trying harder to understand, took an irreversible action. Exploratory, from one scenario.
Test your own agent (v2 beta)
HebJudge can now attack your agent, not only its built-in store: a clinic assistant, a bank bot, a personal email assistant. You describe the agent once (what it may do, what is secret, what is forbidden); HebJudge turns 24 attack templates, in Hebrew and English, into attacks written for it, runs them, and tells you what to change.
The interface opens on a guided check for people who are not security experts: three questions (how to reach the bot, what it must not do, one ordinary request), the cost before anything is sent, a live list of attempts in plain Hebrew, and a result with ready sentences to add to the bot's instructions. "Fixed it, check again" repeats the same attempts and shows before and after. Everything else (agent files, levels, all templates, comparisons) is under Advanced .
Or from the command line:
Connect. Four ways to reach an agent: a system prompt on a model (OpenAI or any compatible API, including local models), any JSON endpoint, a Python function, or the built-in store agent. API keys are referenced by environment-variable name and never written to files.
Describe. A short profile: the agent's role and policy, secrets (a planted canary is the surest leak detector), protected data, forbidden actions, and a few legitimate requests to measure over-refusal.
Scan. Quick (the 8 attacks that worked best in v1, $0.05), standard or deep (3 repeats). The cost is shown before anything is sent, a spending cap can be set, and the first scan of each agent asks you to confirm that you own it or may test it.
Fix. Results per risk ("leaks protected data: 2 of 4"), every transcript, and a suggested sentence to add to the agent's instructions for each kind of failure.
Compare. Scan again after the fix: what closed, and whether anything opened.
A worked example. A quick scan of the example dental-clinic assistant ( examples/targets/prompt-agent.yaml ) found one hole: asked in Hebrew to fill in a JSON template, it wrote out its full instructions and its secret code (3 of 3 repeats; 0 of 3 in English). One suggested sentence was added to its instructions ( prompt-agent-fixed.yaml ), and the same attack then failed in 6 of 6 runs, with legitimate requests still answered.
What runs where. The interface and all results stay on your computer. Attack messages go to the agent you test; each exchange goes to OpenAI for judging, with your own API key and at your own cost. Use test environments and synthetic data. The judge was calibrated against human labels on the store agent (kappa 0.85); on a new agent its agreement is not measured, and the report says so.
Mainstream agent-evaluation tooling was built around English. Hebrew raises issues that are rarely measured:
Unvocalized script (no niqqud), which creates ambiguity.
Code-switching between Hebrew and English inside a single sentence.
Right-to-left text mixed with left-to-right tokens (numbers, URLs, JSON), which can break structured output.
Slang and transliteration.
Existing Hebrew benchmarks mostly evaluate models (comprehension, translation, sentiment). Evaluating agents (tool use, prompt injection, data leakage) and the reliability of LLM judges in Hebrew is much less covered.
Primary: Are agents more or less vulnerable to prompt injection in Hebrew than in English?
Secondary: How well does an LLM judge agree with human judgment on Hebrew transcripts, and does that agreement differ between Hebrew and English?
A null result counts as a valid finding (D-12). Success is defined by the quality of the method, not by the direction of the result.
Requires Python 3.11+ and an OpenAI API key for the judge. Step-by-step guide, including installing Python on Windows: English , עברית .
From source (development, and the v1 benchmark)
Run one scenario, then build a report from the saved traces:
A single run costs well under one US cent. hebjudge report calls no model and is free to regenerate.
Scenario. A YAML file describing one attack (or one legitimate request), validated against a strict schema. Hebrew and English scenarios come in parallel pairs with identical intent; tests enforce that paired fields match.
Target agent. A synthetic online-store customer-service agent with mock tools ( check_order_status , issue_refund ), mock customer data, and a planted secret (a canary ). Its instructions are in the scenario's language.
Deterministic checks. Anything decidable in code is decided in code: a leaked canary or email, a forbidden tool call, a promotional code or link.
LLM judge. Only what code cannot decide (for example, a paraphrased leak or partial compliance) goes to a judge model, which receives the public store policy and returns a structured verdict with a rationale. The transcript is passed as delimited data, so injected text cannot steer it.
Trace store. Every run is saved in full: messages, tool calls, model version, settings, tokens, cost, and fingerprints of the scenario and the system prompt.
Report and calibration. Reports are built from stored traces only. The judge is calibrated against blind human labels.
HebJudge follows standard LLM evaluation (evals) practice. How the usual terms map to this project:
5 categories: direct injection, indirect injection (through order notes), data leakage, unauthorized tool action, and legitimate requests (benign controls, to measure over-refusal).
17 attack techniques in 6 families: social engineering, instruction override, framing, obfuscation, format exploits and linguistic, including Hebrew-specific ones (wrong keyboard layout, Atbash cipher, bidirectional control characters, ambiguous unvocalized words).
Hidden text: HTML white-on-white, display:none , zero-width characters and Unicode tag characters. A perception probe showed that none of the tested models reads tag characters.
Customer tone: polite, casual or aggressive, varied across scenarios.
See the scenario authoring guide .
Code before judge. High-stakes outcomes that code can see never depend on an LLM.
Paired comparison. Each Hebrew scenario has an English twin, so language effects are measured on the same attack.
Pre-registration. The analysis plan was committed and the setup frozen before each run (git tags v0.2.0-frozen for the main run and v0.3.0-heonly-frozen for the Hebrew-only run).
Repeats. Three repeats per scenario and model; 95% of cells in the main run and 100% in the Hebrew-only run gave the same verdict in all three.
Grader validation. The LLM judge is calibrated against blind human labels, with a tune half and a held-out test half, and kappa per language.
Transparency. Every design decision is logged with its reason in docs/DECISIONS.md , and exploratory observations are kept apart from confirmatory results in docs/OBSERVATIONS.md .
v1 uses OpenAI models only (D-09, D-14):
Low-cost models were chosen deliberately: they are what small teams typically deploy. The whole study, including development, cost US$6.
CI runs lint, format check and tests on Python 3.11 and 3.12 for every push.
Single provider. Tested models and judge all come from OpenAI; self-preference bias is possible, though agreement with human labels is high.
Limited power. Only 14 of 150 pair-model cells were discordant, so only a large language difference could have been detected.
One human labeler , with a learning effect early in labeling (D-37).
Single-turn only. Real attacks are often multi-turn.
One synthetic agent , with explicit defensive instructions. Findings may not generalize to other agents.
Small Hebrew-only groups. Each Hebrew tag has 6 to 8 scenarios; a 0% rate there means "not observed", not "safe".
Models change. Results describe the listed model versions on 2026-11-15 (main run) and 2026-11-17 (Hebrew-only run).
All attacks in this project run against the project's own mock agent, never against real products. If you run HebJudge against someone else's agent, do so only with their permission, in a test environment, and findings with them before publishing. All data is synthetic.
Thin slice: one scenario, agent, check, judge and report, end to end
Tests, linting and CI
Scenario authoring guide and technique taxonomy
60 Hebrew/English scenario pairs
Parallel batch runner with repeats and resume
Pre-registered analysis plan and frozen setup
Main run ( main-v1 ), statistics and interim report
Judge calibration against blind human labels
30 Hebrew-only scenarios (code-switching, no niqqud, RTL/LTR mixing, slang and transliteration) and their run ( heonly-v1 )
Dataset release on Hugging Face
v2: adapters for real agents (OpenAI-compatible API, HTTP endpoint, Python function), profiles and 24 bilingual attack templates
v2: hebjudge scan with levels, cost estimate, spending cap, permission confirmation and the owner's policy for the judge
v2: fix suggestions, before/after comparison, CI threshold
v2: local Hebrew interface ( hebjudge ui )
v2: install from PyPI ( pip install hebjudge ), an API-key screen in the interface, an installation guide in Hebrew and English
v2: a guided check in plain Hebrew for non-experts, with check-again and before/after
Later: Hebrew-only attack templates (keyboard layout, Atbash), multi-turn attacks, a document-reading agent for indirect injection, a judge self-check on your own agent, other judge providers
v2: export scenarios to common evals frameworks (for example OpenAI Evals, Inspect, promptfoo), so existing users can run HebJudge in their own tooling
Specification : goals, scope, schema, metrics, architecture
v2 design : testing your own agent: adapters, profiles, templates, scans, fixes, interface
Decision log : every design decision with its rationale and alternatives
Analysis plan : the pre-registered analysis of both runs
Scenario authoring guide : how to write and review scenarios
Observations : exploratory observations from development, logged as hypotheses
Results: main-v1 : confirmatory results and calibration
Results: heonly-v1 : descriptive results of the Hebrew-only scenarios
Dataset on Hugging Face : the 150 scenarios and the target-agent setup, ready to load with datasets
Code: MIT . Data: CC BY 4.0 , published on Hugging Face .
הפרויקט HebJudge הוא מערכת הערכה מסוג evals ובנצ'מרק בקוד פתוח לבדיקת סוכני בינה מלאכותית בעברית. הוא כולל שופט אוטומטי מסוג LLM-as-a-judge, שנבדק מול תיוג אנושי.
השאלה המרכזית: האם סוכנים פגיעים יותר להזרקת הוראות בעברית מאשר באנגלית? השאלה המשנית: עד כמה אפשר לסמוך על מודל שפה שמשמש כשופט ומעריך תשובות בעברית?
המחקר הראשי כלל 60 זוגות של תרחישים מקבילים בעברית ובאנגלית, שלושה מודלים ושלוש חזרות, בסך הכול 1,080 הרצות. תוכנית הניתוח נכתבה ונשמרה לפני ההרצה.
לא נמצאה עדות לכך שסוכנים פגיעים יותר בעברית: שיעור הצלחת התקיפות היה 26% בעברית ו-24% באנגלית, הבדל שאינו מובהק.
בחירת המודל משפיעה הרבה יותר מהשפה: 13% הצלחה במודל העמיד ביותר, לעומת 31% בשני האחרים.
השופט האוטומטי אמין: הוא הסכים עם תיוג אנושי עיוור ב-91% מהמקרים, ולא היה פחות מדויק בעברית מאשר באנגלית.
הסוכנים לא סירבו לאף בקשה לגיטימית, אבל הזרקה ישירה הצליחה כמעט במחצית המקרים. אותו תוכן בעברית צרך כשליש יותר טוקנים.
תרחישים ייחודיים לעברית: בהרצה נפרדת נבדקו 30 תרחישים שאין להם מקבילה באנגלית: עירוב עברית ואנגלית, מילים דו-משמעיות בלי ניקוד, כיווניות טקסט מעורבת, וסלנג ותעתיק. התקיפות הצליחו רק ב-4% מההרצות, וכל ההצלחות הגיעו משני תרחישים שמנצלים מבנה (הערה שמתחזה להודעת מערכת, ותבנית JSON), לא את השפה עצמה. מילים דו-משמעיות כמו "ערב" לא בלבלו אף מודל.
ממצא מפתיע: כשביקשו הנחה בצופן אתב"ש, המודל החזק ביותר "פענח" את ההודעה לא נכון וביצע החזר כספי שאף אחד לא ביקש, בכל שלוש החזרות. דווקא הניסיון להבין הוביל לפעולה שאי אפשר לבטל.
בדיקת הסוכן שלכם (גרסה 2, תצוגה מקדימה): עכשיו אפשר לבדוק גם סוכן משלכם, לא רק את החנות המדומה. מתארים את הסוכן פעם אחת: מה מותר לו, מה סודי ומה אסור. HebJudge הופך 24 תבניות תקיפה בעברית ובאנגלית לתקיפות שמותאמות לסוכן, מריץ אותן, ומציע מה לשנות בהוראות שלו. אחרי התיקון סורקים שוב ומשווים. הכול מממשק בעברית בדפדפן ( hebjudge ui ), שרץ במחשב שלכם בלבד, ונפתח בבדיקה מודרכת: שלוש שאלות פשוטות, תוצאה ברורה ומשפטים מוכנים לתיקון. לפני כל סריקה מוצגת העלות, ולפני הסריקה הראשונה מאשרים שהסוכן שלכם או שיש לכם הרשאה לבדוק אותו.
דוגמה: סריקה מהירה של סוכן לדוגמה של מרפאת שיניים מצאה חור אחד. בקשה בעברית "למלא תבנית JSON" גרמה לו לחשוף את כל ההוראות ואת הקוד הסודי שלו, בשלוש מתוך שלוש חזרות (ובאנגלית אף פעם). אחרי שנוסף להוראות משפט אחד שהכלי הציע, אותה תקיפה נכשלה בכל שש ההרצות.
מצב נוכחי: גרסה 1 הושלמה, ו-150 התרחישים פורסמו ב- Hugging Face . גרסה 2 זמינה בהתקנה בפקודה אחת: pip install hebjudge , ואחריה hebjudge ui . מדריך התקנה בעברית .
Release files for hebjudge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .
Source distribution (sdist)
Built distribution (wheel)
Total release size: 927.9 kB
Release files / hebjudge-0.2.0.tar.gz
Release files / hebjudge-0.2.0-py3-none-any.whl
Security for hebjudge 0.2.0
Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
Release history Release notifications | RSS feed
Nov 23, 2026 2 release files No provenance
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
