The AI api would work in such a way : when one string is given for the first time, an image is generated and stored as the "good" response to that string.
The second time the string is passed to the ai, the image is not generated again, but rather the api send the stored related image.
You could implement from the extension a system of downvote/upvote that would be associated with the "correctness" of the appended image. When the image is downvoted too many times, the image is destroyed, and supervised learning tools are used in order to correct the AI weigths BUT taking into account the positive scores of correctness via upvotes of the other pictures.