Why AI Projects Don't Fail Because of the Technology

Lucas Semelin
9 min lectura
#artificial intelligence #AI architecture #B2B SaaS #product design #RAG #knowledge engineering #AI strategy

Why AI Projects Don't Fail Because of the Technology

A practical case for B2B SaaS teams: how the same data produces wildly different products depending on architectural decisions made before any code is written.

Most AI projects don't fail because the model is wrong, the framework is wrong, or the engineer made bad decisions in the implementation. Most AI projects fail because nobody designed what the system was supposed to do — what users actually need from it, what the agent should answer, what trade-offs the architecture is making — before the first line of code was written.

That sounds abstract. Let me make it concrete.

I'm going to use a B2C example to walk you through this — a hypothetical Starbucks mobile assistant. I'm aware this isn't B2B SaaS, but the example is more visual and easier to follow. At the end, I'll show explicitly how the same principles translate to the B2B SaaS products my readers actually work on. Bear with me.


The Setup

Imagine you're building an AI assistant inside the Starbucks mobile app. The assistant helps customers decide what to order, where to pick it up, how to maximize their stars in the loyalty program, and answers questions about products and customizations.

You have access to a rich domain: catalog of 200+ products with sizes and prices, customizations (milks, syrups, foam, ice levels), allergen tables, nutritional information, real-time inventory by store, store locations and hours, customer order history, the rewards program rules. Plenty of data. Plenty of opportunity.

Now imagine a real customer query, exactly the kind a user might type into the assistant:

"Hi, I'm lactose intolerant, I'm heading to the Palermo store after work — what would you recommend that earns extra stars this week and doesn't take long to prepare?"

This single question crosses six data sources: product catalog, allergen tables, store inventory, weekly promotions, prep times, and customer history. It also has implicit prioritization: lactose-free is a hard constraint, the store is fixed, extra stars and prep time are preferences ranked in some order.

How the AI assistant handles this query is not a model decision. It's an architecture decision. And the architecture decision determines whether the customer trusts the assistant or goes back to typing in the search bar.


Path A: Traditional RAG

Most teams approach this the same way. Vector-embed the entire product database, the rewards rules PDF, the weekly promo announcements, the allergen tables. When the user asks the question, the AI does:

  1. Retrieves the top-K chunks semantically similar to "lactose-free Palermo extra stars fast prep"
  2. Reads the chunks
  3. Synthesizes an answer

What actually happens in practice:

The retrieval returns fragments. A chunk describing the almond milk latte mentions "no lactose" but doesn't say if it's available in Palermo today. A chunk from the rewards rules PDF mentions "extra stars" but is from a promo three months ago. A chunk from the operations manual mentions Palermo store hours but not real-time inventory.

The AI synthesizes a response: "I recommend the almond milk latte — it's lactose-free and earns extra stars this week."

That answer might be wrong on two of three claims. The almond milk latte may not be available in Palermo today (sold out, common). The "extra stars this week" claim came from a stale promo PDF. Only the lactose-free part is verified.

The customer reads the response, opens the app to add it to cart, and discovers it's unavailable at their store. Trust broken in 30 seconds.

The technical implementation worked. The model answered. The retrieval ran. But the system failed.


Path B: Knowledge Engine (Artifact-Based)

Now consider a different architectural approach. Instead of letting the AI search across raw data at query time, you precompute structured artifacts ahead of time. For each product, you create a typed object that already cross-references the six data sources:

interface ProductCard {
  sku: string
  name: string
  category: string
  sizes: { size: string; price: number; calories: number; caffeine: number; sugar: number }[]
  allergens: string[]
  lactose_free: boolean
  customizations_available: string[]
  similar_products: string[]
  tags: string[]           // sweet, refreshing, energizing, ...
  prep_time_seconds: number
  rating_avg: number
}

interface StoreSnapshot {
  store_id: string
  name: string
  location: { lat: number; lng: number }
  hours_today: { open: string; close: string }
  active_skus: string[]   // updated every 60-120s
  out_of_stock: string[]
  current_wait_minutes: number
}

interface CustomerProfile {
  user_id: string
  tier: string
  star_balance: number
  stars_to_next_reward: number
  usuals: string[]
  dietary_flags: string[]
  favorite_stores: string[]
  active_offers: string[]
}

interface ActivePromotion {
  promo_id: string
  name: string
  eligibility_rules: Record<string, unknown>
  bonus_stars_value: number
  validity_window: { from: string; to: string }
}

Each artifact has a defined refresh policy. ProductCard updates weekly when the catalog changes. StoreSnapshot updates every 60-120 seconds for inventory. CustomerProfile updates after each customer transaction.

Now when the customer asks the question, the AI doesn't do open-ended search. It runs a typed query against the artifacts:

{
  "ask": "Recommend up to 3 sweet, lactose-free drinks under 200 cal,
          available at the user's nearest store, prioritizing extra
          stars this week and short prep time",
  "filter": {
    "user_id": "customer_123",
    "product.lactose_free": true,
    "product.tags.contains": "sweet",
    "product.calories_at_recommended_size": { "<=": 200 },
    "store.proximity_to_user_meters": { "<=": 2000 },
    "store.active_skus.contains": "{product.sku}",
    "promotion.active_this_week": true
  },
  "shape": [{
    "name": "string",
    "size_recommended": "string",
    "calories": "number",
    "price_usd": "number",
    "store_id": "string",
    "pickup_estimate_minutes": "number",
    "stars_extra_this_week": "number"
  }],
  "control": { "max_latency_ms": 600 }
}

The system returns a typed list of 3 drinks. Each one verified across all six data sources. Each one available at this customer's actual nearest store, today, with the actual stars and prep time.

The customer reads the response, opens the app, the drink is available, the stars match what was promised. Trust earned.


What's Actually Different Between the Two Paths

Notice the architectural differences. They're not technical preferences — they're decisions about what the system is supposed to do.

In Path A: the AI does retrieval and reasoning at query time. The customer waits while the system searches, reads chunks, synthesizes. Latency is unpredictable. Accuracy depends on what the embeddings happened to find. The system can confidently state things that turn out to be wrong.

In Path B: the structuring work happens at build time. Artifacts are computed once and refreshed on schedule. The query is a typed contract — what the customer asked, in what shape, with what constraints, within what budget. The model only composes the response. It can't fabricate facts because there's nothing to fabricate.

The difference isn't "Path B is better." It's that the two paths optimize for different things. Path A optimizes for flexibility — the AI can answer questions you didn't anticipate. Path B optimizes for trust — the AI can only answer with verified data, but it answers reliably.

For a Starbucks mobile assistant, where customers ask predictable questions and need correct answers fast, Path B wins. For an open-ended research assistant where users ask unpredictable things and tolerate occasional misses, Path A might win.

The point isn't which path is better in the abstract. The point is that this is a design decision, not a technical decision. And it has to be made before any code is written, by someone who understands both what users need and what each technical pattern produces.


How This Maps to B2B SaaS

Now translate this to your B2B SaaS product. Replace "Starbucks customers" with "your users". Replace "drinks and stars" with whatever your product does — managing leads, tracking projects, processing tickets, reviewing contracts, anything.

You're adding AI to your product. Maybe an assistant inside the dashboard. Maybe a recommendation system. Maybe an automation that pre-fills tasks based on context. Whatever it is, you face the same fork:

Path A — Open retrieval over your data: Embed your domain (customer records, history, configurations, knowledge base), and let the AI search at query time. Fast to ship. Flexible. Probabilistic accuracy.

Path B — Structured artifacts of your domain: Precompute the entities your AI needs to reason about. Define their shape, their relationships, their refresh policies. Define the queries the AI is allowed to make against them. Slower to design upfront. More reliable in production. Predictable accuracy.

For most B2B SaaS use cases — where users are doing their actual jobs, need correct answers fast, and trust degrades quickly when AI makes things up — Path B wins. But almost no team starts there.

Why? Because shipping Path A is easier. There's a whole ecosystem of tutorials, frameworks, and copy-paste solutions for "embed your data, do RAG, ship a chatbot". Building Path B requires actually understanding your domain, designing artifacts, defining refresh policies, deciding what queries to support. That's not framework work. That's design work.


The Deeper Point

When you read "AI project failed because of technical thing", look closer. Most of the time, the technical thing was downstream of an architectural decision that was made implicitly, by default, by whoever happened to be writing code.

  • Should the AI search over chunks or query structured artifacts? Architectural decision, made implicitly when someone picked a tutorial.
  • Should the AI cite its sources or just synthesize? Architectural decision, often skipped.
  • Should the response be a typed object or natural language? Architectural decision, defaulted to natural language because it's faster to demo.
  • Should there be evaluation criteria the system must meet? Architectural decision, often deferred to "after launch".

Each of these is a UX decision dressed as a technical one. And each one shapes whether your users trust the AI enough to actually use it.


What to Do About It

If you're building AI features in B2B SaaS, before the next sprint:

  1. Write down the 5-10 most important questions your users will ask the AI. Be specific. Real questions, not abstract use cases.
  2. For each one, write what the correct answer looks like — what fields, what format, what would be unacceptable to get wrong.
  3. Identify the data sources each correct answer depends on.
  4. Decide explicitly: am I going to let the AI search those sources at query time (Path A), or am I going to precompute structured artifacts the AI can query reliably (Path B)?

Steps 1-3 are the eval set most teams skip. Step 4 is the architectural decision most teams make implicitly.

Doing this work doesn't take long — a focused afternoon with the right people produces a draft. Skipping it produces an AI feature that ships, doesn't get adopted, and becomes the example everyone refers to as "the AI thing that didn't work."

The technology isn't going to fail your project. The decisions made before the technology will.


If you're building or auditing an AI feature in your B2B SaaS and want to think through these decisions before — or after — committing to an approach, that's the work I do. Let's talk →

Compartir:

AI Product Architect for B2B SaaS. Diseño features con AI en los que los usuarios realmente confían y adoptan.

Buenos Aires, Argentina · Trabajo con equipos de todo el mundo.

© 2026 Lucas Semelin. Todos los derechos reservados.