Anthony KanBuild around People繁體中文
← All Build Notes

The old prompt was still talking to the model

Instructions that looked commented out were still inside the text sent to AI.

About 2 min read

I found a strange little story in the development history of my AI comic-making app.

Some old image-generation instructions looked as though they'd been commented out in the code.

Normally that means they're no longer active.

Except these comments were still sitting inside the text being assembled and sent to the AI image model.

To the program, the comment symbols were just characters in a string. So the old instructions were still being sent together with the new ones, sometimes saying contradictory things.

A rule we thought had disappeared was still talking to the AI.

The repair removed the obsolete text properly. It also added a check that could inspect the final assembled prompt without paying for a live model call.

I found that quite revealing.

When an AI behaves strangely, it's tempting to blame the model or keep rewriting what we think is the prompt.

But the prompt we think we're sending and the one the software actually sends may not be the same thing.

A surprisingly useful thing for a coding agent to investigate before we spend more money trying different models.

Related project

InkSpire →