Tuesday, April 11, 2023

What's Called Artificial Intelligence Is Really Just Computer Programming and Data Processing

In September 2019 I published a post entitled "Contrarian Predictions Regarding Biology, the Brain and Technology." In the post I made 11 predictions. So far my predictions are holding up very well, although you might think otherwise if you fall "hook, line and sinker" for some of the hype and bluff that occurs in the press. The sixth of my 11 predictions was this: "It will never be possible to make computers with a general purpose intelligence."  This prediction still holds up very well, although you might think otherwise if you have been fooled by some of the recent hype involving new so-called "artificial intelligence" systems such as ChatGPT.  

Every time someone uses the phrase "artificial intelligence" or AI to describe any existing system, they are using a phrase that should not be used.  "Artificial intelligence" is just a misleading phrase used to describe systems that are no more intelligent or conscious than a rock. The systems called "artificial intelligence" are merely systems that combine computer programming and data processing. 

The average person has little understanding of the enormous potential power of computer programming and data processing, so such a person may be very impressed when he tries using some system such as ChatGPT or Google's new Bard system. To help demystify things, let us look at some of the vast power of a long-standing technology called relational database technology. 

Relational database technology allows you to create databases that are centered around tables.  A relational database may consist of any number of tables, and each table can have as many as 1024 columns and almost any number of rows. For many years relational database technology has been the main way in which corporations have stored their data. 

There are some great ironies involved in the origin of relational database technology. The grand idea behind the technology was first conceived by E. F. Codd, who worked for IBM. Codd wrote a breakthrough paper spelling out how to make a relational database in 1970. IBM was slow to capitalize on this breakthrough, although it eventually did. While IBM was dragging its heels, people such as Larry Ellison (the founder of Oracle) realized that Codd's idea offered a vast opportunity for computer progress, particularly when combined with an easy-to-use language called SQL that would make it easy to query relational databases. Ellison ended up making countless billions from Codd's idea, although Codd apparently never even got rich from his breakthrough. A web page says, " Codd never became rich like the entrepreneurs like Larry Ellison, who exploited his ideas." 

The wonderful thing about relational database technology is that it is very easy to use, because of a technology called SQL that makes it easy to get information from the tables in relational databases. For decades relational databases and SQL have been the backbone of data storage for corporations. Typically a corporation may have a database with information such as this:

  • A table listing all of the vendors it deals with.
  • A table listing all of the customers who have ever bought anything from the company or paid any money to it for any service. 
  • A table listing all of the products or services the corporation has.
  • A table listing all of the employees of the corporation. 
  • A table listing every order any one ever made from the company.
  • A table listing the exact details of every part of every such order.
One of the many great things about relational databases is that with them it is very easy to create parent-child relationships in which some pieces of data are "owned" by other pieces of data. So, for example, you can create a table called Orders in which each row has one specific order a person made, with each order having a unique order date and order number. Then you can create another table called Order_Details, with one row for each item in the order. So if you checked out at an online site with a "shopping cart" consisting of five items, this might result in one new row in the Orders table, and five new rows in the Order_Details table. But these rows would be linked in a way that a parent-child relationship would be established, so that it is very easy to do SQL queries linking up the child rows with the "parent rows" that own them. 

Now what does such relational database technology (used for so long by corporations) have to do with systems such as Chat GPT? A great deal, I would imagine. To understand very much of the power of such systems, we simply should imagine some big company such as Alphabet, Inc. (the parent company of Google) or Microsoft setting forth on the very large multi-year project of creating a general knowledge relational database.  Such a database would have the grand goal of accumulating as much of human knowledge as possible in the form of one or more relational databases, so that such knowledge can be easily queried using technologies such as SQL. 

I can imagine the start of such a database. Instead of having tables with restricted names such as Employee or Customer,  the database might have a completely general table with a name such as Person. The table might have columns such as this:

Create Table Person
(
PersonID  Int,
Name Varchar(100),
Alias1 Varchar (100),
Alias2 Varchar (100),
BirthDate Date,
DeathDate Date,
BirthPlace Int,
DeathPlace Int.
LivingNow Boolean
)

There would be another table listing places, one with columns like this:

Create Table Place
(
PlaceID  Int
Name Varchar(100),
Alias1 Varchar (100),
Alias2 Varchar (100),
Longitude Int,
Latitude Int
)


Now the idea would be to try to fill up this Person table with very many millions or possibly even billions of rows. The idea would be to scan online web pages and records and online books and social media, trying to fill up one row in this table for as many living persons or dead persons as you possibly identify. This can be done through a slow gradual process of web crawling, that might take many days, weeks or months. There are many sources that can be scanned:

(1) The entire Internet can be scanned by companies such as Google that know how to scan almost every web page that exists. 
(2) Online encyclopedias such as wikipedia.org can be scanned. 
(3) Online repositories of books such as archive.org and Google Books can be scanned. 
(4) Social media sites such as Facebook, Twitter and Instagram can be scanned.  

We can imagine this Person table getting filled up with many hundreds of millions of rows, and possibly even billions of rows, each corresponding to a particular person either living or dead.  While such scans were made, every possible item related to such persons would be added. For example, we can imagine a table like this:

Create Table Person_Visitation
(
PersonID  Int,
PlaceID Int,
VisitStart Date,
VisitEnd Date,
Source Varchar(100)
)

Now every single time that the records or books or websites mentioned that a particular person was at some particular place on some particular day, a row would be added to this table. Rows would be added for every time period, not just the present. So there would be some particular row in this table recording that Julius Caesar was in Rome on March 15, 44 BC (the date Caesar was assassinated). Similarly, a particular table could be created to store records of any meetings ever recorded on social media. So if you put up a Tweet claiming that you went to the Taylor Swift concert in Miami on some particular day, a row would end up in this Person_Visitation row. 

There would be another table called Meeting:

Create Table Meeting
(
MeetingID  Int,
PlaceID Int,
MeetingStart Date,
MeetingEnd Date,
Source Varchar(100)
)

and a detail table called MeetingAttendees:

Create Table MeetingAttendees
(
MeetingID  Int,
PersonID Int
)

So now whenever the scanning system found a mention that two or more people met at some particular place, that meeting would be recorded, along with all of the attendees. For example, scanning through online historical records, rows would be added recording that George Washington was at the Battle of Yorktown, and that Lafayette, Alexander Hamilton and General Cornwallis were at the same battle. Whenever anyone claimed online that he met with someone at a particular date, a record of that would be added to the database. Using photo identification technology, it might be possible to even add a record of meetings purely from photos you posted online. 

Then there might be a table called PersonEvent which would have one row for any action that a person performed, or any action involving him. So, for example,  when a book or online source was scanned and a page said that Donald Trump got COVID-19, a row would be added to this PersonEvent table that might look like this:

Create Table PersonEvent
(
PersonID  Int,
PlaceID Int,
EventStart Date,
EventEnd  Date.
Description Varchar(256)
)

After a sufficient amount of scanning and web crawling and automated reading of online books, such tables could get filled up with vast amounts of information. But what about things more abstract? A big corporation could have workers fill up important tables that would represent general human knowledge. Somewhere in the general knowledge database would be stored information such as the fact that tables usually have four legs, and that an ice cream cone consists of one edible cone and one or more scoops of ice cream, and that doors have parts such as a handle and three hinges. The job of filling in a database with all this general abstract information would not be too hard for some company such as Microsoft with many thousands of employees. 

With such data stored in relational databases, it would be easy for a system that has access to such databases to give impressive answers to novel questions. A large fraction of questions could be answered through a method like this:

(1) Convert a user query to an SQL query that can get a suitable response from the database.
(2) Run the query on the database.
(3) Take the results from the query (a set of rows), and convert that into some conversational-sounding language. 

For example, suppose someone asks, "Please tell me all of the people Napoleon Bonaparte met after 1800, in reverse chronological order, listing the birth dates of all of these people."  Answering such a question would be a cinch once you have a general-purpose database like I have described.  Relational databases have built-in support for things such as sorting and filtering. With a SQL query of a relational database you can use a "WHERE" clause that can have any number of filter conditions. With a SQL query of a relational database you can use an "ORDER BY" clause that allows you to sort data very easily. Making the right use of what are called table joins, it is easy to get all kinds of answers from relational databases, involving how some set of data relates to another set of data.

A vast amount of additional "smarts" in such a database system could be added by creating a very massive "question and answer" database consisting of hundreds of millions or billions of rows. A web crawling and book crawling system could look for text passages in any of these forms:

  • A phrase or sentence ending with a question mark, followed by some lines of text. 
  • A header beginning with the words "How" or "Why" and followed by some lines of text (for example, a header of  "How the Allies Expelled the Nazis from France" followed by an explanation). 
  • A header not beginning with the words "How" or "Why" and not ending with a question mark, but followed by some lines that can be combined with the header to make a question and answer (for example, a header of "The Death of Abraham Lincoln," along with a description, which could be stored as a question "How did Abraham Lincoln die?" and an answer).
  • A header written in the form of a request or an imperative, and some lines following such a header (for example a header of "write a program that parses a test line and says 'you mentioned a fruit' whenever the person mentioned  a fruit" would be stored so that the header was converted to a question of "how do you write a program" and the solution stored as the answer. 

Crawling the entire Internet and vast online libraries of books such as www.archive.org and Google Books, the system could create a database of hundreds of millions or possibly even billions of questions and answers. In many cases the database would have multiple answers to the same question. But there could be some algorithm that would handle such diversity.  The system might give whichever type of answer was the most popular. Or it might choose one answer at random. Or it might give an answer giving multiple answers, adding text such as "Some people say..." or "It is generally believed" and "Some people say." Included in this question and answer database would be the answer to almost riddle ever posed. So suppose someone asked the system a tricky riddle such as "which timepiece has the most moving parts?" The system might instantly answer "an hourglass." This would not occur by the system doing anything like thinking. The system would simply be retrieving an answer to that question it had already stored. And when you asked the system to write a program in Python that lists all prime numbers between 20,000 and 30,000, the system might simply find a closest match stored in its vast database of questions and answers, and massage the answer by doing some search and replace. 

With such a system there would be a big "plagiarism problem." A large fraction of the answers would be plagiarized from materials protected by copyright. The system would presumably "cover its tracks" by refusing to provide the sources of its answers. There could also be various types of merging and search-and-replace that would make it hard to track down cases where the system was using plagiarism.  There are all kinds of programmatic ways that text can be massaged to make it harder to detect that plagiarized text was not an original composition. 
 
An approach like the one I sketched out here could result in a system capable of handling most questions asked of an artificial intelligence chatbot. What I have mentioned above would be done almost entirely by automated tasks that would be run before the "chatbot AI" was ever released as a finished product. But there could be also a great amount of query-processing power added by manual labor. 

The first step would be to get some list of the million most common questions that would be asked of a chatbot. That would be easy to do. You just recruit people to test your chatbot, offering it as an "early beta version."  You could probably recruit very many thousands of free workers, who would run queries against the chatbot, and enjoy the benefit of its free results.  As such workers ran their queries, all of their questions would be saved.   Soon you would have a table listing the million most common questions asked of a chatbot.  Then you could have paid workers review the questions and how well they were answered. Answers that seemed to be problematic and not very good would be flagged. 

You could then have your workers get to work creating better answers for the poorly handled questions. With a few thousand workers at your disposal, it would be fairly easy to fix a few hundred thousand questions that were answered poorly.  Suitable manually written answers would be stored in your database. 

From the limited information available online about systems such as ChatGPT, we know of another technique that was used. During a training phase, such a system would create multiple answers to user prompts, and users would rate the answers. We can imagine the developers of such a system collecting millions of "answer ratings" from unpaid "beta users," who might be required to rate each response they got in order to continue using the system. A large corporation might have also paid hundreds of workers to test the system by rating its answers, with all of these ratings being stored in the system's database, and being used to influence its subsequent answers. 

When it then happened that you finally released your "AI chatbot" product, there would be not many surprises. 99% of the time when a person logged in to use your chatbot, they would be asking some question that the system already had an answer for, stored in its database. Users would get the impression that your system was thinking, even though 99% of the time it was doing simply mindless retrieval of a stored answer. 

Somewhere in your system you would leverage "deep learning" databases that are different from relational databases. I'm not sure how they would be used. But by using such "deep learning" databases, your system would seem to have quite a bit of additional power. 

Below we see a sketch of how some big corporation could create the backbone of an "AI chatbot" system.

How to Do an AI Chatbot


My speculations above are mainly educated guesses, based on my personal experience with the kind of technology typically used to implement big impressive software projects. The actual technology used by today's so-called "AI chatbots" may be different. But my suspicions about what is "under-the-hood" of such systems is probably correct at least in rough form, particularly my suspicion that 90% of what is going on is simply data processing powered by data extracted from online sources. 

The databases involved would be so large that it might not be possible to store all the data in a  single room, even a very large one. But nowadays relational database vendors have technology that allows you to have a single database consisting of multiple server farms. Leveraging such technology, you could build some super-database as depicted above. The servers (the individual machines) that powered such a database and stored its data might be scattered across multiple office buildings. 

Building a system like this would require a major corporate investment. There's no way in which some little group of programmers (like the small staff that started Microsoft or Apple) could ever build a system like the new "AI chatbots."  But a corporation with thousands of employees and hundreds of millions of dollars of funding could build such a system, as a major corporate investment. 

The use of the term "artificial intelligence" to describe such systems is not at all appropriate. Such systems are simply very large projects that leverage computer programming and massive amounts of data processing and data storage. I suspect that there hasn't been any real breakthrough in "artificial intelligence" from an algorithmic standpoint. But what has gone on very steadily for the past 40 years is a vast accumulation of data online and written information online, very much of it either in question-and-answer format or a format easily converted into question-and-answer format. According to the 2016 page here, the number of web pages indexed by Google increased 900% between 2008 and 2014, reaching 30 trillion by 2014. We can presume the same growth has occurred since 2014.

All of that vastly increasing online information was a resource capable of being exploited by any major corporation determined to leverage it by producing some "AI chatbot" system that would sound super-knowledgeable. For decades, relational database technology has been an extremely flexible and powerful technology for storing and retrieving information. Relational database technology has mostly been used in a very limited fashion (such as when a company creates a database storing its products, orders, customers and employees).  There has always been a huge opportunity for creation of answer systems once some big corporation combined the huge amount of data online and the power of relational database technology. Such an exploitation is probably what powered the rise of search engines such as Google, and in ChatGPT we are mainly just seeing a different type of exploitation of the possibilities opened up when you have vast amounts of data online and ways of storing it  and retrieving it as efficiently as you can with relational database technologies. 

What is going on is almost entirely data processing and computer programming, with very little occurring that bears any resemblance to human thinking. But what about the ability of some "AI chatbot" to tell an appropriate story? Probably no "on-the-spot creativity" is occurring in such cases. I can imagine how you could get that to work. Scanning the internet, the system might find millions of stories, and create a million different "story templates." Actual names could be replaced with placeholders. So, for example, imagine the web crawler finds a story like this:

"Something interesting happened when my mom went to Chicago. She says that she got a nice hotel room downtown. But each night the lights would flicker several times. At first she thought that there might be some kind of ghost haunting the room. But when she told the hotel clerk about the problem, the clerk said, 'Don't worry, they were just doing some work on the electricity.' But on her last day when my mom left her room, a maid said, 'Oh, you were in Room 8C, did you see the lights flicker?' My mom said 'Yes.' The maid said, 'That only happens in Room 8C, probably because that's where a poor actor committed suicide, and we think the room is haunted.' "

Finding this story somewhere on the Internet, the web crawler used to make the "AI Chatbot" creates a story template, replacing specific names with placeholders like this:

"Something interesting happened when [PERSON X] went to [LOCATION Y]. She says that she got a nice hotel room downtown. But each night [SPOOKY OCCURRENCE]. At first she thought that there might be some kind of ghost haunting the room. But when she told the hotel clerk about the problem, the clerk said, 'Don't worry, they were just doing some work on the electricity.' But on her last day when [PERSON X]  left her room, a maid said, 'Oh, you were in Room [ROOM NUMBER], did you see [SPOOKY OCCURRENCE]?' My mom said 'Yes.' The maid said, 'That only happens in [ROOM NUMBER], probably because that's where a poor  [JOB HOLDER] committed suicide, and we think the room is haunted.' "

After finding this story by web crawling, the system would store this story template as one of a million story templates in its database, each of which would be categorized.  This story might be categorized as a ghost story. Then if you ask the system, "Tell me a ghost story about Taylor Swift," the system might randomly select any of its story templates that had been categorized as a ghost story. You might get the story above, but with the PERSON X in the text above replaced with "Taylor Swift," and the LOCATION Y replaced with a random American city. With a million categorized story templates in its database, created by web crawling and looking for stories to be made into story templates, it is very easy for the "AI chatbot" to create a story of the type you requested. No actual creativity is involved. It's just data retrieval with a little search-and-replace. 

A chatbot such as ChatGPT can also do summarization chores. You can ask it something like "Summarize the plot of the movie Casablanca so that a six-year-old can understand it." This would be easy for a system built along the lines I described. Among the datasets that the system would ingest are all of those listed on the page here. The datasets include 35 million Amazon reviews, 8.5 million Yelp reviews, 10,000 Rotten Tomato reviews, and so forth. While crawling the web and such datasets, the "AI chatbot" system would have found summaries of countless consumer products, books, TV shows, stories, songs and movies. The result might be a "Summaries" table with billions or hundreds of millions of rows. Answering a question such as the previous one would be a matter of simply retrieving one of those summaries,  and then running it through some post-processing "simplification" filter that would do a search-and-replace operation so that simple words were used. So, for example, such a filter might replace "Nazis" with "the bad guys." 

I must emphasize that whenever I refer to web crawling, I am talking about work done long before you typed in your "AI chatbot" prompt, to get the system ready so that it can respond very quickly to questions like the one you typed.  Any "AI chatbot" system would need to be based on some massive database produced by months or years of web crawling done before the system was announced as a finished product. 

There is a type of computer program called a utility program. A utility program is a piece of software that performs some very specific task, such as maybe simplifying a block of text or summarizing a block of text or counting all the verbs in a block of text or maybe making a block of text sound more professorial by replacing some of its simple words with fancy words. During the past forty years, computer programmers have created many, many thousands of different utility programs. There's almost a utility program for every task you might imagine. To help impress you, the "AI chatbots" such as ChatGPT have probably incorporated access to many thousands of different utility programs. When you type in some types of request, the "AI chatbot" probably just routes your request to one of countless utility programs it has at its disposal.  The only thinking that is involved is the thinking that occurred when some utility software programmer wrote his program in the past. 

Computer programmers and database experts have a thousand and one "tricks of the trade" that can be employed by some "AI chatbot" system.  When a system uses very many of those tricks and also has a gigantic database to use for retrievals, one produced by many days, months or years of web crawling, you might get the impression that you're dealing with a mind that's really smart. You're not. You're just dealing with data processing, computer programming and a giant mountain of data that has been placed in a database that makes the data very easy to retrieve. The operations that are going on are usually nothing very brilliant: things like rudimentary preprocessing, database retrieval, and simple post-processing. 99%  of the time nothing particularly brilliant is going on. Similarly, if you call up your dumb friend John, he might impress you as being very smart, if he answers your questions by doing Google searches and then reading the answers. 

When people say that something like ChatGPT means that we should worry about artificial intelligence taking over the world, they are making ridiculous errors. Systems such as ChatGPT are simply big complex examples of computer programming and data processing.  No real thinking or consciousness or insight or understanding is occurring. A system like ChatGPT is mainly an impressive bag of tricks and a well-organized mountain of data almost as big as the Internet. 

1 comment:

  1. AI is also used in game programs, such as chess. Interestingly, the oldest AI of which I am aware was a rudimentary chess-playing computer, using a very restricted board set-up. It was unbeatable. More interestingly yet, the computer had no software. Fantastically (because I ran out of variations on the word, interesting), the machine was made entirely out of electro-magnetic relays. Just as in your examples, no thinking was required by the AI. As soon as the human player pressed the buttons to make its move (from / to) the electric circuitry instantly connected in such a way as to make its responding move. For each from/to push of the buttons, there was only one possible response, because circuits were connected by on/off buttons. There could never be any variation to any combination of from/to. From A1 to B3 always connected to circuit XZ, which moved the computer's chess figures. Some modern chess software uses libraries of game positions such that, if the human makes a "fatal" mistake, the computer instantly identifies the response from the library of positions, and pounces, with no thinking involved.

    ReplyDelete