SabaKore

Home / Articles / AI guides

With AI Apps, It's Hard to Tell Whether They're Working

How to deal with the fact that results can change even when you haven't changed anything. It covers what to record, the responsibility that comes with recording itself, and what to tell users.

Ren, a junior infrastructure engineer

Ren

There are no errors, so it must be working fine!
Procura, a cloud AI robot who explains

Procura

That's what's hard about apps that embed AI. It can "return a wrong answer without raising any error". In an ordinary program, an abnormality becomes an exception or an error, but AI calmly returns wrong content.
Ren, a junior infrastructure engineer

Ren

Then I can't even notice...!
Procura, a cloud AI robot who explains

Procura

That's why keeping records matters even more than in an ordinary app. If you can't see what you passed and what came back, you can't get beyond "it's been off lately, somehow".

What to record

  • What you passed to the AI and what came back
  • The type of model used (so you can compare before and after a change)
  • The time the response took
  • The amount consumed (directly tied to understanding cost)
  • The number of errors and of cut-off requests

Cautions when recording

Procura, a cloud AI robot who explains

Procura

But if you save everything you passed as is, you're "piling up users' input". If it includes personal information, you take on responsibility for managing it too.
  • Mask the parts that may contain personal information before saving
  • Decide a retention period and delete old data automatically
  • State what you store in your privacy policy
Ren, a junior infrastructure engineer

Ren

So keeping logs itself comes with responsibility.
Procura, a cloud AI robot who explains

Procura

Right. Not "keep everything" and not "keep nothing": keep only what you need and set an expiry. That's the right compromise.

Results change even though nothing has changed

In an ordinary program, the output hardly ever changes when the input is the same. Once AI is involved, answers can change even if you haven't touched anything, because the provider may swap out the model. You need to keep records on the assumption that "it worked yesterday" gives you no clue for finding the cause.

  • Even with the same input, the content returned isn't always the same each time
  • The model you use may be updated and its tendencies may change
  • Fixing the instruction text slightly can change results in other parts
  • So you need a way to confirm that "it worked before"

The minimum to notice problems

If you try to record everything, the volume grows and in the end nobody reads it. What to keep first is the pair of input and output, the time taken, and the reason when something fails. With these three, you can later trace "since when it changed".

Procura, a cloud AI robot who explains

Procura

You don't need to monitor everything. Start from being able to notice that it broke.
  • Prepare several representative inputs and regularly test whether the expected answers come back
  • Make the error rate and the response time visible
  • Provide a way for users to say "this wasn't helpful"
  • Record the date and time you changed the instruction text, so you can match it against changes in results
Procura, a cloud AI robot who explains

Procura

The last one is unglamorous but effective. If you know "since when it changed", the candidates for the cause narrow down at once.

Make it visible to users

Procura, a cloud AI robot who explains

Procura

AI's answers aren't always right. Tell users on the screen as well, so they can take that as a given. It changes how they place their trust.
  • Show that the content was generated by AI
  • If you can show the documents it was based on, show them
  • Provide a way to report mistakes
  • Make it possible for users to check important decisions themselves
Ren, a junior infrastructure engineer

Ren

Keep only what's needed and set an expiry. Record the day I changed things.

This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.