What 'AI'? We're still working with Advanced Expert Systems.
Having pointed out that fact, I'll move on to a few comments.
• Contemporary expert systems use object code that allows minimal coding by secondary developers. Thus "When you're writing the code, usually there's not that much code." This of course means that the object code is a Black Box, which of course is going to have plenty of human created, IE buggy code in it. That's not cynicism. That's a roaring-in-our-faces fact of the times. Therefore, there will be artificial insanity (ai) in the system. (The cure we're waiting for is throwing out all C languages, ad nauseam, and replacing them with languages that offer no possibility of buffer overruns. This of course requires improved code compilers as well).
• The data being tossed around and interpreted via secondary developers via their apps is in what amounts to a Database. That database may be created on the fly. The interpretations may vary with each use. But we're still working with databases. With the hot dog, visual data points are acquired: Color, 3D sizes, textures, reflection, shape relationships, etc. From this relatively small database, the points collected are compared with source template data, a correspondence/correlation is calculated (statistical algorithms), a best analysis result is postulated and the output conclusion is handed to the user. "Not a hotdog." So what is it? The source template database isn't large enough to know. So grow the template database for further comparisons as required. Database bloat of course results in the usual, predictable problems of speed and compromised analysis. The expert system get's less coherent or useful. Focus, culling and improved first developer black boxes are required.
• Actual 'AI' remains a goal, an ambition, a thing of science fiction, an abstract that we may not actually recognize as what we originally conceived or intended the 'AI' to be. We're exploring, pioneering, inventing, adjusting, adapting, injecting, evolving as we create what AI is to be. Even then, there will be market forces (beware!), money and human behavior at work to warp, abuse or personalize AI on any given day. That's real 'intelligence' imprinting upon the artificial 'intelligence', using it as a tool for whatever purpose is at hand. That of course will include mankind's worst purposes, including killing and controlling one another (further beware!).