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

推荐订阅源

有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
V
V2EX
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
月光博客
月光博客
云风的 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
Why is Your Chatbot Saving "Good Morning" as the Customer...
Ricardo Carneiro · 2026-05-26 · via DEV Community

The classic struggle of chatbot data extraction, why your complex regex is failing, and how to fix it in 30 seconds using semantic NLU.
tags: webdev, ai, chatbots, javascript


We've all been there. You spend days building a sleek WhatsApp chatbot or a customer service agent. You write what you think is the perfect prompt or input validation.

Then, your bot asks:

"Hi! What is your full name?"

And the user replies:

"Good morning! I'm John Doe."

Your traditional validation or naive regex captures the input, and boom—your CRM database now has a new client officially named "Good morning!" or "Good morning! I'm John Doe."

Even worse, you ask for a Brazilian postal code (CEP) and the user types: "It is 01310-100". Your strict regex fails because it's not strictly digits, or your lazy regex fails to extract it.

Traditional chatbot validation is broken. Relying on complex regex patterns is a maintenance nightmare, and raw LLM prompts are slow, expensive, and prone to hallucinations.


Enter NaLU AI: Semantic NLU Validation in 30 Seconds

I got tired of these universal chatbot struggles, so I built NaLU AI. It’s a lightweight API and MCP Server designed specifically to clean, structure, and validate conversational data in real-time.

NaLU combines a fast deterministic layer with semantic LLM validation in multiple languages (English, Portuguese, Spanish). Instead of processing raw strings, it understands context.

Let's see it in action.


The Code 🛠️

Here is how you can easily validate and extract a clean full name from a conversation using a simple JavaScript fetch (or standard cURL):

const response = await fetch('https://api.naluai.dev/v1/extract/name', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    agent_input: 'Good morning! Whats your name?',
    user_input: 'Good morning!',
    language: 'pt-BR'
  })
});

const result = await response.json();
console.log(result);

The JSON Response:



{
  "obtained": false,
  "extracted_value": "",
  "confidence": "high",
  "certain": false,
  "reasoning": false,
  "suggestion_to_agent": "Good morning again! Could you please tell me your name?",
  "validator_used": "validate_name",
  "engine": "llm"
}

Notice that:

It automatically filtered out the greeting ("Good morning isn´t a valid name").
It suggest a "try-again-message".

13 Built-in Semantic Validators
NaLU AI comes with 13 ready-to-use validators:

validate_name (extracts clean proper names, ignores titles and greetings)
validate_cpf / validate_cnpj (validates Brazilian documents using mod 11 check)
validate_cep (extracts postal codes and returns enriched address data)
validate_handoff (detects if the user wants to speak to a human, measuring urgency from 1 to 3)
validate_reply (analyzes conversational context like counter-proposals or indirect answers)
Built for n8n, Make, Cursor & Claude Code
Since it is a standard REST API, it integrates out of the box with no-code tools like n8n and Make.

Even cooler, it exposes itself as an MCP Server, allowing you to add it directly to Cursor or Claude Code to perform semantic tasks locally!

Give it a try! 🚀
NaLU AI is free to start. The free tier gives you 3,000 free credits per month (no credit card required), and paid plans start at less than a fraction of a cent per validation (R0,0058/ 0.001 USD).

Stop losing clients to bad chatbot regex. Clean your database and make your agents truly smart in 30 seconds.

👉 Test it out in the playground: naluai.dev

Let me know in the comments how you are currently handling user data extraction in your chatbot webhooks!