惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
G
Google Developers Blog
Vercel News
Vercel News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Unlocking Efficient Named Entity Recognition with Oxlo.ai
shashank ms · 2026-06-17 · via DEV Community

shashank ms

Named Entity Recognition (NER) remains one of the most common production workloads in natural language processing. Whether you are extracting patient identifiers from clinical notes, tracking company mentions in financial filings, or tagging locations in legal contracts, the underlying challenge is the same: identify and classify atomic spans of text with high precision and recall. Traditional approaches rely on fine-tuned transformer models or brittle rule engines, but the rise of large language models has shifted the paradigm toward zero-shot and few-shot extraction. The catch is cost. When you pay by the token, processing long documents or running high-frequency agentic pipelines becomes expensive quickly. Oxlo.ai removes that constraint with request-based pricing, making LLM-driven NER economically viable for documents of any length.

Why LLMs for NER?

Fine-tuned BERT variants are fast, but they are also rigid. Adding a new entity type means re-labeling data and retraining. LLMs accept a schema at inference time. You can pivot from extracting PERSON and ORG to extracting PRODUCT_SKU and MANUFACTURING_DATE by updating a prompt, with no redeployment. They also handle nested and discontinuous entities better than token-classification models, and they can infer implicit relationships between mentions.

The trade-off has always been inference cost and latency, especially when you need to process entire pages or documents rather than short sentences. That trade-off disappears when your provider charges a flat rate per request.

The most reliable way to run NER with an LLM is to enforce a structured output. Oxlo.ai supports JSON mode and function calling across its chat models, so you can constrain the response to a schema and parse it deterministically. Below is a minimal Python example using the OpenAI SDK, pointed at Oxlo.ai.

import openai
import json

client = openai.OpenAI(
    base_url="https://api.oxlo.ai/v1",
    api_key="YOUR_API_KEY"
)

schema = {
    "type": "object",
    "properties": {
        "entities": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "text": {"type": "string"},
                    "label": {"type": "string", "enum": ["PERSON", "ORG", "GPE", "DATE", "MONEY"]},
                    "start": {"type": "integer"},
                    "end": {"type": "integer"}
                },
                "required": ["text", "label", "start", "end"]
            }
        }
    },
    "required": ["entities"]
}

text = "Apple Inc. is planning to open a new office in Austin by March 2026, investing over $1 billion."

response = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[
        {"role": "system", "content": "You are a precise NER engine. Extract all named entities from the user text and return valid JSON matching the provided schema. Do not add extra commentary."},
        {"role": "user", "content": f"Extract entities from the following text:\n\n{text}"}
    ],
    response_format={"type": "json_object"},
    temperature=0.1
)

result = json.loads(response.choices[0].message.content)
print(json.dumps(result, indent=2))

This pattern works with any