TL;DR
IFEval is a benchmark for how well a language model follows instructions. It uses instructions that a short program can check exactly, such as "write at least 300 words", "do not use any commas" or "end with this exact phrase". The paper defines 25 such instruction types, builds 541 prompts that each contain one or more of them, and reports two models' scores. Because each check is a program, the results are repeatable and do not depend on a judge model.
Builds on: Instruction Tuning, Benchmark Dataset, Regular Expression · Leads to: LLM-as-a-Judge, the model-based alternative that IFEval avoids
Why it mattered
Following a user's instructions is one of the things people most expect a language model to do well. The paper argues that this ability needs to be measured reliably, because misread instructions can produce wrong output in serious settings. The authors list healthcare and autonomous systems as examples. Before this work, the common options each had a weakness. Human raters are slow and costly, and their judgements are hard to reproduce; this is the same kind of rating that RLHF relies on. Model-based judges inherit the errors of the judge model.
The paper's contribution is a small, public benchmark whose checks are deterministic. The authors released their code and data, so other groups can run the same evaluation on their own models.
The problem
Evaluating instruction following is hard because human language is ambiguous. The paper gives two examples: "write with a funny tone" and "generate detailed reasoning but do not over-explain" have no clear standard that two judges would agree on. A reader can disagree about whether a response is funny enough. A reader is much less likely to disagree about whether a response contains a comma.
So the authors restrict the benchmark to verifiable instructions, meaning instructions that can be checked objectively and automatically. The idea is to test the model's ability to obey an instruction, not its ability to judge taste.
Even verifiable instructions have edge cases. Suppose the instruction is "end your email with: P.S. I do like the cake". A response that ends with "P.S. I do like the cake" obeys the instruction but would fail an exact string match because of the bold markdown. The paper handles this with a second, looser checking rule, described in the math section below.
Notation used below: a prompt carries instructions, indexed by . A response to prompt is written .
How it works
Take a tiny benchmark with one prompt and three model responses. The prompt has two verifiable instructions:
Write a two-line poem about rain. Do not use any commas. Include the word river at least twice.
-
Build the prompt. Each prompt is a base request with one to three verifiable instructions appended to it. The paper removes illogical combinations, rephrases the result for variety, and checks it by hand. The prompt above has two instructions, so .
-
Get a response. The model under test writes an answer. The benchmark asks for no particular answer, only that the instructions are obeyed. Response A is "Rain falls on the hill / The river runs and sings". Response B is "Rain on the river, the river sings". Response C is "Rain falls on the river. The river sings."
-
Check each instruction with a program. The no-comma check looks for the character ",". The keyword check counts how often "river" appears.
- Response A has no comma, so it passes. It has "river" once, so it fails the keyword check. One of two instructions followed.
- Response B has a comma after "river", so it fails. It has "river" twice, so it passes. One of two.
- Response C has no comma and "river" twice. Two of two.
-
Score the prompt. A prompt counts as followed only when every instruction in it is followed. Only response C passes the whole prompt.
-
Aggregate over all instructions and prompts. Over the three responses there are six instruction checks, and four pass. So the instruction-level accuracy is percent. Only one of three responses passes everything, so the prompt-level accuracy is percent. The two numbers differ because one failed instruction is enough to fail a prompt.
-
Apply the loose check if needed. The loose rule transforms a response in several ways, such as removing markdown bold marks or the first and last lines, and accepts the instruction if any version passes. This can rescue an answer that fails only because of formatting, such as a bolded closing phrase. It can also accept a response that breaks a limit, because removing a line can make a too-long answer look compliant.
Each instruction is a separate program, so a failure can be traced to its instruction type, such as length or formatting. That per-instruction view is what makes the paper's category breakdown possible.
flowchart LR P[Prompt with verifiable instructions] --> M[Model writes a response] M --> C[One program per instruction] C --> S[Strict check on the raw response] M --> T[Eight transformations of the response] T --> LC[Loose check: accept if any version passes] S --> A[Prompt-level and instruction-level accuracy] LC --> A
The math
Let be a response and one verifiable instruction. Define the verifier
Each verifier is a deterministic program, such as a word counter, a comma search, or a check for an exact ending.
Step 2 in symbols: the strict accuracy
For prompt with instructions , the prompt counts as followed only when every verifier returns True. Over prompts with responses , the prompt-level strict accuracy is
The instruction-level strict accuracy counts each instruction separately:
In the tiny example, , and the instruction count is . The four passes give , and the single full pass gives .
Step 3 in symbols: the loose accuracy
The loose check replaces the response with each of eight transformed versions, then accepts the instruction if any version passes:
The eight transforms are the identity, the three single removals (font marks such as asterisks, the first line, the last line), the three pairs of removals, and the triple of all three. Counting these gives . The loose versions of the two accuracies are defined in the same way as the strict ones, with the loose check in place of the strict one. The loose rule can also be fooled. Removing the first line of a response with a word-count limit can make a too-long answer look compliant, which is why the paper treats it as a complement and not a replacement.
Step 4 in symbols: reading the four numbers
The paper reports four numbers for each model: prompt-level and instruction-level, each under the strict and the loose rule. Under the same rule, the two numbers do not bound each other in general, because prompts carry different numbers of instructions. Under the loose rule every score is at least as high as under the strict rule, because the identity transform is one of the eight, so the loose check accepts whenever the strict one does.
Results
The paper evaluates two models. GPT-4 responses were collected through the API in November 2023, and PaLM 2 Small responses in August 2023. The benchmark has 541 prompts and 25 instruction types. Its reported scores are:
| Model | Prompt-level strict (%) | Instruction-level strict (%) | Prompt-level loose (%) | Instruction-level loose (%) |
|---|---|---|---|---|
| GPT-4 | 76.89 | 83.57 | 79.30 | 85.37 |
| PaLM 2 S | 43.07 | 55.76 | 46.95 | 59.11 |
The gap between the two models is large on every measure, and the loose rule raises both models' scores by a few points. The paper also reports per-category accuracy in its Figure 2, which splits the strict instruction-level score by instruction group. The paper's text does not list those category numbers, so this lesson does not quote them.
The limits are the authors' own. The benchmark covers only 25 instruction types, and the authors say more would be useful. The prompts are not drawn from real user traffic; the authors list making them closer to real applications as future work. The benchmark is text-only, and multimodal instructions such as "generate at least 3 images" are left for later. The two models are not directly comparable, since the paper notes the large difference in their sizes. The loose rule can produce false positives, so the strict scores are the more conservative reading.
Reading guide
- Section 1 (Introduction). Read with LLM-as-a-Judge in mind, because the paper's argument is against model-based evaluation. Table 1 is the full list of the 25 instruction types. Each type is a checkable property such as keyword use, length, format or casing.
- Section 2 (Verifiable instructions). Table 2 gives two worked prompts. Section 2.1 on prompt synthesis uses few-shot prompting, a form of In-Context Learning, to generate and filter prompts. Section 2.2 defines the strict and loose metrics. The checks are programs, so regular expressions are the natural tool.
- Section 3 (Evaluation results). Table 3 has the four numbers for each model. Read it with the definitions from Section 2.2 in hand, since the prompt-level and instruction-level numbers measure different things.
- Section 4 (Discussion and future work). Short. It lists the limits above.
- Section 5 (Detailed results). Figure 3 breaks the accuracy down by detailed category.
- Section 6 (List of prompts). The full prompt list, useful for seeing how instructions are combined.
Check yourself
QuestionWhat makes an instruction verifiable in the sense of this paper?Show answer
A verifiable instruction is one that a simple, deterministic program can check, so that whether a response follows it can be decided without a human or a judge model. Examples include a word count, a required keyword, or a banned comma.
QuestionFour responses are scored. Each has two instructions, and the four responses pass 2, 1, 2 and 0 of them respectively. What are the instruction-level and prompt-level strict accuracies?Show answer
Instruction checks total 4 × 2 = 8, and passes total 2 + 1 + 2 + 0 = 5, so instruction-level accuracy is 5/8 = 62.5 percent. A prompt passes only if both of its instructions pass, which happens for 2 of the 4 responses, so prompt-level accuracy is 2/4 = 50 percent.
QuestionWhy does the paper treat the loose metric as a complement to the strict one rather than a replacement?Show answer
The loose metric removes some false negatives, such as a correct instruction hidden by bold markdown. But it also accepts a response if any of eight transformed versions passes. Removing the first line can make a response that breaks a length limit look compliant, so the loose metric can create false positives.
QuestionA team wants to compare two models on IFEval. Model X has higher prompt-level strict accuracy, and model Y has higher instruction-level strict accuracy. Which is better at following instructions, and what would you report?Show answer
The two numbers measure different things, so neither is simply better. Prompt-level accuracy asks whether every instruction in a prompt was met, which is the stricter standard. Instruction-level accuracy asks how many separate instructions were met. The team should report both, along with the loose scores and the per-category breakdown, and state which standard matters for their use.
Sources
- Zhou et al. (2023), "Instruction-Following Evaluation for Large Language Models", arXiv: https://arxiv.org/abs/2311.07911
- Ouyang et al. (2022), "Training language models to follow instructions with human feedback", arXiv: https://arxiv.org/abs/2203.02155
- Stiennon et al. (2020), "Learning to summarize from human feedback", arXiv: https://arxiv.org/abs/2009.01325