Journal/Building with AI: What Nobody Tells You
ProductJan 2025

Building with AI: What Nobody Tells You

The real challenges of integrating AI into a production product — and how to navigate them without breaking things.

The Prototype Illusion

AI prototypes are deceptive. You wire up an API call, send a prompt, get a response back in seconds. It feels like magic. It feels like you are 90 percent done. You are not.

The gap between a prototype that works in a demo and a production system that works for real users is enormous. Prototypes run in controlled conditions with curated inputs. Production systems face unpredictable users, edge cases, and failure modes you never imagined during the demo.

The first thing nobody tells you is that the prototype phase will mask every real problem your AI feature will face. Latency under load. Rate limits. Malformed responses. Users who ask things you never anticipated. The prototype does not prepare you for any of it.

Unreliable Outputs

AI models do not return deterministic results. The same input can produce different outputs on different calls. This is not a bug — it is the nature of how these models work. But it is a fundamental challenge for production software.

When a traditional API returns data, you can validate it against a schema. When an AI model returns text, you get exactly that: text. It might be structured. It might not. It might follow your instructions perfectly. It might hallucinate a completely fabricated answer with the same confidence as a correct one.

You need validation layers. You need fallbacks. You need to decide what happens when the model returns something unexpected, incomplete, or outright wrong. This is not optional — it is the difference between a feature that works sometimes and one that works reliably.

Prompt Design Is Engineering

Prompt design is not creative writing. It is engineering. Every word in a prompt affects the output. Changing a single instruction can shift the model's behavior dramatically. And prompt behavior is not stable across model versions — what works today may break when the provider updates the model.

Treat prompts like code. Version them. Test them. Document why each instruction is there. When a prompt produces good results, snapshot it. When you need to change it, test the change against a representative set of inputs before shipping.

Structured outputs help. If you can get the model to return JSON instead of freeform text, validation becomes tractable. But even with structured outputs, you need to handle cases where the model fails to follow the format. Always have a parsing fallback.

Latency and Cost

AI calls are slow. A typical API call to a large language model takes 1 to 10 seconds. If your feature chains multiple calls, you can easily hit 30 seconds or more. Users will not wait that long.

You need to think about latency from day one. Stream responses where possible. Cache results for identical queries. Parallelize independent calls. Show loading states that communicate progress, not just a spinner.

Cost compounds quickly. Each API call costs money. If your feature is popular, the bill can become significant fast. Implement rate limiting. Cache aggressively. Consider whether every request truly needs an AI call or whether some can be handled with simpler logic.

Observability and Security

You need to see what your AI feature is actually doing in production. Log every input and output. Track latency distributions. Monitor for hallucinations and unexpected responses. Set up alerts for error rates and cost spikes.

Security is critical. AI models can be prompted to reveal system instructions, bypass guardrails, or generate harmful content. Sanitize inputs. Validate outputs. Never pass raw user input directly to a model without considering prompt injection attacks.

Privacy matters. Think carefully about what data you send to third-party model providers. User data, personal information, and sensitive content may need to be redacted or handled differently. Understand the data retention policies of your AI providers.

Human Oversight and Fallbacks

AI should augment humans, not replace them entirely. For high-stakes decisions — content moderation, financial recommendations, medical guidance — always have a human in the loop. The AI can draft, suggest, or classify, but a person should make the final call.

Build fallbacks for every AI feature. If the model is unavailable, what does the user see? If the response is low confidence, do you show it anyway or fall back to a simpler approach? Every AI feature should degrade gracefully.

Test your AI features the way you test everything else. Build evaluation datasets. Run regression tests against model updates. Measure quality over time. AI features that work well today can silently degrade as models change or as user behavior shifts.

Shipping Responsibly

Shipping an AI feature is not the end — it is the beginning. Monitor it. Improve it. Be honest with users about what it can and cannot do. Overpromising on AI capabilities erodes trust faster than any bug.

Start small. Ship to a subset of users. Gather feedback. Measure outcomes. Iterate. The companies that succeed with AI are not the ones with the most impressive demos — they are the ones that ship carefully, learn quickly, and build systems that hold up under real-world conditions.

AI is powerful. It can transform products and create experiences that were impossible before. But it is not magic. It is infrastructure that needs the same engineering rigor as everything else in your stack. Treat it that way, and it will serve you well.

Have a project in mind?

Let's turn your idea into a product your users will love.

Start a Project