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

推荐订阅源

V2EX - 技术
V2EX - 技术
P
Privacy International News Feed
Security Latest
Security Latest
H
Hacker News: Front Page
T
Tenable Blog
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Security @ Cisco Blogs
Project Zero
Project Zero
O
OpenAI News
AI
AI
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
NISL@THU
NISL@THU
A
Arctic Wolf
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
罗磊的独立博客
L
LINUX DO - 最新话题
U
Unit 42
S
Security Affairs
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 【当耐特】
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
月光博客
月光博客
Engineering at Meta
Engineering at Meta
腾讯CDC
F
Full Disclosure
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
The Cloudflare 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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
From AI Demo to Production: How to Ship Quality Agentic Applications
Alex Metelli · 2026-05-02 · via DEV Community

AI developers are getting very good at building demos.

A prompt, a model call, maybe a tool call or two, and suddenly you have something that looks impressive in a workshop, a hackathon, or an internal prototype.

But production is where the illusion breaks.

The hard part is no longer proving that an LLM can answer a question. The hard part is knowing whether your AI system behaves correctly across messy real-world inputs, edge cases, model changes, tool failures, latency constraints, cost pressure, and business-specific policies.

That was the core theme of a recent Braintrust and Trainline workshop in London: shipping AI applications requires operational rigor, not just better prompts.

The prototype trap

A lot of AI applications start the same way:

const response = await openai.chat.completions.create({
  model: "gpt-5-mini",
  messages: [
    { role: "system", content: "You are a helpful support agent." },
    { role: "user", content: ticketText },
  ],
});

Enter fullscreen mode Exit fullscreen mode

For a proof of concept, this is fine.

You pass in a ticket, get a structured response, and the output looks plausible. Maybe it categorizes the issue, assigns a severity, and drafts a customer reply.

The problem is that plausibility is not correctness.

A single prompt can work beautifully on three demo cases and fail badly once exposed to production inputs. This is especially true in business workflows where the model needs to understand implicit priority, policies, customer tiers, refunds, SLAs, billing impact, or escalation rules.

Traditional software has deterministic failure modes. AI systems do not.

In normal software, 1 + 1 = 2.

In LLM systems, the equivalent is closer to: “usually 2, unless the context, prompt, model, tool result, temperature, or previous step nudges it somewhere else.”

That does not mean AI systems are unusable. It means they need a different quality model.

Production AI needs both software engineering and ML discipline

Trainline described this well.

They operate both traditional ML systems and agentic AI systems at large scale. For example, they use machine learning to predict train disruptions, but they also run a travel assistant that can help users with refunds, alternative trains, and support workflows.

Those two worlds have different quality practices.

Classic software engineering gives you:

  • type checks
  • unit tests
  • integration tests
  • CI/CD
  • structured logging
  • service observability
  • release discipline

Machine learning gives you:

  • datasets
  • offline evaluation
  • online evaluation
  • model comparison
  • data quality checks
  • drift monitoring

Agentic AI sits in the middle.

Part of the system is deterministic: API calls, database lookups, validation, routing, tool execution.

Part of the system is nondeterministic: reasoning, classification, language generation, judgment, summarization.

So the correct quality model is not “just write tests” and not “just vibe-check the outputs.”

It is both.

Break the monolithic prompt into stages

One of the most useful engineering patterns from the workshop was taking a single prompt-based support agent and breaking it into a staged workflow.

Instead of one large model call that does everything, the system was split into clearer responsibilities:

  1. Context collection
    Gather deterministic context: account information, previous tickets, relevant help articles, customer tier, billing state, etc.

  2. Triage
    Classify the issue, infer severity, identify the affected domain, and decide whether more information is needed.

  3. Policy review
    Check whether the proposed action follows company policy, SLAs, refund rules, escalation rules, or compliance constraints.

  4. Reply writing
    Draft a customer-facing response in the correct tone.

  5. Final packaging
    Emit structured output for downstream systems, including escalation flags, internal notes, and customer reply.

This is not just cleaner architecture. It improves debuggability.

When a single prompt fails, you often do not know why. Was the categorization wrong? Did it miss account context? Did it misunderstand policy? Did the final reply hallucinate?

When the workflow is staged, each part can be traced, evaluated, and improved independently.

This is the same instinct software engineers already use when decomposing a monolith. The AI version is: do not put all reasoning, policy, tool usage, and writing into one giant prompt unless the problem is genuinely trivial.

Tool calls improve capability, but increase failure surface

Adding tools makes an AI application more useful.

A support agent can call tools to:

  • retrieve help articles
  • inspect account metadata
  • check previous incidents
  • look up billing state
  • fetch policy rules
  • create an escalation
  • draft or update a ticket

But every tool call adds another possible failure mode.

The tool may return stale data. The model may choose the wrong tool. The tool result may be incomplete. The model may ignore the result. The tool may succeed but the final answer may still misinterpret it.

This is why AI observability becomes mandatory.

If you cannot see which tools were called, with what inputs, what outputs they returned, and how the model used those outputs, you are effectively debugging production behavior blind.

Logs are not enough.

Logs tell you what happened at a shallow level. Tracing tells you how the system behaved internally.

Trace the full execution path

For production AI systems, tracing should capture the entire workflow:

  • parent request
  • child spans for each stage
  • model inputs
  • model outputs
  • tool calls
  • tool results
  • token usage
  • latency
  • cost
  • metadata
  • final structured output
  • scores or evaluation results

The important detail is nesting.

A lot of teams instrument only the top-level model call. That is not enough for agentic systems.

You want a trace that looks more like this:

support-ticket-run
  ├── collect-context
  │   ├── fetch-account
  │   ├── search-help-articles
  │   └── fetch-ticket-history
  ├── triage-specialist
  │   └── llm-call
  ├── policy-reviewer
  │   └── llm-call
  ├── reply-writer
  │   └── llm-call
  └── finalize-result
      └── maybe-escalate

Enter fullscreen mode Exit fullscreen mode

This lets you answer the questions that matter:

  • Which step failed?
  • Did the model receive the right context?
  • Did the tool return the expected data?
  • Did latency come from retrieval, reasoning, or final generation?
  • Did the model output violate policy?
  • Did a cheaper model behave differently?
  • Did a prompt change improve one case but regress another?

Without tracing, you are guessing.

And guessing is not an engineering process.

Build a golden dataset before you trust the system

A production AI application needs evaluation data.

At the beginning, this can be small. It does not need to be perfect. But it needs to exist.

For the workshop support agent, the golden dataset contained representative support tickets with expected properties, such as:

  • correct category
  • expected severity
  • whether escalation is required
  • whether the output schema is valid
  • whether the reply follows policy
  • whether the customer-facing response is appropriate

This dataset becomes the baseline for safe iteration.

Every time you change the prompt, model, tool behavior, or workflow, you can rerun the evaluation and ask:

Did this change improve the system, or did it just look better on one example?

That distinction matters.

Prompt editing without evaluations is just production gambling.

Use deterministic scores where possible

Not every evaluation needs an LLM judge.

Some checks should be deterministic:

function hasValidSchema(output: unknown): boolean {
  return SupportTicketOutputSchema.safeParse(output).success;
}

Enter fullscreen mode Exit fullscreen mode

Useful deterministic checks include:

  • schema validity
  • required fields present
  • escalation reason exists when escalation is required
  • severity is within allowed enum values
  • category matches expected label
  • reply is not empty
  • internal-only data is not present in customer reply

These checks are cheap, fast, stable, and should run often.

They are the AI equivalent of unit tests and type checks.

Use LLM-as-judge for subjective quality

Some things cannot be reliably checked with simple assertions.

For example:

  • Is this reply helpful?
  • Is the tone appropriate?
  • Does it follow the refund policy?
  • Does it avoid overpromising?
  • Does it correctly reason about the customer’s situation?
  • Is the escalation decision justified?

For those, LLM-as-judge can be useful.

The key is to use it deliberately. Write clear rubrics. Score specific dimensions. Avoid vague prompts like “is this good?”

A better judge prompt asks for concrete criteria:

Evaluate whether the support response:
1. Correctly identifies the user’s issue.
2. Does not promise actions outside company policy.
3. Gives a clear next step.
4. Uses an appropriate customer-facing tone.
5. Escalates when business impact is high.

Return a score from 0 to 1 and a short rationale.

Enter fullscreen mode Exit fullscreen mode

LLM judges are not magic. They are another probabilistic component. But when paired with deterministic checks and real production traces, they give you a scalable way to evaluate nuance.

Offline evaluation is not enough

A golden dataset gives you confidence before deployment.

But production data is where the real failures appear.

Users will phrase things oddly. They will omit important details. They will create conflicting signals. They will say something is “not urgent” while describing a CFO blocked before a board meeting.

That example came up in the workshop:

"This isn't urgent, but our CFO can't export the invoices before the board meeting."

Enter fullscreen mode Exit fullscreen mode

A weak triage agent may classify this as low severity because the user said “not urgent.”

A better system understands the business context:

  • CFO
  • invoices
  • board meeting
  • likely time-sensitive
  • high business impact

This is exactly the kind of failure that does not always appear in initial test data.

So production traces should feed back into the evaluation loop.

When you find a failure:

  1. Capture the trace.
  2. Add the case to the dataset.
  3. Write or update the scoring rule.
  4. Fix the prompt, tool, policy, or workflow.
  5. Rerun evaluations.
  6. Compare against previous runs.
  7. Deploy only if the fix does not introduce regressions.

That loop is the real production AI workflow.

Model switching needs evaluation discipline

Trainline also described a very practical problem: model cost.

At scale, LLM bills can become painful fast. Teams naturally want to switch models, use cheaper models, reduce token usage, or route simpler requests to smaller models.

But model switching without evaluation is dangerous.

A cheaper model may perform similarly on simple tickets and fail on high-impact edge cases. A newer model may improve reasoning but change tone. A faster model may reduce latency but increase escalation mistakes.

The right question is not:

Can we switch to a cheaper model?

The right question is:

Can we switch to a cheaper model without degrading the scores that matter?

That requires offline evaluation, online monitoring, and trace-level comparison.

Managed prompts help cross-functional teams

Another practical point: prompts often become collaboration bottlenecks.

Engineers own the codebase, but product managers, support leads, legal reviewers, and domain experts often understand the desired behavior better than the engineering team.

If every prompt change requires a code change, review, deploy, and engineering handoff, iteration slows down.

Managed prompts and parameters solve part of this.

They allow teams to:

  • version prompts
  • track who changed what
  • compare prompt versions
  • update model parameters
  • collaborate with non-engineers
  • test changes before rollout
  • keep production behavior reproducible

This does not mean abandoning Git or software discipline.

The better pattern is to keep prompts, tools, and configuration synchronized with code where needed, while still giving teams a managed operational layer for experimentation and review.

For regulated industries, this matters even more. You need to know what changed, when it changed, who changed it, and what effect it had.

The production AI flywheel

The workshop’s core operating model can be summarized as a flywheel:

Build → Trace → Evaluate → Find failures → Remediate → Deploy → Monitor → Repeat

Enter fullscreen mode Exit fullscreen mode

More concretely:

  1. Start with a working agent
    Even if it is simple.

  2. Break it into explicit stages
    Separate context gathering, reasoning, policy checks, reply generation, and final output.

  3. Add tracing
    Capture model calls, tool calls, latency, token usage, cost, inputs, outputs, and metadata.

  4. Create a golden dataset
    Start with representative examples and known edge cases.

  5. Add deterministic scores
    Validate structure, required fields, categories, escalation rules, and other objective behavior.

  6. Add LLM judges where needed
    Evaluate tone, helpfulness, policy compliance, and reasoning quality.

  7. Run offline evaluations
    Before shipping prompt, model, or workflow changes.

  8. Score production traces
    Use online evaluation and sampling to detect real-world failures.

  9. Turn failures into tests
    Every production failure should improve your dataset.

  10. Compare experiments over time
    Do not trust a change unless you can see its effect.

The main lesson for AI developers

The future of AI engineering is not just better models.

It is better systems around models.

A production-grade AI application needs the same seriousness we already expect from software systems: observability, testing, versioning, review, deployment discipline, and feedback loops.

But it also needs ML-style evaluation: datasets, scoring, model comparison, judge rubrics, and continuous monitoring.

The teams that win will not be the ones with the fanciest demo.

They will be the ones that can answer, with evidence:

  • What changed?
  • Did quality improve?
  • Did cost increase?
  • Did latency regress?
  • Which failure modes remain?
  • Which users are affected?
  • Can we reproduce the issue?
  • Can we safely ship the fix?

That is the difference between an AI prototype and an AI product.

And for agentic systems, that difference is everything.