Close

AI Basics - Entity Extraction

[Last Updated: Jan 11, 2026]

If Intent Classification is about identifying the verb (what the user wants to do), Entity Extraction is about identifying the noun (the specific data needed to do it). In the world of programming, if an Intent is a method/function call, Entities are the arguments passed into that method/function.

What is Entity Extraction?

Entity Extraction (also known as Named Entity Recognition or NER) is the process of pulling structured data out of unstructured sentences. Instead of writing complex string-parsing logic, you use the AI to identify specific pieces of information like dates, names, product IDs, or quantities.

The Relationship: Intent vs. Entity

To build a working application, you usually need both. The Intent tells your code which path to take, and the Entities provide the variables required to complete the task. Without entities, your "Order App" would know the user wants to cancel something, but it wouldn't know which order to cancel.

Handling Variations in Data

Just like with Intents, AI is powerful because it understands context. It can extract entities even when they aren't formatted perfectly:

  • Relative Dates: It can turn "next Friday" or "yesterday" into actual calendar dates like 2026-01-16.
  • Synonyms: It can recognize that "the pepperoni pie" and "Item #402" refer to the same product_name.
  • Partial Information: It can identify that "the last order" refers to a specific order_history_reference.

Conceptual Example: The Order App

Let's reuse our Order App example. When a user sends a message, the AI performs Intent Classification first, and then performs Entity Extraction to fill in the details.

Example 1: Specific ID Search

User Input: "Check the status of order 5521."

Intent: CHECK_ORDER

Extracted Entities: order_id: 5521

Developer Result: Your backend executes fetchStatus(5521).

Example 2: Contextual Cancellation

User Input: "I want to cancel the sushi I ordered 10 minutes ago."

Intent: CANCEL_ORDER

Extracted Entities: item: "sushi", time_ref: "-10m"

Developer Result: Your backend uses the time reference to find the correct transaction and executes cancelItem("sushi").

Example 3: Complex Refund

User Input: "Can I get a refund for the cold pizza from last night?"

Intent: REFUND_REQUEST

Extracted Entities: reason: "cold", item: "pizza", date: "2026-01-10"

Developer Result: Your system passes the reason and date into your processRefund() function for automated approval.

Why This Matters for Developers

Before AI, developers used "Regular Expressions" (Regex) to find patterns like Order IDs. However, Regex fails if the user says "the order ending in 55."

With AI Entity Extraction, you can instruct the model to return a structured format—like a JSON object—directly to your Java or Python backend. This allows you to skip the "parsing" step and go straight to the "execution" step of your software.

See Also

Join