Ryan X. Charles
Ryan X. Charles
Follow

Expanding Text, Shrinking Text, and Translating Text: That's the Whole Job

April 22, 2026 · Ryan X. Charles

LLMs are general-purpose text transformers. They expand text, shrink text, and translate text between languages. That is the entire job. Everything a coding agent does for you — refactoring a class, writing a function, drafting a design doc, porting a project from Python to Rust — is one of those three operations or a pipeline of them.

Expanding text

Start with a small amount of text and make it bigger. A one-line specification becomes a function. An outline becomes an essay. A bullet list becomes a memo. A sketched interface becomes a working implementation. This is the transformation that feels most like magic, because the output is enormously larger than the input — and the output is usually correct. The model is not inventing the expansion; it is filling in the obvious consequences of what you already said.

Shrinking text

Start with a large amount of text and make it smaller. A hundred-file codebase becomes a three-paragraph summary. A two-hour transcript becomes a bullet list. A ten-page PDF becomes three sentences. An angry customer email becomes a single line describing what they want. This is the transformation that most people underuse, because it looks unglamorous — but every time you open a new repo and ask the model “what does this do,” you are using it, and nothing else on the planet can produce that answer in under a minute.

Translating text

Start with text in one language and produce the same meaning in another. The set of “languages” is where this transformation gets interesting: English, Mandarin, Rust, TypeScript, SQL, regex, a proprietary DSL you invented on Tuesday, all interchangeable. Writing code is a special case of translating English into syntax. Porting a project is translating one syntax into another. Explaining a function to your teammate is translating syntax back into English. All of it is the same operation, performed at roughly the same quality regardless of which two languages you picked.

The late-2025 transition

Sometime in late 2025, the frontier models crossed a threshold. Before that point, the honest framing of LLMs was “sometimes as good as a human, often worse, occasionally better on narrow tasks.” After that point, the honest framing flipped. A current-generation model now performs all three of these transformations faster and more accurately than any human being, at any experience level, on any task I have tested. This is not a gradual improvement narrative. It is a phase change. The old “AI is catching up to humans” framing is at least a year out of date, and anyone still using it is describing a version of the technology that no longer exists.

Better and faster, not “comparable to”

A current-generation model will translate a C++ function into idiomatic Rust more accurately than almost any human engineer, and do it in under a minute. It will refactor a thousand-line React component with a cleaner internal structure than the human who wrote it. It will summarize a legal contract more crisply than the paralegal who bills by the hour. I am not writing the kind essay that concedes “of course, humans are still better at X” — for the three operations that make up the entire job, humans are no longer better at anything. That is the part of the transition people are still refusing to name out loud. (This is why I no longer write code by hand.)

The errors are yours

If a coding agent produces the wrong code, it did not make a mistake. You forgot to tell it something. The late-2025 generation of models does not invent — they extrapolate from the text you gave them. When the output is wrong, it is almost always because the input was incomplete: the relevant file was not in the context, the constraint was not in the prompt, the previous failed attempt was not mentioned, the coding convention was not stated. Give the model everything a human engineer would need to do the task, and the errors disappear. Give it less, and it will fill the gap with a plausible guess — and a plausible guess is what “hallucination” actually is. Hallucinations are not a model defect. They are a missing-context defect, visible on the model side because the model is the component that has to produce an output anyway.

What “giving it context” actually means

Paste the file. Paste the files it imports. Paste the test. Paste the error message. Paste the stack trace. Paste the three previous attempts and why each one failed. Paste the coding conventions. The context window is enormous for a reason — use it. This is the part of AI coding practice that most people still treat as optional, and it is not optional; it is the whole practice. It is also why research-driven development is the natural companion to AI coding: the issues/ folder exists so the context is already written down, and the agent can read it without being prompted to. The lab notebook is the context, reusable across every prompt.

Give it the context.


Earlier Blog Posts


Back to Blog

Copyright © 2026 Ryan X. Charles