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

推荐订阅源

The GitHub Blog
The GitHub Blog
I
InfoQ
U
Unit 42
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
月光博客
月光博客
D
Docker
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
博客园 - 聂微东
A
About on SuperTechFans
腾讯CDC
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
博客园 - 【当耐特】
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence

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