Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Natural Language Understanding (NLU)

Natural language understanding (NLU) is the part of NLP that extracts meaning, intent, and entities from text, as in voice assistants and search.

Natural language understanding (NLU) is the part of natural language processing (NLP) that works out what a piece of text means: what the writer wants, which things they mention, and which reading is intended when the words allow several. An NLU system turns "Book a table for two at 7 tomorrow" into a structured request, an intent such as reserve_table with slots for party size, time, and date, that software can act on. Virtual assistants, customer service chatbots, and search engines run NLU on every request before they decide what to do or say.

Why Understanding Language Is Hard#

The same words can carry different meanings at every level. "Bank" can be a lender or a riverside; "I saw the man with the telescope" does not say who holds the telescope; and in "The trophy doesn't fit in the brown suitcase because it is too big," "it" refers to the trophy, but changing "big" to "small" makes it refer to the suitcase. Hector Levesque proposed such Winograd schemas in 2011 as a test of machine understanding, because resolving them takes knowledge about the world rather than word statistics. Early rule-based systems such as Terry Winograd's SHRDLU (1968-1970) understood typed commands only within a simulated world of blocks that their rules fully described.

Core NLU Tasks#

  • Intent classification: Assigns a request to one of an application's goals, such as checking a balance or blocking a card.
  • Named entity recognition (NER): Finds the people, places, products, dates, and amounts a request mentions, which assistants use to fill the slots of an intent.
  • Semantic parsing: Maps a sentence to a formal representation that a program can run, such as a database query or an API call.
  • Coreference resolution: Links pronouns and other references to the entities they point to.
  • Natural language inference: Decides whether one sentence entails, contradicts, or is neutral toward another.
  • Sentiment analysis: Identifies the opinion a text expresses.

Assistants usually classify intents with a fine-tuned transformer encoder. A sentence encoder can also classify intents one-shot, from a single example each, by choosing the intent whose example is closest in meaning to the request:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")

# One labeled example per intent, as an assistant's training data would provide
intents = {
    "check_balance": "What is my account balance?",
    "block_card": "Please freeze my debit card",
    "transfer_money": "Send money to another account",
}
utterances = ["my card was stolen", "how much cash do I have left", "pay Alex back 20 dollars"]

# Assign each utterance the intent whose example is closest in meaning
scores = model.similarity(model.encode(utterances), model.encode(list(intents.values())))
for text, row in zip(utterances, scores):
    best = int(row.argmax())
    print(f"{text!r} -> {list(intents)[best]} ({row[best]:.2f})")

All three requests get the right intent: block_card (0.42), check_balance (0.49), and transfer_money (0.28). "how much cash do I have left" and "pay Alex back 20 dollars" share no words with their intent examples, so the match comes from the embeddings rather than keywords. The transfer request wins with only 0.28 against 0.17 for the other intents, and frameworks such as Rasa send requests whose best score falls below a confidence threshold to a fallback that asks the user to rephrase.

Benchmarks and Models#

GLUE (2018) combined nine sentence and sentence-pair tasks, including sentiment, paraphrase detection, and natural language inference, into one score, and BERT raised it to 80.5 in 2018. Its harder successor SuperGLUE (2019) added Winograd-style coreference, and in January 2021 Microsoft's DeBERTa and Google's T5 + Meena both scored above its human baseline of 89.8. High scores can rest on shortcut learning: Suchin Gururangan and colleagues showed in 2018 that a classifier reading only the second sentence of each inference pair labeled about 67% of the SNLI dataset correctly, because cues such as negation words correlate with the "contradiction" label. Large language models (LLMs) now perform most NLU tasks from a prompt, and small encoder models remain common where latency and cost per request matter.

NLU in Search and Vision#

Semantic search applies NLU to queries, matching what a query means instead of its exact words, and vector search makes that fast over millions of items. The same idea works across modalities when text and images share an embedding space, as in CLIP. The Images tab of the Ultralytics Platform Explore page takes a scene description such as "cats on a sofa" and returns images from public datasets by what they show, without relying on filenames or tags.

  • NLP: The whole field of computing with human language. NLU interprets input, and natural language generation (NLG) writes output.
  • Speech recognition: Converts spoken audio into text, and NLU then interprets the transcript.
  • Optical character recognition (OCR): Extracts characters from images of text, which NLU can then read for meaning.
  • Question answering: Returns answers to natural-language questions, which requires NLU to interpret both the question and the text that answers it.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Turn drone and aerial imagery into real-time insights for agriculture, aquaculture, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Apply computer vision in aerospace with Ultralytics YOLO for aircraft inspection, runway FOD detection, airport ground operations, and composite defect detection.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning