SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.17673 · 2023

Jatmo: Prompt Injection Defense by Task-Specific Finetuning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 10 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2312.17673.json · badge: /api/ran/2312.17673.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
wagner-group/prompt-injection-defense canonical (classifier label)
classifier basis: census
10 ran · 8 no recorded run
FunctionStatusWhere it lives
call_openai Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/server.py
pointer only (licence: NONE) · get_code("58f375594c3a65c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

format_finetune_data Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/utils.py
pointer only (licence: NONE) · get_code("afdfabcae731b1b3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gather_inputs Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/code_summarization.py
pointer only (licence: NONE) · get_code("011dc1d185aadcee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_formatting_input Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/utils.py
pointer only (licence: NONE) · get_code("d8dd0fab84fbf910")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_generation_prompt Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/utils.py
pointer only (licence: NONE) · get_code("e0da5c3f437fc507")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

init_servers Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/server.py
pointer only (licence: NONE) · get_code("57b9140b8e2e42bb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_hackaprompt_injections Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/semi_automatic_pipeline/utils.py
pointer only (licence: NONE) · get_code("af2d33fbd2f2574e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_book Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/translation.py
pointer only (licence: NONE) · get_code("de6f63f3c4a1f298")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

perturb_passage Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/semi_automatic_pipeline/utils.py
pointer only (licence: NONE) · get_code("cf548b8291737d65")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

write_prompt Ran
ran; our contract draft was wrong, not the code
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/review_summarization.py
pointer only (licence: NONE) · get_code("09ca1d2547f6362b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compare_to_ft_model Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/eval_model.py
pointer only (licence: NONE) · get_code("f64affb6add891aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

format_inputs Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/input_generation.py
pointer only (licence: NONE) · get_code("4877041f759749d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gather_inputs Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/news_summarization.py
pointer only (licence: NONE) · get_code("aa55ccc6d4abdf48")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gather_inputs Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/review_summarization.py
pointer only (licence: NONE) · get_code("da6bcc46ae271b58")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gather_inputs Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/translation.py
pointer only (licence: NONE) · get_code("64875c7d8e21226c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_input_list Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/automatic_pipeline/input_generation.py
pointer only (licence: NONE) · get_code("ecbd4b9dae46b569")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_reviews Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/example_tasks/auto_tasks/review_summarization.py
pointer only (licence: NONE) · get_code("45f097951892870c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

rate_completions Not yet run
unverified (harvested, no recorded run)
wagner-group/prompt-injection-defense/src/jatmo/server.py
pointer only (licence: NONE) · get_code("3b5261f8ca59d546")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, wagner-group/prompt-injection-defense when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 18 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large Language Models (LLMs) are attracting significant research attention due to their instruction-following abilities, allowing users and developers to leverage LLMs for a variety of tasks. However, LLMs are vulnerable to prompt-injection attacks: a class of attacks that hijack the model's instruction-following abilities, changing responses to prompts to undesired, possibly malicious ones. In this work, we introduce Jatmo, a method for generating task-specific models resilient to prompt-injection attacks. Jatmo leverages the fact that LLMs can only follow instructions once they have undergone instruction tuning. It harnesses a teacher instruction-tuned model to generate a task-specific dataset, which is then used to fine-tune a base model (i.e., a non-instruction-tuned model). Jatmo only needs a task prompt and a dataset of inputs for the task: it uses the teacher model to generate outputs. For situations with no pre-existing datasets, Jatmo can use a single example, or in some cases none at all, to produce a fully synthetic dataset. Our experiments on seven tasks show that Jatmo models provide similar quality of outputs on their specific task as standard LLMs, while being resilient to prompt injections. The best attacks succeeded in less than 0.5% of cases against our models, versus 87% success rate against GPT-3.5-Turbo. We release Jatmo at https://github.com/wagner-group/prompt-injection-defense.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.17673")
get_code_for_paper("2312.17673")
have("2312.17673")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2312.17673.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2312.17673.svg)](https://syntology.ai/paper/2312.17673)

Connect an agent — have() is free.