tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Generative AI > Google Gemini API > Gemini API Named Entity Recognition

Gemini API Named Entity Recognition

Author: Venkata Sudhakar

Named Entity Recognition (NER) extracts structured information from unstructured text. The Gemini API handles NER without any fine-tuning or specialised models - you simply describe the entities you want and it returns them in structured format. This makes it ideal for processing customer feedback, emails, contracts, and support tickets at scale.

ShopMax India processes thousands of customer support emails daily. Each email mentions product names, order IDs, store locations, and dates. Manually tagging these entities for routing and analytics is impractical. The Gemini API extracts all entities in a single call with context-aware accuracy.

The below example shows how to extract standard and custom entities from customer support text using Gemini with structured output.


It gives the following output,

persons: ['Priya Sharma', 'Rajesh']
organisations: ['Samsung']
locations: ['Pune', 'Koregaon Park store']
dates: ['15th March', '20th March']
order_ids: ['ORD-2847361', 'TKT-98234']
products: ['Samsung Galaxy S24 Ultra']
amounts: ['Rs 124,999']

The below example shows how to process a batch of emails and route them based on extracted entities.


It gives the following output,

Customer: Priya Sharma
Queue: order_disputes
Location: Pune
Products: ['Samsung Galaxy S24 Ultra']

This approach eliminates the need for regex patterns or domain-specific NER models. The Gemini API understands context - it correctly identifies that ORD-2847361 is an order ID and TKT-98234 is a ticket ID without any explicit training, making it highly adaptable for the varied text formats that ShopMax India receives across its customer channels.


 
  


  
bl  br