# Directing large language models to follow the letter or spirit of the law

arXiv: https://arxiv.org/abs/2609.23083 · HTML: https://mlsanity.com/paper/2609.23083/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 39 references that are in the map.
- First posted on arXiv 19 Sep 2026.

## Builds on (most cited first, 9 of 9)

- [HuggingFace's Transformers: State-of-the-art Natural Language Processing](https://mlsanity.com/paper/1910.03771/) (2019)
- [Steering Llama 2 via Contrastive Activation Addition](https://mlsanity.com/paper/2312.06681/) (2023)
- [The Linear Representation Hypothesis and the Geometry of Large Language Models](https://mlsanity.com/paper/2311.03658/) (2023)
- [The Surprising Creativity of Digital Evolution: A Collection of Anecdotes from the Evolutionary Computation and Artificial Life Research Communities](https://mlsanity.com/paper/1803.03453/) (2018)
- [The Common Pile v0.1: An 8TB Dataset of Public Domain and Openly Licensed Text](https://mlsanity.com/paper/2506.05209/) (2025)
- [Legal Alignment for Safe and Ethical AI](https://mlsanity.com/paper/2601.04175/) (2026)
- [Generative Interpretation](https://mlsanity.com/paper/2308.06907/) (2023)
- [Large Language Models Hack Rewards, and Society](https://mlsanity.com/paper/2606.04075/) (2026)
- [AI Finds A Way](https://mlsanity.com/paper/2608.23875/) (2026)

## Abstract (arXiv)

The distinction between the spirit and letter of the law is a central issue across research and everyday life, and a growing concern for building safe, intelligent machines. What is this distinction based on, and how can we develop machines that follow the intention behind a rule? We used targeted adaptation that made large language models prioritize the spirit or letter of the law. With minimal modifications, our method significantly changed LLM behavior across diverse measures, novel vignettes, real-world scenarios, and influential legal cases. An analysis of model internals revealed a low-dimensional space with three interpretable dimensions matching a formal pre-specified framework for the geometry of legal concepts. These findings show how legal thought in LLMs may be organized and directed.
