natural language processing (NLP), in computer science, the use of operations, systems, and technologies that allow computers to process and respond to written and spoken language in a way that mirrors human ability. To do this, natural language processing (NLP) models must use computational linguistics, statistics, machine learning, and deep-learning models.
Early NLP models were hand-coded and rule-based but did not account for exceptions and nuances in language. For example, sarcasm, idioms, and metaphors are nuances that humans learn through experience. In order for a machine to be successful at parsing language, it must first be programmed to differentiate such concepts. These early developments were followed by statistical NLP, which uses probability to assign the likelihood of certain meanings to different parts of text. Modern NLP systems use deep-learning models and techniques that help them “learn” as they process information. However, such systems cannot be said to “understand” what they are parsing; rather, they use complex programming and probability to generate humanlike responses.
Prominent examples of modern NLP are language models that use artificial intelligence (AI) and statistics to predict the final form of a sentence on the basis of existing portions. One popular language model was GPT-3, from the American AI research laboratory OpenAI, released in June 2020. Among the first large language models, GPT-3 could solve high-school level math problems and create computer programs. GPT-3 was the foundation of ChatGPT software, released in November 2022 by OpenAI. ChatGPT almost immediately disturbed academics, journalists, and others because of concerns that it was impossible to distinguish human writing from ChatGPT-generated writing.
Other examples of machines using NLP are voice-operated GPS systems, customer service chatbots, and language translation programs. In addition, businesses use NLP to enhance understanding of and service to consumers by auto-completing search queries and monitoring social media.
NLP presents certain challenges, especially as machine-learning algorithms and the like often express biases implicit in the content on which models are trained. For example, when asked to describe a doctor, NLP models may be more likely to respond with “He is a doctor” than with “She is a doctor,” demonstrating inherent gender bias. Bias in NLP can have real-world consequences. For instance, in 2015 Amazon’s NLP program for screening résumés to aid the selection of job candidates was found to discriminate against women, as women were underrepresented in the original training set collected from employees. Moreover, with probability-based NLP models, such as ChatGPT, “hallucinations” may occur, in which a model avoids communicating to the user that it does not know something by responding instead with probable but factually inaccurate text based on the user’s prompts.