Urgent.News

What's breaking now, across thousands of outlets.

AI

Finding the Bugs I Built an AI Agent to Prevent: Building Deterministic Guardrails with LangGraph & Python

`` A real debugging log: fabrication bugs, deployment gaps, and false test passes found and closed across 6 rounds of adversarial testing. System prompts are a leash, not a lobotomy. A system prompt can be ignored, misread, or drift under pressure. Deterministic code cannot. When I built Ahmad-AI — a local AI agent using LangGraph, Python, and Ollama with access to live SQL databases and Islamic…

Detecting and preventing bugs built by an AI agent required creating deterministic guardrails, according to engineer Muhammad Ahmad. During six rounds of adversarial testing, multiple critical bugs emerged in the local AI agent, Ahmad-AI. The Ghost Row Bug appeared when querying a table with no matching rows, causing the agent to invent fake item IDs and stock levels.

The Regex Mismatch bug occurred when the agent cited the Quran verse 5:51, despite the system prompt expecting a different format. To address these issues, Ahmad implemented a deterministic backstop in Python that overrides the model's prose if certain failure patterns are detected. This approach allowed for a whitelist of pre-verified citations and prevented the agent from stating specific data claims without verification.

The engineer also emphasized the importance of code over additional instructions, an evaluation harness to ensure automation doesn't hide regressions, and distinguishing between transient and permanent errors.

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 AI

Catalog Craft AI: Zero-Token-Cost Product Listing & SEO Engine for Seller

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built CatalogCraft AI is a local-first, AI-powered product listing and cataloging engine designed for…

  • CatalogCraft AI is AI-powered product listing engine
  • Zero-token-cost operation eliminates API fees
  • Supports Amazon, Etsy, Shopify, Meesho, English, Hindi

Building a Local Receipt Extractor with Open-Source AI (Side Hustle)

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle. What I Built I built a Local Receipt & Invoice Extractor.

  • Local Receipt & Invoice Extractor tool designed for freelancers and small businesses
  • Privacy-focused, no cloud servers or API costs involved
  • Open innovation with Ollama running Llama 3 locally for offline data processing

Spot-Undoo: Privacy-First AI Kerala Micro-Travel Planner & Layover Explorer

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 2 - Side Hustle . 🌟 What I Built Spot-Undoo is an open-source, local-first micro-travel planner and hidden gem discovery…

  • Open-source micro-travel planner Spot-Undoo helps Kerala explorers
  • App addresses overcrowded spots and transit anxiety with AI
  • Monetizes via B2B SaaS, marketplace, and food/craft vendor partnerships

ResumeForge: A Privacy-First AI Resume Analyzer Built with Local Open-Weight Models

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built Every time someone applies for a job today, they are handed the same advice: "Tailor your resume to…

  • ResumeForge analyzes and tailors resumes locally on personal computers.
  • Provides fit score 0-100 with justification and ATS keyword suggestions.
  • Open-source project for privacy-conscious job seekers and recruiters.

More from Saturday 17 October →