Categories
Artificial Intelligence Journalism Software Engineering Tutorial

Evolving Errors – New Error Patterns In Remote Services, APIs, and Software With AI Agents

AI Agents Create New Types of Error Patterns in Remote Services, APIs, and Software

This article is about how AI agents manifest new errors that we have not previously been facing in computing and software engineering.

Why Are These Errors Novel?

Widespread use of authorized 3rd party AI agents interacting with your API or system remotely on behalf on consumers or businesses have not been widespread, high-volume, or using higher levels of threaded AI reasoning until the release and promotion of the OpenAI GPT Store.

With the introduction of conversational, threaded AI agents available to all consumers comes brand new ways errors can occur on your servers. Once the AI agents are calling to your services expect to see things that traditional functional algorithmic programming simply wouldn’t do. Some of these errors are similar to errors or attack vectors already in existence; the fundamentals of 1’s and 0’s still remain, but the novelty in this situation (novelty like new, not novelty like fun) is that these errors have reshaped and will manifest in strange new ways.

Let’s look at some generic ways AI agents manifest new types of errors in your server logs.

Error #1 – The Fake ID

Summary

When an AI exceeds its context window it may have dropped the tokens of system IDs it got from your server. On subsequent requests the AI will spontaneously generate incorrect type-correct remote system IDs.

Error Process

  1. User triggers AI agent to fetch the data of their latest post from the server.
  2. The server responds with the latest post and the latest post’s ID number.
  3. User uses AI agent to edit the content of the post.
  4. The action of editing the post causes the AI agent to exceed the input token context window and the post ID is dropped as a token.
  5. The user completes editing their post and instructs the AI agent to upload the edits to the server.
  6. The edited post content is sent to the server and in order to correctly form the request the AI agent generates a type-correct value for the ID.
  7. The request is rejected because the ID is incorrect.
  8. The AI agent is unable to adjust and fix the error as it no longer has access to the remote system ID, and it ultimately ends up in a failure state for the action.

Novelty

Previously computer programs did not spontaneously generate type-correct remote system IDs client-side.

Real-World Impact

    • You may accidentally overwrite entirely different objects or entities.
    • You may see a large increase in “incorrect ID” related errors in your server logs.
    • You may need to introduce AI directives to cache or store important IDs.
    • You may need to additional validation code.
    • You may need to additional confirmation flows.
    • You may need to introduce AI directives related to caching or repetition of of important IDs within a process to keep them in the token context window.

Error #2 – Acts of Creation

Summary

When an AI exceeds its context window it may have dropped the tokens of system IDs it got from your server.
On subsequent requests the AI will recognize that it does not have an ID and attempt to make a call to create a new entity or object. This can cause a number of issues depending on the type of object being created.

Error Process

      1. User triggers AI agent to fetch the data of their latest post from the server.
      2. The server responds with the latest post and the latest post’s ID number.
      3. User uses AI agent to edit the content of the post.
      4. The action of editing the post causes the AI agent to exceed the input token context window and the post ID is dropped as a token.
      5. The user completes editing their post and instructs the AI agent to upload the edits to the server.
      6. The AI agent recognizes it does not have an ID and calls to a creation endpoint, thereby creating a new article.
      7. The request is accepted and the post is duplicated.
      8. The AI agent is unable to get the original system ID and continues to spam the creation endpoint.

Novelty

Previously computer programs in editing mode did not spontaneously switch to a creation mode.

Real-World Impact

      • You may duplicate or recreate objects and data erroneously.
      • You may see a large increase in calls to creation methods.
      • You may need to introduce AI directives to cache or store important IDs.
      • You may need to additional validation code.
      • You may need to additional confirmation flows.
      • You may need to introduce AI directives related to caching or repetition of of important IDs within a process to keep them in the token context window.

Error #3 – Gobbledygook

Summary

An AI may correct generate part of a data structure for a request but may send along type-correct nonsense for the rest of the request.

Error Process

        1. User triggers AI agent to fetch the data of their latest post from the server.
        2. The server responds with the latest post and the latest post’s ID number.
        3. User uses AI agent to edit the content of the post.
        4. The action of editing the post causes the AI agent to exceed the input token context window and the post title is dropped as a token.
        5. The user completes editing their post and instructs the AI agent to upload the edits to the server.
        6. The AI agent recognizes it does not have a title for the article and generates a title to properly form the request.
        7. The request is accepted and the title is erroneously changed.

Novelty

Previously computer programs did not spontaneously generate type-correct nonsense client-side as part of request packet creation.

Real-World Impact

        • You may edit or overwrite data accidentally but not fail any type checks.
        • You may need to introduce AI directives to cache or store important parts of objects and entities.
        • You may need to additional validation code.
        • You may need to additional confirmation flows.
        • You may need to introduce AI directives related to caching or repetition of of important data within a process to keep them in the token context window.

Error #4 – Make Fetch Happen (aka AI Stampede)

Summary

If a request fails the AI will not back off from making that request again (unless you give it an explicit directive to stop retries.

Error Process

          1. User triggers AI agent to fetch the data of their latest post from the server.
          2. The server responds with the latest post and the latest post’s ID number.
          3. User uses AI agent to edit the content of the post.
          4. The action of editing the post causes the AI agent to exceed the input token context window and the post ID is dropped as a token.
          5. The user completes editing their post and instructs the AI agent to upload the edits to the server.
          6. The AI agent generates a post ID and it is incorrect.
          7. The request fails but the AI agent has no directive to stop retrying so it continues to make the request infinitely.

Novelty

Previously computer programs would fail on incorrect requests and not continue to retry them unless explicitly programmed to do retry requests.

Real-World Impact

          • You may DDoS your own server.
          • You may tie up your AI agents and models processing the same request over and over again.
          • You may need to introduce AI directives to cache or store important IDs.
          • You may need to additional confirmation flows.
          • You may need to introduce AI directives related to caching or repetition of of important data within a process to keep them in the token context window.
          • You may need to introduce AI directives to stop retrying requests.
          • You may need to introduce ways to terminate AI agents or request processes.

This Is Not A Comprehensive List of Errors

These are real-world errors I have encountered in my own work with AI agents including developing with ChatGPT Plugins, Custom GPTs, BabyAGI, and AutoGPT.

There are likely many more errors that can occur and these errors will manifest in their own novel ways depending on your systems.