<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan" -->

---
title: 7 Decisions Web Developers Should Make Before Adding AI...
description: A practical framework for web developers integrating AI features into production applications, organized around seven architectural decisions: deciding whether...
canonical: https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 7 Decisions Web Developers Should Make Before Adding AI to a Production App | daily.dev
og:description: A practical framework for web developers integrating AI features into production applications, organized around seven architectural decisions: deciding whether...
og:url: https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan
og:image: https://api.daily.dev/og/posts/8vGPsPnan.png
og:image:alt: 7 Decisions Web Developers Should Make Before Adding AI to a Production App
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 7 Decisions Web Developers Should Make Before Adding AI to a Production App

**[SitePoint](https://daily.dev/sources/sitepoint)** · 14 min read · 0 upvotes · 0 comments

## Summary

A practical framework for web developers integrating AI features into production applications, organized around seven architectural decisions: deciding whether AI is even the right abstraction, defining a model's contract before choosing a model, treating model output as untrusted input requiring validation, building evaluation datasets before endless prompt tweaking, designing for model failure with timeouts/retries/fallbacks/kill switches, limiting agent tool permissions to reduce blast radius, and monitoring quality metrics (not just uptime) post-deployment. It also distinguishes three separate problems teams conflate—engineering capacity, evaluation/reliability, and inference tooling—mentioning Wing (specialist hiring), Promptfoo (evaluation), and Ollama (local inference) as examples for each. Closes with a pre-production checklist covering product, architecture, testing, reliability, security, operations, and team ownership.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sitepoint.com/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app>

## Questions this post answers

### How should I validate LLM output before using it in my application logic?

Treat model output the same way you treat untrusted user input: parse it, run schema validation, then apply business validation before taking any action. For example, if a JSON schema only allows priority values of low, medium, or high, a model-invented value like 'urgent' should be rejected rather than silently accepted, since the model is an external system, not a trusted function in the codebase.

_Developers hardening AI features against unpredictable model output can find similar architecture breakdowns on daily.dev._

### What should I use to evaluate and test LLM prompts systematically instead of eyeballing outputs?

Promptfoo is an open-source tool built for testing and evaluating LLM applications, letting teams compare prompts and models, create automated assertions, run evaluation suites, and perform AI red-team testing. It turns subjective judgments like 'this prompt seems better' into measurable results, such as a version passing 94% of evaluation cases while introducing two regressions.

_Teams choosing between prompt evaluation tools track comparisons like this one on daily.dev._

### How much tool access should an AI agent be given when performing actions like checking orders or updating records?

Give agents the smallest possible permission scope, such as a narrow 'get order status for an authorized customer' tool rather than a generic 'execute arbitrary database query' capability, since a chatbot that only generates text can produce a bad answer but an agent with tools can take a bad action. Least privilege, authentication, and authorization must remain enforced outside the prompt itself.

_Developers designing safer agentic AI permissions follow architecture guidance like this on daily.dev._

## Similar posts on daily.dev

- [From AI Prototype to Production: The Engineering Gaps Developers Often Miss](https://daily.dev/posts/from-ai-prototype-to-production-the-engineering-gaps-developers-often-miss-msmbjxcci) · SitePoint · 1 upvotes · 0 comments
- [10 Production Mistakes Developers Make When Building AI Apps on AWS](https://daily.dev/posts/10-production-mistakes-developers-make-when-building-ai-apps-on-aws-vc6i7ud8s) · Medium · 0 upvotes · 0 comments
- [Six Choices Every AI Engineer Has to Make \(and Nobody Teaches\)](https://daily.dev/posts/six-choices-every-ai-engineer-has-to-make-and-nobody-teaches--y4hv094w3) · Towards Data Science · 0 upvotes · 0 comments
- [The Hidden Engineering Behind Every AI Product: What Software Engineers Should Know](https://daily.dev/posts/the-hidden-engineering-behind-every-ai-product-what-software-engineers-should-know-wlll4rb3w) · freeCodeCamp · 3 upvotes · 1 comments
- [Questions to Ask Yourself Before You AI It: Prompt Planning](https://daily.dev/posts/questions-to-ask-yourself-before-you-ai-it-prompt-planning-yjmdwjfme) · Atomic Spin · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#llm](https://daily.dev/tags/llm), [#ollama](https://daily.dev/tags/ollama), [#testing](https://daily.dev/tags/testing)

[View this post on daily.dev](https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"7 Decisions Web Developers Should Make Before Adding AI to a Production App","url":"https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan"},"datePublished":"2026-09-03T15:33:45.978Z","dateModified":"2026-10-14T02:27:30.888Z","description":"A practical framework for web developers integrating AI features into production applications, organized around seven architectural decisions: deciding whether...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/836730bef02fe571f136c17fd433f8bd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/836730bef02fe571f136c17fd433f8bd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SitePoint","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SitePoint","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/sitepoint","url":"https://daily.dev/sources/sitepoint"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,llm,ollama,testing","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SitePoint","item":"https://daily.dev/sources/sitepoint"},{"@type":"ListItem","position":3,"name":"7 Decisions Web Developers Should Make Before Adding AI to a Production App"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/7-decisions-web-developers-should-make-before-adding-ai-to-a-production-app-8vgpspnan#faq","mainEntity":[{"@type":"Question","name":"How should I validate LLM output before using it in my application logic?","acceptedAnswer":{"@type":"Answer","text":"Treat model output the same way you treat untrusted user input: parse it, run schema validation, then apply business validation before taking any action. For example, if a JSON schema only allows priority values of low, medium, or high, a model-invented value like 'urgent' should be rejected rather than silently accepted, since the model is an external system, not a trusted function in the codebase. Developers hardening AI features against unpredictable model output can find similar architecture breakdowns on daily.dev."}},{"@type":"Question","name":"What should I use to evaluate and test LLM prompts systematically instead of eyeballing outputs?","acceptedAnswer":{"@type":"Answer","text":"Promptfoo is an open-source tool built for testing and evaluating LLM applications, letting teams compare prompts and models, create automated assertions, run evaluation suites, and perform AI red-team testing. It turns subjective judgments like 'this prompt seems better' into measurable results, such as a version passing 94% of evaluation cases while introducing two regressions. Teams choosing between prompt evaluation tools track comparisons like this one on daily.dev."}},{"@type":"Question","name":"How much tool access should an AI agent be given when performing actions like checking orders or updating records?","acceptedAnswer":{"@type":"Answer","text":"Give agents the smallest possible permission scope, such as a narrow 'get order status for an authorized customer' tool rather than a generic 'execute arbitrary database query' capability, since a chatbot that only generates text can produce a bad answer but an agent with tools can take a bad action. Least privilege, authentication, and authorization must remain enforced outside the prompt itself. Developers designing safer agentic AI permissions follow architecture guidance like this on daily.dev."}}]}
```

