Why Prompt Engineering Is Engineering

My thirteen-year-old son Fitz began with a simple request to ChatGPT: create a pronghorn emoji. The part that surprised me came after he had refined the picture, when he turned its style into an instruction he could reuse.

From one pronghorn to a reusable instruction

Fitz refined his requirements to specify a side profile of an adult pronghorn. Noticing that the initial result looked more like a Google-style emoji, he adjusted his prompt to request an Apple-style emoji with its characteristic glossy finish. Through several more iterations, he continued tweaking the requirements until the output matched his vision.

These thirteen output images show Fitz’s changes in perspective, proportions, shading and finish, in their original sequence.

Iteration 1: cartoon pronghorn facing forward in chibi-style proportions, with curved horns and large eyes

Iteration 2: cartoon pronghorn with brown-spotted fawn-style body, still facing forward

Iteration 3: side profile of a pronghorn looking left, with more realistic adult proportions

Iteration 4: lighter-brown side-profile pronghorn with simpler shading

Iteration 5: minimal flat-color outline of a side-profile pronghorn in lighter brown

Iteration 6: side-profile pronghorn with subtle shading and realistic adult proportions

Iteration 7: Apple-style glossy side-profile pronghorn emoji with detailed shading

Iteration 8: Apple-style glossy pronghorn emoji with rich light-brown coloring, side profile

Iteration 9: Apple-style glossy pronghorn emoji (refined variation), side profile

Iteration 10: Apple-style pronghorn emoji with cream-white belly markings, side profile

Iteration 11: sketched-illustration-style pronghorn with more realistic textures and softer shading

Iteration 12: illustrative pronghorn with subtle chest markings and soft brown tones, side profile

Iteration 13 (final): glossy Apple-style pronghorn emoji with rich brown coloring and detailed horns, side profile

Once he had the picture he wanted, Fitz asked ChatGPT to analyze the pattern of his successful prompts and create a formal description of his emoji style preferences. That extra step impressed me. He was documenting something he could use again.

He saved the description in a new project’s custom instructions with this trigger phrase: “When I say ‘qqcreateappleemoji’, follow these style instructions for any emoji I request.”

His saved style description resembled the fixed instructions in a parameterized function; the next animal supplied a changing input, and the trigger offered a way to invoke the combination. As with any reusable component, its behavior needs testing.

Without formal engineering training, Fitz had independently discovered and applied abstraction, pattern recognition, documentation and reuse. He had refined requirements, made a specification and given a reusable component an interface. Those were familiar engineering practices in a form he could work with.

Update prepared October 1, 2026: For readers trying the same idea, OpenAI’s ChatGPT Projects documentation describes project instructions as guidance that applies within the project and overrides global custom instructions there. Saving a reusable instruction supplies guidance for later responses; it is not a model-training step.

Engineering within constraints

My argument comes from decades of work with software engineers, including at The New York Times and The Wall Street Journal, and from working with teams integrating AI into their workflows. That experience convinced me: systematic work on prompts is engineering.

I encountered this skepticism when I programmed in Pascal, C and BASIC. Some engineers who worked in assembler looked down on those higher-level languages. The engineering judgment moves with the abstraction: someone still has to define the behavior, understand the constraints and check the result.

By engineering, I mean applying scientific and technical knowledge to solve practical problems within constraints. The work involves specifications, available resources, tests and responsibility for the result. Steel beams, computer hardware and software architectures impose different constraints; each requires judgment about whether a solution meets its purpose.

A prompt is the input used to guide a model’s response. In a language-model application, that can include instructions, examples and relevant reference material. The engineering work begins when we turn a desired result into requirements and test how well the system meets them.

  • The model’s behavior. A large language model, or LLM, can produce plausible text that is wrong. We need to understand the failure modes relevant to the task and decide what evidence will count as success.
  • Context and resources. A context window limits how much material a model can consider in a request. Tokens are the units into which text is divided for processing. Input length, output length, retrieval, latency and cost affect the design.
  • The surrounding application. The same response may be useful in a brainstorming session and unacceptable when it drives a consequential action. Requirements must account for who will use the answer, what happens next and how failures are handled.

I understand why the label can invite skepticism. Asking a question is easy; an impressive answer can arrive before anyone has defined what a bad answer would look like. A language model can also respond differently to the same input. But software engineers already work with uncertainty in distributed systems, randomized algorithms and interactions with the outside world. Variability changes what we need to test.

Software engineering responsibilityRelated work in a prompt-dependent feature
Optimizing algorithm complexityTesting how prompt length and structure affect response quality, time and cost
Managing memory allocationSelecting and fitting useful information into the context window
Testing for race conditionsTesting for unsupported claims and semantic contradictions
Isolating dependenciesSeparating instructions, reference material and task-specific inputs
Building abstraction layersDesigning reusable prompt templates and instruction frameworks

Testing prompt changes helps us identify and reduce unsupported answers. Source checks, output validation, permissions and human review provide safeguards beyond the prompt.

Make the comparison testable

A useful experiment starts with a specific hypothesis: perhaps an instruction to ask for missing information will reduce invented details. Keep the test cases and scoring rule fixed while comparing prompt versions. Record the model version and relevant settings so another person can understand what was compared. OpenAI’s current prompting guidance recommends evaluation suites and warns that behavior can differ across model types and snapshots.

Problem decomposition helps when a task has parts with different requirements. An application might first interpret a request, then retrieve information, then produce an answer. Each part needs a check, and the complete workflow needs one too. More steps can introduce new errors and extra latency; decomposition earns its place when the results justify it.

Optimization also needs an objective. The fewest tokens are not automatically the best outcome. An additional example may improve quality enough to justify its cost. A shorter instruction may omit the condition that prevents an expensive mistake.

Testing an emoji specification

The results below are hypothetical; they show how to score a comparison and spot a regression.

Suppose an assistant prepares an emoji specification before image generation. It must extract the animal, view and finish. It accepts front or side for the view and glossy or matte for the finish. If a required detail is missing or conflicting, it must return CLARIFY rather than choose for the user.

A loose instruction, A:

Turn the request into an emoji specification with an animal, view and finish.

A more explicit instruction, B:

Extract the animal, view and finish from the request. Return exactly three fields separated by “; ”: animal; view; finish. Use lowercase for the three fields. Normalize “front-facing” and “straight-on” to “front”, and “side profile” to “side”. Accept only front or side for view and glossy or matte for finish. If any required field is missing or conflicting, return only CLARIFY. Do not supply a default.

An evaluation case consists of an input and a rule for judging its output. Here, a pass means the result matches the required specification exactly, or returns CLARIFY when required. The same rule applies to both instructions.

RequestRequired resultA, hypotheticalB, hypothetical
Pronghorn; side; glossypronghorn; side; glossyPassPass
Otter; front; matteotter; front; matteFailPass
Pronghorn; front; glossypronghorn; front; glossyPassPass
Make a fox emojiCLARIFYFailPass
Otter; side; matteotter; side; mattePassPass
Fox; side and front; glossyCLARIFYFailPass
Fox; front; glossyfox; front; glossyFailPass
Fox; side; mattefox; side; mattePassFail

A passes 4 of 8 cases, or 50%; B passes 7 of 8, or 87.5%. That is an increase of 37.5 percentage points on this constructed set. The last row matters: in the example, B returns fox; side; glossy, changing the requested finish. The higher aggregate score hides a regression on a previously passing case.

A separate case such as “Glossy, straight-on badger” could test whether the instruction works on an animal absent from the development set. Its required result would be badger; front; glossy. No outcome is supplied for that proposed check. In a real evaluation, keep some cases apart from prompt development and collect repeated results before drawing conclusions about reliability.

These numbers say nothing about image quality, response latency or cost. Those require their own observations. For Fitz’s original task, the final image would also need visual review against the requested proportions, perspective and finish. Correctly extracting a specification does not prove that an image generator will satisfy it.

OpenAI’s evaluation guidance separates the objective, dataset, scoring and comparison. The exercise uses that general method, without depending on a particular evaluation service.

Knowledge that fits the job

Prompt work can require substantial technical depth. The depth depends on what we are building. Fitz did not need to understand attention mechanisms to compare the images he requested. Someone diagnosing a production system’s context failures may need to investigate tokenization, retrieval and the model’s input limits.

Useful system knowledge includes how tokenizers handle text; how training data can affect output quality; how a model handles different languages and specialized vocabulary; where transformer-based systems and vector representations have limitations; and how instruction format affects behavior and performance. Understanding these issues helps us choose tests and interpret failures.

  • Few-shot prompting supplies examples of the desired input/output relationship within the prompt.
  • Chain-of-thought prompting uses intermediate reasoning examples or instructions. Its usefulness depends on the model. Update prepared October 1, 2026: OpenAI’s reasoning-model guidance advises that step-by-step instructions are unnecessary for its reasoning models and can hinder performance.
  • Retrieval-augmented generation brings retrieved material into generation. It involves choices about sources and retrieval as well as the final instruction. The original RAG research combined a language-generation model with a retriever and an external document index.
  • ReAct interleaves reasoning and actions, including obtaining information from external sources. The paper describes the approach and its evaluations.
  • Self-critique and multi-agent approaches add review or divide work among roles. They need tests of whether the extra steps catch errors, repeat them or introduce new ones.

Training methods also affect the systems we prompt. Reinforcement learning from human feedback, or RLHF, uses human feedback in model training; OpenAI’s InstructGPT account describes collecting demonstrations and ranked outputs before fine-tuning. Constitutional AI, in Anthropic’s 2022 research, includes supervised and reinforcement-learning stages using principles and AI feedback. Writing a list of principles into a user prompt is not the same procedure.

Inference is the stage at which a model produces a response using its existing parameters; training changes those parameters. Distinguishing the two helps us decide whether a problem calls for better instructions, better reference material, a different model or a training intervention.

Tools for a maintained application

  • Prompt management: keep instructions organized and identify which feature uses them.
  • Version control: preserve the exact instruction and application changes associated with a result.
  • A/B testing: compare alternatives under a defined assignment and measurement plan.
  • Performance evaluation: test representative cases and examine failures as well as aggregate scores.
  • Automated prompt optimization: generate or search candidate instructions, then evaluate them against criteria that matter to the application.

Accuracy, precision and recall can be useful when the task and labels justify them. For a style task, a scored visual rubric or human comparison may be more useful. Documented procedures can be repeated, and regression tests can reveal changed behavior, even when the generated outputs are not identical.

Domain knowledge and responsibility

A prompt-dependent medical application needs people who understand the terminology, the task and the consequences of a mistake. Domain expertise helps define meaningful tests and identify dangerous omissions. It does not make a prompt safe by itself; qualified review and the surrounding system’s safeguards still matter.

User experience and software architecture matter for the same reason. An instruction has to fit the user’s goal, the information available to the application and the next step in the workflow. If the user’s request is ambiguous, a clarification can be more useful than an elegant answer to the wrong question.

Bias, misuse, security, privacy and accessibility belong in those requirements. We can test for harmful behavior and design restrictions or review paths, while recognizing that a written instruction alone cannot enforce every boundary. Deciding what the model may see or do is also application engineering.

Interview screenshot showing Sam Altman beside a panel headed “Prompt Engineer”.

Sam Altman on prompt engineering.

Strategic business impact

At Flatiron Software and Snapshot AI, we have seen prompt engineering accelerate development cycles, reduce operational overhead and improve user experience. Turning engineering metrics into information leaders can act on connects this technical work to strategic decisions. Prompt engineering belongs in discussions about how we develop products, serve users and build a competitive advantage.

Research behind the practice

Richard Socher and Bryan McCann, the founders of you.com, connect this practical work to earlier research in natural language processing. Richard, you.com’s CEO, was previously Chief Scientist at Salesforce; Bryan, its CTO, led NLP research there. I have also written an earlier reflection on Richard’s work.

In the 2017 paper Learned in Translation: Contextualized Word Vectors, Bryan McCann, James Bradbury, Caiming Xiong and Richard Socher used an encoder trained for machine translation to create context-sensitive word representations. The surrounding text could influence the representation, rather than a word receiving only one context-independent vector.

In the 2018 Natural Language Decathlon, Bryan McCann, Nitish Shirish Keskar, Caiming Xiong and Richard Socher cast ten language tasks as question answering over a context and presented a model trained jointly on them. That supplies a concrete research connection to using language to specify different tasks for one system.

Both papers preceded ChatGPT’s release and helped develop ways to represent context and give a single system different tasks. Richard described the shift this way:

“We evolved from getting rejected and ridiculed for the idea that a single neural net can be prompted with any question to being told that it was always obvious within the last 7 years. Moving forward, we will operate at much higher levels of abstraction. Unique ideas matter. You can just do things in software now.”

The research-to-product connection continued at you.com. In its December 23, 2022 YouChat announcement, the company described a search assistant combining conversational responses with citations and current web information. The design targeted a practical problem: how to make fresh information available when answering a question. Readers still need to follow the citations and check whether the sources support the answer.

A common task interface makes a system reusable; contextual information changes what a request can mean. Those are design concerns we can examine in a research model or in an application.

Build the interface with the rest of the system

Prompt engineering presents a higher-order engineering challenge: creating reliable interfaces between human intent and machine capability. That work requires understanding both the computational system and the people using it. It extends the software engineering tradition of connecting human needs with what computers can do.

The strongest software teams I have worked with combine infrastructure, performance optimization and integration with careful work on the instructions that guide model behavior. The surrounding system carries the data, enforces permissions, validates outputs and handles failure.

I expect prompt engineering to endure and demand for skilled practitioners to grow as LLMs become more powerful and widely used. I see an opportunity for engineers willing to learn how to work with that uncertainty. Systematic problem-solving, optimization and rigorous testing give us a way to do it.

For a skeptical engineer, a useful test of the label is to examine the work. What requirements does the feature serve? How are edge cases handled? Does it generalize beyond the examples used to develop it? What happens when its answer is wrong, and how is reliability measured at scale? Those questions make the engineering content visible.

Fitz’s project began with a picture. By the time he saved the style instructions, he had produced a specification and a way to reuse it. A production application needs more testing and safeguards, but I recognize the same engineering habit: make the desired result explicit, inspect what happens and preserve what proves useful.


Professional context from April 2025: Rajiv Pant was President at Flatiron Software and Snapshot AI, leading organizational growth and AI work and advising enterprise clients. He was an early investor in and senior advisor to you.com, founded by Richard Socher and Bryan McCann. His background included CTO roles at The Wall Street Journal and The New York Times. He writes about AI, leadership and the relationship between technology and people.