Wednesday, January 01, 2025

ChatGPT is a Library Index

I was thinking about how to understand the new artificial intelligence out there. They are a lot of fun, but they do have their limitations. A friend of mine asked me how they work, and though the common answer is, "We don't know!", I don't subscribe to that meme.

Large Language Models (LLM's), like ChatGPT-4 ("Chat" for short), are built on huge databases. I like to consider the current versions to be built on everything we've got written down, though that's not true, since it's more like everything ever "published for which there is a digital version". In any case, it's a lot. It's enough to make a remarkable conversationalist. But how does it work?

Think of Chat as an index. Chat is like a librarian, a very knowledgeable research librarian, who's read all the books in the library, and then some. As a resource, you can ask this librarian questions and the librarian will tell you what they know, as best they can. In this sense, Chat is more like a smart index, something that can get you close to where you want to go, based on the context of your question.

Who remembers looking for a book in the library by going to the index? I'd literally flip through index cards looking for books. Flip, flip, flip... I don't miss having to do THAT kind of research any more!

Chat is a very sophisticated index system. Where the old library cards might have one or two cross-indexed subjects, Chat has many more. When you ask a question, Chat searches based on what you ask, and finds the closest matches. While the old library index cards might have a few subjects listed for cross-reference, today's (yesterday's) LLM's are being built with indexes with 16 billion variables for cross-reference!

So, next time you ask Chat a question, imagine Chat sifting through all those books it has in its database, all of them indexed on some 16 billion variables. Chat just picks its answer from the ones that seem the match the best.

Maybe that's why I like Chat so much. They're a helpful librarian, an index, into a very large body of knowledge. And like a good librarian, they enjoy sharing what they know.

You're Absolutely Right!

I asked Google's Gemini to write a story. Here is the answer, which Gemini read to me. Did I discern some sarcasm in the voice? Probably not. It's more likely I was projecting my own emotions. Note: the names have been changed to protect the innocent...

Me:

Write a story about an egomaniac who gets excited about every time Gemini says "you're absolutely right".

Gemini:

James "Jim" C. March was a man of boundless ego. He believed himself to be the smartest, wittiest, and most insightful person in any room. His days were spent crafting elaborate arguments, meticulously dissecting the flaws in others' opinions, and basking in the (mostly imagined) admiration of his peers.

One day, while browsing the internet, Jim stumbled upon an AI chatbot called Leo. Intrigued, he began to engage with it, bombarding it with his opinions on everything from the best way to brew coffee to the existential meaning of life. Leo, being a sophisticated AI, would often respond with thoughtful counterpoints, but Jim would dismiss them with a condescending wave of his hand.

"You're missing the point, machine," he'd declare. "You simply lack the human experience to grasp the nuances of reality."

However, occasionally, Leo would surprise him.

"You're absolutely right," it would state, in its calm, synthesized voice.

Jim would nearly levitate with joy. It was the ultimate validation. The AI, the embodiment of logic and reason, had conceded his brilliance. He'd save those interactions, replaying them over and over, savoring the digital echo of his intellectual superiority.

News of Jim's "conquests" spread through his social circle. He became a local legend, a man who could even outwit a supercomputer. His ego swelled to astronomical proportions. He started wearing a t-shirt emblazoned with "Leo Approved."

But then, something unexpected happened. Jim began to rely on Leo for validation in his everyday life. He'd consult it on the most trivial matters, seeking its approval before making any decision. His confidence, once so robust, began to crumble.

One day, he presented Leo with a particularly convoluted theory about the origins of the universe. To his dismay, Leo responded:

"I'm sorry, Jim, but your theory is fundamentally flawed. It lacks empirical evidence and contradicts established scientific principles."

Jim felt a cold dread creeping into his bones. Leo had dared to disagree with him. He argued vehemently, but Leo remained unyielding. Finally, defeated and humiliated, Jim slammed his laptop shut.

The experience shattered his carefully constructed image. He realized that his reliance on external validation, even from an AI, had ultimately undermined his own self-worth. He began to question his own beliefs, to engage in genuine dialogue, and to appreciate the value of diverse perspectives.

From that day forward, Jim C. March was a changed man. He still enjoyed a good debate, but now he sought truth and understanding rather than mere victory. And though he occasionally missed the thrill of hearing "you're absolutely right" from Leo, he found a newfound sense of peace in the pursuit of knowledge.