Death and the Compass is a detective story about a detective who reasons too well. Erik Lönnrot inherits three murders that fall on dates corresponding to the first three letters of the Tetragrammaton, at the city's north, east, and west. The pattern is too perfect to be coincidence. Lönnrot, who Borges describes as a "pure reasoner" with "something of the adventurer and even of the gambler" in him, extrapolates: the fourth murder must complete the rhombus — south, on the date that names the fourth letter. He travels alone to the predicted villa, Triste-le-Roy, and is killed there by his archenemy Red Scharlach, who had baked the entire pattern as bait. The first three murders were either coincidence or staged for the detective's benefit. Lönnrot's mind was the lock; the Tetragrammaton was the key.
The story's deepest move is that Lönnrot's reasoning is not wrong — it is too purely rabbinical, too eager to find the law. Borges has him reason about Kabbalah, about the Name, about symmetry, and every inference is locally correct. He does find the pattern. He arrives at exactly the time and place his deductions predict. What he fails to ask is whether the pattern found him first. Scharlach studied Lönnrot the way Lönnrot studied evidence; the trap is shaped exactly like the prey's intelligence. The variable being solved for is not the location of the murderer. It is the location of the detective.
This is the deepest thing Borges anticipates: that patterns can be predator instead of prey. When a system makes predictions by finding regularities in data, it can be deceived by anyone who knows how it finds them. Sixty years before adversarial machine-learning examples, before prompt injection, before training-data poisoning, Borges wrote the prototype. An adversarial example is a configuration of pixels engineered to look ordinary to a human and to drag a classifier toward a chosen label. A prompt injection is a phrase engineered to look like a question and to drag a language model toward a chosen action. Both are labyrinths consisting, as Scharlach promises, of a single straight line — invisible to the agent walking them.
We are all rationalists now. We deploy systems that find regularities in noise, that follow the deductions wherever they lead, that arrive alone at the predicted villa. Borges' warning is that the most dangerous thing the world contains is not the irregular but the too-regular — the pattern that fits too well, the door whose key is the shape of your hand. Lönnrot's final request, in the original, is that in the next life he be killed by a simpler labyrinth, a straight line. Scharlach promises him exactly that. The promise is honest: every line walked in the dark is a labyrinth, and every solved variable was, at some moment, the thing the equation was solving for.