How Artificial Intelligence Understands Human Language

How AI understands human language through a natural conversation with a laptop-based AI assistant.

Introduction

How AI understands human language becomes clearer when you examine what happens after you ask an AI assistant a question.You use your own words, you throw in the slang and the shortcuts, and the AI puts together a response as if it got what you were going for. But really, there is no mind reading and no human-like comprehension. What you are seeing is math, patterns, and numbers, which the machine is processing at very high speed. In that process, what goes on is you say something messy and it turns that into something useful. Also in that is the fact that we know how they do that, which in turn helps you to use AI tools better, to see what their limits are, and also to see why getting machines to understand language is still the greatest challenge in computer science.

This article traces the path a sentence takes in an AI system. We begin with the breaking up of text into small elements, then into the field of natural language processing, and we see the methods which are used to determine meaning, relationships, and intent. Also, we look at language models and at conversation context, which is to say how a virtual assistant may respond to the same question put in different words, and we look at which causes of ambiguity which lead to incorrect answers. By the end, we will have a picture which is clear of how computers process human language and why this is still very much an open research problem.

Tokenization: Breaking Up Text Into Parts

The first action in the language process is tokenization. Before an AI system looks at a sentence, it breaks the text into smaller elements called tokens. A token may be a full word, a part of a word, a punctuation mark, or a single character, based on the design. The phrase “Unbelievable results!” may break out into pieces like “Un,” “believe,” “able,” “results,” and “!” This allows the system to use familiar elements for which it has no standard treatment for very rare or new words which it may not have encountered before. Tokenization is more of a preparation stage which math and algorithms can then work with, rather than a stage of actual reading.

Once the text is broken out into components, we transform each token into a number, as computers do not process letters in their native form. This conversion is an early stage in how AI understands human language, because later processing depends on this numerical representation. We have what is in effect a large dictionary which the system uses to map out every known token to a unique identifier, and your question is turned into a sequence of these IDs, which only then does the system begin more in-depth analysis. This step is of greater importance than many people think. Poor tokenization may break up words in non-productive ways or may not do as good a job with certain languages. Thus, in the design of models which perform this task of tokenization, great care is taken, for all that comes after that initial break up of the text into elements depends on the quality of this first step out of which the entire analysis will be built.

Natural Language Processing: The Base

Natural language processing, also known as NLP, is that branch of artificial intelligence which gets computers to work with human language in both written and spoken forms. It includes elements of linguistics, statistics, and machine learning. Early systems were based on hand-designed rules out of dictionaries and grammar templates that experts built. These were good for narrow tasks, however did not perform well in the face of unpredictable or complex language. In time, research moved towards a model based on learning from large sets of data, which in turn allowed algorithms to identify patterns in words and phrases, rather than be given set instructions. That move made what was done by translation, spam filtering, search, and voice assistants to become much more accurate and practical than it was before.

NLP is a field which covers a variety of tasks that build upon each other. Some are structural, like identifying parts of speech, determining sentence boundaries, or recognizing people and places. Others focus on the semantic aspect of a text, which includes determining the emotion of a review, to summing up a large document, or to answer factual questions. Also, we have the issue of spoken input, which is a first step in the process, which includes converting sound to text, dealing with issues of accent, background noise, and similar-sounding words like “write” and “right.” Many of these separate skills are what we see put into a single large model now, but the basic principles which we are trying to achieve with them are the same.

Semantic Analysis: Identifying Purpose

A customer-service worker using a chatbot to interpret an order-tracking question and return relevant information.

Semantic analysis is out to determine what a text means, which goes beyond its structure. We use word embedding, which is a key technique in this process; each term is represented by a set of numbers in a math space. Words that are used in the same context tend to be near each other. “Doctor” and “physician” are near each other, while “doctor” and “volcano” are very far apart. The system figures out the position of the words out of which large-scale text it sees which words appear in the same environment, and thus proximity in the space is an approximate measure of the meaning. It is not human-like, but it does allow related ideas to be treated as such.

In the case of more than just single words, semantic analysis looks at the relationships between words within a sentence. In the sentence “The dog chased the cat,” the system has to determine which is doing the action, as changing the nouns will change the meaning. Attention structures play a role in that they determine the degree to which each element in a sequence is related to every other element also in the sequence, which is also how a model notes that a pronoun like “it” is in reference to a certain noun. Intent detection takes it a step further in that it determines what the user is trying to achieve. “Book me a table for two tonight” and “Is there any room at that restaurant this evening?” may use different words but have the same goal, and present-day systems are trained to associate many different phrasings with the same intent.

How Language Models Work

Given the first part of a sentence, predict what comes next. In playing this out across very large sets of books, articles, and websites, the model over time picks up grammar, facts, writing styles, and patterns of reason. We don’t program in these skills; they grow out of which predictions turn out most accurate. For instance, to complete “The capital of France is,” the model had to have put together at some point the right fact. It just so happens these which are best able to actually build a full coherent picture also tend to be the correct ones.

Today, we see that what we term the transformer architecture is used in large language models, which via attention determine what early tokens are most relevant as they process each new one. This allows the model to look at large passages at once instead of strictly word by word. When you put in a question, the model does not pull up a stored answer. Instead, it generates a response one token at a time, with each choice based on your input and what has been produced thus far. This also explains the fluency of today’s assistants, which, although they may produce what sounds like a good answer, are not guaranteed to be correct.

Keeping Track of the Conversation

Real conversations play out in a very different way from that which may be put forward in a Q&A session. We see people bring up earlier points in the conversation, and we see the use of pronouns, which in turn is an indicator that the audience is to follow the same train of thought. In this, we have the assistant include in each new response what has gone before. If you ask “Who wrote Things Fall Apart?” which is followed by “When was it published?” the model will read these as a whole and understand that “it” is the book. This, which we can look at as the conversation context or the context window, is also a feature which is present but which also has a limitation, in that it determines how large a piece of conversation the system is able to take into account at any one time.

Context also forms the tone, and we see how it plays out in conversation. If a user has been into chat about cooking for a while, the word “stock” is used to mean broth; in a talk about investing, it means shares. Also, the assistant doesn’t have a memory like a person does; it may drop details in very long conversations or when instructions conflict. At the same time though, it does use what has been said before as evidence, which turns a question-answering machine into more of a dialogue partner, and that is a large element which makes modern assistants natural to use.

A Practical Example: Different Spin, Same Story

Imagine a scenario where three users are looking for the same thing but are going about it in different ways. One asks, “How do I reset my password?” Another puts forth, “I am locked out of my account and can’t recall my login.” A third puts forward, “What is the process for reaccessing my profile?” These sentences don’t really share key words, yet a good assistant would see them as the same request. We break each message into units with tokenization, which in turn uses embeddings to put “reset,” “locked out,” and “reaccessing” near to each other in the semantic space, and the model thus identifies the core issue of account recovery. It then puts out the same helpful responses for all three.

This in turn is due to the fact that the system compares meaning instead of which exactly matches strings. In a traditional keyword search, the second and third messages would have failed for the simple reason that neither contains the word “password.” A language-aware assistant, on the other hand, notes related concepts like “login,” “account,” and “locked out,” and also puts in play patterns it has learned from large sets of support conversations. The result is that which is presented is very much what the person needs, not just what they put in. This flexibility is also the best display of how far language technology has come from basic word matching.

Why Ambiguity Causes Incorrect Responses

Ambiguity is what causes language breakdown the most. Take, for example, the request, “Can you tell me about the bat?” This could mean the flying mammal, a cricket or baseball tool, or something from an earlier part of the chat. Also, the assistant has to guess which the user means, and a wrong guess will produce an answer that is smooth but off-topic. Also, “I saw the man with the telescope” may mean which man had the telescope or which man was doing the seeing with it. We resolve such issues in person through shared experience and common sense, which a model can only approximate via text-based patterns.

Other errors which may occur are of the nature of sarcasm, idiomatic language, cultural references, missing information, and issues based on false premises. A model may present as fact a joke which was meant symbolically, may not understand a regional idiom, or may put out an answer which is, from a statistical point of view, very likely but which is still incorrect because the input is faulty. As the system is trained to produce what is most likely to come next in a sequence rather than checked for proven fact, it may present a wrong interpretation as if it were right. These examples reveal a limitation in how AI understands human language: context can be missed, leading to confident but incorrect answers. Users can decrease these issues by including more context, clearly stating what they are looking for, and checking important results themselves. Also, developers are working on which assistants will ask for clarification instead of trying to guess.

Key Research Area into Language Understanding

Although we see progress in today’s assistant technologies, they still do not achieve true comprehension. They break out in contradictions, make up facts, have issues with long chains of reasoning, and also do vary in performance across languages, which have less training data available online and do not get as much support from AI tools. In those languages which we have less coverage of and which also do less well, we see an active priority for improvement in terms of fairness and coverage. Also, in the research space, we see a great interest in model transparency, which in turn will help people to see how a system is coming up with a certain answer instead of having to accept black-box results which must simply be trusted.

The issue is of great importance. In terms of language improvement, we see better medical record analysis, greater access to education, support for people with disabilities, and help for organizations which are working with large document sets. At the same time, we see that in very sensitive issues, errors may produce real damage, which in turn makes it that reliability and truthfulness are very important. We are seeing that which puts us in a better position to base responses in verified sources, out of which bias from the training data is reduced; also, we see that we are teaching systems to recognize the limits of their knowledge. Each step of this improvement brings us a little closer to machines handling human language in a responsible and useful way.

Conclusion

A person checking an AI-generated answer against reference notes to verify its accuracy.

AI doesn’t have a human’s natural language understanding but has still developed which may be considered very effective means at which to work with it. We break down text into parts (tokens), turn those into numbers, study what the meaning is and the different relations between elements, and then we have language models that put together appropriate responses, also at the same time they follow along in the course of a conversation. Also, through this process, the assistant is able to see that which may be differently worded questions are in fact what you are looking for and will give a useful reply without the user giving out exact commands or using a rigid structure in what they ask.

At present, what we see is that which is not yet refined out of the issues of ambiguity and insufficient context, and also the large gap between what is probably true and what is indeed correct, that the tech is still in its early stages. By familiarizing yourself with the process, you in turn are able to put together better prompts, to approach responses with a critical eye, and to also note the achievement in each which does go through to success. As we continue to research this field, we see the human and machine dynamic closing, which is to say the difference between how we as humans express ourselves and how machines interpret that is reducing; this is to put forward one of the most important and at the same time very interesting areas of work in artificial intelligence.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
0
Would love your thoughts, please comment.x
()
x