RELIC: Evaluating Compositional Instruction Following via Language Recognition

Jackson Petty, Michael Y. Hu, Wentao Wang, Shauli Ravfogel, William Merrill +1 more
6/5/2025
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large language models (LLMs) are increasingly expected to perform tasks based only on a specification of the task provided in context, without examples of inputs and outputs; this ability is referred to as instruction following. We introduce the Recognition of Languages In-Context (RELIC) framework to evaluate instruction following using language recognition: the task of determining if a string is generated by formal grammar. Unlike many standard evaluations of LLMs' ability to use their context, this task requires composing together a large number of instructions (grammar productions) retrieved from the context. Because the languages are synthetic, the task can be increased in complexity as LLMs' skills improve, and new instances can be automatically generated, mitigating data contamination. We evaluate state-of-the-art LLMs on RELIC and find that their accuracy can be reliably predicted from the complexity of the grammar and the individual example strings, and that even the most advanced LLMs currently available show near-chance performance on more complex grammars and samples, in line with theoretical expectations. We also use RELIC to diagnose how LLMs attempt to solve increasingly difficult reasoning tasks, finding that as the complexity of the language recognition task increases, models switch to relying on shallow heuristics instead of following complex instructions.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{petty2025relic,
  title  = {RELIC: Evaluating Compositional Instruction Following via Language Recognition},
  author = {Jackson Petty and Michael Y. Hu and Wentao Wang and Shauli Ravfogel and William Merrill and Tal Linzen},
  year   = {2025},
  eprint = {2506.05205},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.05205v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.05205.svg)](https://codeofpaper.com/paper/2506.05205)

Discussion