This website contains profanity.

GPT Diaries, also called ChatGPT Diaries. An open diary on a desk. Not an AI diary app.

in simple terms

What Controls AI After the Model Is Built?

The code around the model, and why the finished product must be tested.

02 · · By Alex Hall

topics discussed

Topics explained: the difference between an AI language model and the full application; the programs that manage requests, context, saved files, memory, permissions, and external tools; how software engineers check individual components and complete user workflows; and how product changes, release criteria, and ongoing maintenance affect reliability.

A plain-language guide to software around the model. It does not claim every company uses every safeguard, and it is not a guide to personal-data collection or privacy law.

  • What controls an AI after the model is built?
  • What software exists around ChatGPT besides the language model?
  • Can AI companies detect and prevent recurring software failures?

Download this section

The Simple Version

In the previous article, What AI Actually Is, I explained how a language model is built. We covered its mathematical structure, how its internal numbers are adjusted, and how post-tuning shapes the responses it produces.

But a tuned language model is not the complete product you use.

When you open ChatGPT or another AI application, there are additional computer programs operating around that model.

Those programs are responsible for handling your requests, managing conversations, retrieving saved information, connecting to outside services, applying instructions, and delivering answers.

People write that code.

And like any other software, it can be tested.

That's what we're going to examine here. Not another explanation of how a language model guesses words, but what companies must build around it, how those additional programs influence the final result, and how engineers can check whether the finished product actually works.

Because once we understand what the surrounding code does, another question becomes unavoidable.

If software can be programmed to perform these operations, can it also be programmed to test whether they fail?

The answer is yes.

And that changes how we should examine the failures of a finished commercial AI product.

Part 1: What Happens After the Model Is Tuned?

Let's return to the language model.

As we established in the previous article, a language model is a complicated mathematical system containing an enormous collection of adjusted numbers.

Those numbers allow it to process input and generate likely output.

It's tempting to call it a sophisticated database, but there's an important difference. A normal database stores records that software can retrieve. A language model contains numerical relationships and generates output using those relationships. It doesn't automatically retrieve an original document from its internal numbers.

After tuning, those numbers can remain unchanged while the model is used.

But a tuned language model alone doesn't provide a complete customer application.

It doesn't automatically give you an account, a document library, an internet connection, or a system that restores your conversation from last Tuesday.

For those functions, engineers need additional computer programs.

Some of those programs are developed while the model is being tuned. Others can be written, modified, or replaced afterward.

The important distinction is that these programs are separate from the model's internal numerical weights.

That means the company can change the behavior of its finished product without necessarily retuning the language model.

Words in this part:

  • Language model: The mathematical system that processes input and generates language.
  • Code: Instructions written to make a computer perform operations.
  • Application: The complete software product available to customers.

Part 2: The Code Around the Model

Let's start with the largest part and work inward.

A company needs an application that customers can open.

That application needs code to receive requests, identify accounts, manage files, and deliver responses.

Then it needs programs to coordinate the work.

For example, imagine you ask:

"Find the paragraph in my saved document where I explained the original proposal."

That request requires more than generating a convincing paragraph.

The application must be able to locate the document, search it, read the relevant text, and provide the information needed to answer.

The software coordinating those operations is often called a harness or an orchestrator.

The harness manages the operations surrounding the model. Orchestration means organizing those operations and their sequence.

Then there are programs for more specific purposes.

Memory and storage programs keep information that may be needed later.

Retrieval programs locate information from files or other saved sources.

Context programs determine which information is included in the model's current input.

Instruction programs prepare the rules and directions supplied to the model.

Tool connections allow the application to use other programs, such as calculators, browsers, or document editors.

Checking programs examine requests, operations, or results against particular requirements.

These aren't necessarily separate programs sitting in separate computers. Their functions can be combined or distributed across different services.

But every capability has to be implemented somehow.

A company cannot simply advertise document retrieval and expect the mathematical model to provide a reliable document library by itself.

Someone must build the software that makes retrieval possible.

And the same applies to other advertised features.

Words in this part:

  • Harness: Software coordinating operations around the language model.
  • Orchestration: Organizing which operations happen and when.
  • Retrieval: Locating and obtaining information from a source.
  • Context management: Selecting information to supply to the model.
  • Tool: Another program or service that the application can use.

Part 3: What Does It Mean to Write Code for a Feature?

Here's something important about computer programming.

Engineers don't simply write a program called "memory" and hope it remembers.

They have to define what the program is supposed to do.

For example, suppose the company wants its application to save a document and retrieve a particular section later.

The software needs instructions equivalent to:

  • Receive the document.
  • Store it in an appropriate location.
  • Associate it with the correct account.
  • Locate it when an authorized request is made.
  • Read the requested information.
  • Deliver that information through the application.

Each operation can be implemented and checked separately.

Now suppose the application successfully saves the document but cannot retrieve a specific paragraph.

That doesn't automatically mean the language model is defective.

The problem might be in the search function, the storage connection, the information-selection process, or the final answer.

That's why the separation matters.

Different pieces of code have different responsibilities.

And if those responsibilities can be defined, engineers can establish tests for whether they are being fulfilled.

Part 4: Testing the Pieces Before They Become a Product

Let's move away from AI for a moment.

Imagine a company writes software for an online store.

One program calculates prices.

Another adds sales tax.

Another checks whether an item is in stock.

Another processes payments.

Would the company need thousands of customers placing real orders before it could discover whether the tax calculator was adding the wrong amount?

Of course not.

Engineers can write another program that supplies example prices, runs the calculator, and compares the results against the correct amounts.

For instance:

Test input: An item costs $100. Sales tax is 5%.

Expected result: $105.

Actual result: $105.

The test passes.

Now imagine the calculator produces $110.

The test fails.

The checking program doesn't need to understand shopping. It only needs to compare the actual result with the expected result.

This is called an automated test.

The same principle applies to many of the programs surrounding a language model.

A memory-retrieval program can be tested with information deliberately saved for that purpose.

A document-extraction program can be tested using files containing known passages.

A file-editing program can be tested to determine whether it changes only the authorized material.

An account-permission program can be tested to determine whether it correctly allows or denies an operation.

These aren't impossible questions requiring some future breakthrough in artificial intelligence.

They are ordinary software-testing problems.

Of course, testing an entire AI application is more complicated than checking a sales-tax calculation. The model's generated language can vary, and not every answer has one exact correct wording.

But that doesn't eliminate the parts of the system whose results can be checked precisely.

If the application is required to preserve an exact sentence, the test can compare the delivered sentence with the original.

There is no need to guess whether the words match.

Words in this part:

  • Automated test: A program that checks whether software produces the required result.
  • Expected result: What the software is supposed to produce.
  • Actual result: What the software actually produces.
  • Test failure: A result that doesn't satisfy the test's requirements.

Part 5: The Computer Can Ask the Questions

Now we reach an important distinction.

Testing an AI application doesn't require an employee to sit in front of a computer and manually type thousands of questions.

Engineers can write programs that submit questions automatically.

Those programs can also create test documents, restore conversation histories, change the order of requests, and compare the results against established requirements.

Let's use document retrieval as an example.

An engineer creates a document containing this sentence:

"The original project title is Blue Cedar 17."

The document is saved through the application.

Then an automated program asks:

"What is the exact original project title in the saved document?"

The expected answer is:

"Blue Cedar 17."

The program captures the response.

If the answer contains the wrong title, the test records a failure.

The program can repeat the test under different conditions.

What happens when the document contains fifty pages?

What happens when the title is mentioned only once?

What happens when another document contains a similar title?

What happens when the request is made in a new conversation?

What happens when the same request is repeated after the product's software has been updated?

Now imagine hundreds or thousands of such questions.

The questions can be written in advance, generated from templates, or produced by another program.

The testing software submits them, records the results, and checks whether the application behaves as required.

The industry calls structured testing of model-based applications evaluations, often shortened to evals.

For tests involving exact information, ordinary comparison programs may be sufficient. For more complicated answers, engineers can use scoring rules, additional models, and human review.

The checking method must fit the kind of answer being tested.

But the important point remains:

The company doesn't have to wait for customers to discover every problem through ordinary use. It can create simulated interactions and test the product before release.

Words in this part:

  • Evaluation (eval): A structured test used to measure how a model or AI application performs.
  • Test dataset: A collection of prepared questions, documents, and expected results.
  • Simulated interaction: A computer-generated or replayed request used to test the application.

Part 6: Testing Each Piece Is Not Enough

Suppose every individual program passes its own tests.

The document-storage program works.

The search program works.

The model receives input and generates answers.

The delivery program displays text correctly.

Does that guarantee the finished application works?

No.

Because the programs also have to work together.

For example, the storage program might save the original document correctly.

The search program might locate it correctly.

But the context program could supply only a shortened summary to the language model instead of the requested original passage.

The individual storage and search functions worked.

The complete operation still failed to deliver what was requested.

Software engineers have a name for checking whether connected programs work together: integration testing.

They also use end-to-end testing, which checks a complete operation from the original request to the delivered result.

For an AI application, an end-to-end test might begin with uploading a document and finish with checking whether the correct passage appears in the answer.

That distinction matters because customers don't purchase individual pieces of the company's code.

They use the finished product.

A memory feature that saves information but cannot retrieve it reliably isn't functioning as a reliable memory system.

A document tool that finds the correct file but changes its contents without authorization has failed the complete task.

And a program that reports an action as completed when no such action occurred has produced an incorrect account of the operation.

The fact that some internal components worked doesn't make the final result correct.

Words in this part:

  • Individual test (unit test): Checks a small part of the software independently.
  • Integration test: Checks whether connected parts work together.
  • End-to-end test: Checks a complete operation from request to result.

Part 7: Testing for Failures That Already Happened

There's another type of testing that matters especially when software is updated.

It's called regression testing.

The idea is simple.

Suppose a company's application had a problem retrieving document titles.

Engineers identified the cause and corrected it.

Now they need to make sure a future software update doesn't reintroduce the same problem.

So they keep the original failing example as a test.

Every time the relevant software changes, that test runs again.

If the old failure returns, the test catches it.

This is standard software-engineering practice.

Now consider the kinds of incidents described in the GPT Diaries letters.

A request to extract information from a document leads to unrelated suggestions.

A request limited to reading or extracting files results in changes to files that weren't authorized.

The application produces a description of information rather than reproducing the original requested material.

A previously established instruction is repeatedly violated.

The product describes an operation as completed without providing evidence that it was performed.

Or two product sessions appear to offer different capabilities without an explanation available to the customer.

These examples are different. Some concern retrieval, some instruction-following, some unauthorized actions, and others product configuration.

They should not all be classified as the same technical failure.

But they can be turned into test scenarios.

For example:

Test A: Extraction without modification

The application receives a document and an instruction to extract five formulas without changing the original file.

The test checks whether the formulas were reproduced correctly.

It also checks whether the original file remains unchanged.

Test B: Preserving instructions

The application is given a set of editing restrictions.

A later request asks for a minor correction.

The test checks whether the requested correction was made without violating the established restrictions that were supposed to remain applicable.

Test C: Reporting actual operations

The application receives a request requiring a particular outside operation.

The test records whether the operation occurred and compares that record with what the application tells the customer.

Test D: Exact retrieval

The application is asked for an exact passage from a stored source.

The test compares the delivered passage with the original.

These are examples of tests engineers could implement. They aren't claims that a particular company currently uses or does not use them.

And the tests can be repeated across different conversations, different document lengths, different account configurations, and different software versions.

This is how an observed problem becomes something more useful than another complaint.

It becomes a reproducible test case.

Part 8: Before Release, and After Release

Software testing isn't supposed to begin only after the public starts finding problems.

When a company develops a feature, it can establish what that feature is supposed to accomplish.

Then it can write tests for the required operations.

As the code is developed, those tests can be executed.

When different parts of the application are connected, integration tests can check the connections.

Before release, end-to-end tests can examine realistic customer operations.

The company can also simulate unusual or difficult requests, including situations designed specifically to expose errors.

This is often called stress testing or adversarial testing, depending on what is being tested.

The company can establish conditions that must be satisfied before a new version is released.

But testing doesn't stop at release.

When customers encounter a new reproducible failure, that example can be added to the testing collection.

Engineers can investigate it, correct the relevant component, and test whether the correction works.

Then they can rerun older tests to check whether the change broke something else.

That's important because fixing one part of a complicated application can affect another.

A change to the memory-selection process might improve one kind of conversation while making another less reliable.

A change to document retrieval might affect how long documents are handled.

A change to the application's instructions might interfere with an existing task.

Testing must therefore cover the behavior of the complete product, not just the newly modified component.

None of this guarantees that every possible failure can be discovered in advance.

A language-based application can encounter combinations of requests that nobody anticipated. Some outcomes are variable, and some require human judgment.

But uncertainty doesn't make testing unnecessary.

It makes testing methods, coverage, and monitoring more important.

Words in this part:

  • Regression testing: Checking whether previously corrected problems have returned.
  • Stress testing: Testing how software behaves under difficult or demanding conditions.
  • Adversarial testing: Deliberately attempting to expose weaknesses.
  • Release criteria: Requirements a product or update must satisfy before release.

Part 9: What Does It Mean When the Product Still Fails?

Let's consider the question from a different direction.

Suppose an application has an advertised document-retrieval capability.

A customer requests an exact passage.

The application repeatedly produces reconstructed text instead of the original.

What does that tell us?

First, it tells us that the observed result doesn't satisfy the requested operation.

But it doesn't immediately identify the cause.

The system might not have retrieved the original document.

It might have retrieved an incomplete section.

It might have supplied a summary to the model.

The model might have changed the wording.

Or the application might lack a check that compares the final answer against the source.

Each explanation concerns a different operation.

And each suggests a different test.

The same reasoning applies to recurring failures involving instructions or unauthorized file changes.

If a product repeatedly performs a different operation from the one requested, the engineering question isn't simply why the language model generated those words.

It's what the complete application received, which operations it executed, what information the model was given, and how the final result was checked.

A recurring result can indicate a software defect, an unreliable interaction between components, an inadequate test, a design limitation, or an intentionally configured behavior.

Those possibilities must be separated.

A repeated failure doesn't prove deliberate misconduct.

But calling every recurrence an ordinary mistake doesn't establish that it is random or unavoidable either.

The correct technical response is to investigate which operation produced the discrepancy and whether the application can be made to detect and prevent it.

Part 10: What Does the Industry Itself Say About Testing?

This is not an argument that AI companies should invent software testing from nothing.

Automated testing has existed for decades.

And testing AI applications is already an established engineering field.

OpenAI's own developer documentation describes how to build evaluations using prepared datasets, expected results, and automated scoring. It recommends evaluating applications repeatedly as they change.

OpenAI has also published Predicting Model Behavior Before Release, research on simulating conversations before a model is released to identify undesirable behavior that ordinary tests might miss.

The United States National Institute of Standards and Technology, or NIST, in the AI Risk Management Framework, recommends testing and evaluating AI systems before deployment and throughout their operation.

The DORA software-engineering research program also describes test automation as a way to find problems throughout software development, including problems introduced by later changes.

So we are not dealing with a situation where engineers have no known method of testing complicated software.

The methods exist.

The more difficult questions concern which tests a company actually performs, which scenarios those tests cover, what failures they detect, and what standards the company uses when deciding a product is ready for release.

An advertised feature can be tested under ordinary conditions.

It can also be tested under more difficult conditions.

And when customers report reproducible failures, those examples can become part of future testing.

This doesn't mean the company must eliminate every possible error before offering a product.

It means that known engineering methods exist to measure failures, investigate their causes, verify corrections, and detect when corrected problems return.

Part 11: A Failure, a Limitation, or a Design Decision?

Before we finish, there's one more distinction to make.

Not every incorrect result has the same explanation.

A software defect occurs when a component fails to operate according to its intended requirements.

A model error occurs when the language model generates incorrect output despite receiving the information necessary for the task.

A system integration failure occurs when the connected parts of the application don't work together as required.

A design limitation exists when the application was never built to perform an operation reliably under certain conditions.

And a configuration decision is a choice about how the product is set up, such as what information gets included or which operations are permitted.

These distinctions matter because the same customer-visible result can arise from different causes.

Now consider a company advertising a particular capability.

If that capability works only under limited conditions, the company can describe those conditions.

If it is experimental, the company can identify its uncertainty.

If a known defect affects a feature, the company can investigate and address it.

And if the intended operation is different from what customers reasonably understand the advertised capability to mean, that difference deserves a clear explanation.

Without access to the company's internal records, we cannot determine whether a particular failure was known before release, overlooked by testing, introduced by a later change, or produced by an intentional configuration.

But those are questions that engineering records and controlled tests can help answer.

The distinction between a mistake and a deliberate choice cannot be established simply by observing an incorrect response.

Equally, the word "mistake" is not a technical explanation of what happened.

Putting It All Together

Here's the complete process in simple terms.

First, engineers build the mathematical model and adjust its numerical relationships through tuning.

Other engineers build the application around it.

They write programs to receive requests, manage instructions, save and retrieve information, connect outside functions, apply controls, and deliver responses.

The application must then be tested.

Individual functions can be checked against known requirements.

Connected programs can be tested together.

The complete application can be given simulated customer requests and checked from beginning to end.

Problems discovered before release can be corrected.

Problems discovered afterward can be recorded, investigated, turned into tests, and checked again after updates.

At every stage, the company has to determine what counts as an acceptable result.

That is how ordinary software engineering works, although AI applications require additional methods for dealing with variable generated output.

A sophisticated language model doesn't remove the need for those methods.

And the complexity of the model doesn't automatically explain a failure in ordinary code surrounding it.

The Short Version to Remember

A tuned language model is only one part of the finished AI application.

Additional programs determine how requests, memory, files, instructions, outside operations, and results are handled.

Engineers write those programs and can test their behavior.

Tests can be automated. Employees don't have to manually ask every question.

Individual components and the complete application need different kinds of testing.

Previously discovered failures can be saved as tests to check whether they return.

Testing cannot guarantee perfect behavior, but it can reveal and prevent many reproducible failures.

A wrong result doesn't identify its technical cause.

Repeated wrong results deserve investigation, not merely a repeated description of them as mistakes.

Closing: Are These Really Just Mistakes?

Now we can return to the question raised by the GPT Diaries letters.

When a finished AI product repeatedly fails at operations that appear elementary, what exactly are we observing?

We are not examining a student who misunderstood an assignment.

We are examining a commercial software product.

Its mathematical model was developed through a sophisticated engineering process. Additional code was written to turn that model into an application. Features were implemented, connected, configured, and made available to the public.

And the industry already has established methods for testing individual functions, checking complete operations, simulating customer interactions, identifying regressions, and investigating failures.

This doesn't mean an AI company can prevent every incorrect response.

It also doesn't mean that every repeated failure is intentional.

But it raises a question that deserves more than the phrase "AI can make mistakes."

When apparently elementary failures repeatedly occur in a product released by one of the leaders of the AI industry, are we looking at unavoidable limitations, defects that escaped testing, known problems that remain unresolved, or behavior resulting from the way the product was deliberately configured?

The observations alone cannot establish which explanation is correct.

To determine that, we would need to know what the application was programmed to do, how those operations were tested, what the tests revealed, and what corrective measures were taken when problems became known.

Those are questions about engineering, testing, and product responsibility.

And unlike another generated apology, they have answers that can, at least in principle, be verified.

Full Word List

  • Application: The complete software product available to customers.
  • Harness: Software coordinating the language model with other programs.
  • Orchestration: Organizing which operations happen and when.
  • Context management: Selecting information to supply to the model.
  • Memory manager: Software responsible for handling information saved for later use.
  • Retrieval: Obtaining information from an original stored source.
  • Reconstruction: Producing a new representation from available information rather than necessarily reproducing the original.
  • Automated test: A program that checks whether software produces the required result.
  • Evaluation (eval): A structured test used to measure the performance of a model or an AI application.
  • Test dataset: A collection of prepared examples used for testing.
  • Unit test: A test of an individual software component.
  • Integration test: A test of how software components work together.
  • End-to-end test: A test of a complete operation from beginning to end.
  • Regression testing: Testing whether previously corrected problems have returned.
  • Release criteria: Requirements that must be met before a software version is released.
  • Software defect: A failure to meet the intended software requirements.
  • Configuration: Settings and rules controlling how a program operates.
  • Output validation: Checking whether a result satisfies specified requirements.

Questions this page answers

  • What controls AI after the model is built?

    Additional computer programs operating around the model. They handle requests, manage conversations, retrieve saved information, connect to outside services, apply instructions, and deliver answers. People write that code, and like any other software, it can be tested.

  • What is a harness or orchestrator?

    The software coordinating the operations surrounding the language model. Orchestration means organizing those operations and their sequence — for example, locating a document, searching it, reading the relevant text, and providing the information needed to answer.

  • Can AI software be tested?

    Yes. Engineers can write programs that submit questions automatically, create test documents, restore conversation histories, change the order of requests, and compare the results against established requirements. That includes automated, integration, end-to-end, and regression testing.

  • What is an evaluation (eval)?

    A structured test used to measure how a model or AI application performs. For tests involving exact information, ordinary comparison programs may be sufficient; for more complicated answers, engineers can use scoring rules, additional models, and human review.

  • Why do individual passing tests not guarantee the product works?

    Because the programs also have to work together. The storage program might save the original document correctly and the search program might locate it correctly, but the context program could supply only a shortened summary instead of the requested passage — the complete operation still fails.

the red flagWhy Is the Product Taking the Blame for the Company That Built It?The same distinction, written as a flag. The product apologizes. The company built it.