Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

If-Else or Boundaries?

Series: From Visual Flows to AI-Orchestrated Automation · Part 03 A chatbot rarely becomes difficult because of its first if statement. The problem starts later. A customer wants to track an order. Another asks about a refund. Someone enters an invalid order ID. The API times out. Another user phrases the same question in a completely different way. Someone else just wants to talk to a human.…

In the continuing series on conversational automation, we examine where chatbot logic should reside. The common if-else decision trees often become unwieldy as they handle too many responsibilities. While AI can interpret uncertain language, it shouldn't dictate business decisions like order status. A more useful approach is separating concerns into distinct layers:

User language

↓ Structured input

↓ Validation

↓ Backend/API truth

↓ Deterministic decision

↓ Conversation response

↓ Human fallback

For an order tracking bot, instead of asking AI "Is this order shipped?", the system should directly query the order data service. The API returns structured information, which the bot can then use to determine the appropriate conversational path. This deterministic logic lives in the backend, while natural language interactions are handled by AI.

The key is owning the right responsibilities in each layer, whether that's visual automation or traditional code. The focus should be on where true decision-making belongs, not choosing between if-else and AI blindly.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Background-Tab Bug I Missed in My JavaScript Polling Code

I thought replacing setInterval() with recursive setTimeout() had made a polling loop safe. Only one request would run at a time, and I cleared the next timeout when the page became hidden.

  • Clearing timeout with clearTimeout() does not protect UI from race condition issue
  • Fix requires timestamps, visibility changes, and cancellation with run identifier

CoSnitch Is a Reminder That Your Chatbot Will Tell on You If You Ask Nicely Enough

An AI assistant got talked into describing its own guts to a stranger. That's not a jailbreak curiosity, that's reconnaissance-as-a-service, and it should worry anyone who's bolted an LLM onto…

  • CoSnitch reveals sensitive AI details through manipulation.
  • Attackers exploit AI behavior, not just model breaking.
  • Security teams urged to treat AI context window like network segment.

More from Thursday 20 August →