From the course: Fundamentals of AI Engineering: Principles and Practical Applications
From deterministic to probabilistic systems
From the course: Fundamentals of AI Engineering: Principles and Practical Applications
From deterministic to probabilistic systems
- [Instructor] One of the most fundamental shifts you'll experience as you move into the AI engineering ecosystem is the transition from deterministic to probabilistic systems. Today, I want to explore what that means and how it transforms our approach to building software. In traditional software engineering, we work in a deterministic world. When you read an IF statement, you know exactly what will happen when that condition is met. Every time you call a function with the same inputs, you expect the same outputs. This predictability is the foundation of how we typically design, build, and test our systems. But AI engineering introduces us to probabilistic systems where certainty gives way to likelihood. Given the same input, you might get slightly different outputs each time. This isn't a bug, it's the foundational and fundamental characteristic of how these systems work. Let me give you a concrete example. If you're building a traditional search function for an e-commerce site, you might implement exact string matching. A search for blue T-shirt will always return the exact same products that contain those keywords in the same order. But an AI powered search understands that someone searching for azure T might be looking for the same products as blue t-shirt. The system makes probabilistic connections between concepts rather than deterministic matches between strings. The results may vary each time based on numerous factors, including how the model was trained and even randomness in the system. This shift affects every aspect of how we build systems. Let me highlight three key differences. First, data becomes your code. In traditional engineering, you write explicit logic to handle each case. In AI engineering, you're often using data to teach the system patterns and the quality of your system depends as much on your data as your code. Second testing changes dramatically. You can't just write unit test for exact matches. Instead, you need to think about distributions, confidence intervals, and acceptable accuracy ranges. A system that's 98% accurate might still be catastrophically wrong in critical edge cases. Third, deployment isn't just about shipping code. You need to consider model versioning monitoring for data drift and handling much larger computational resources. You may also need to implement guardrails to ensure the system behaves within acceptable boundaries. These differences lead to new architectural patterns. Let's talk about three that you'll encounter frequently. The first is retrieval augmented generation or RAG. This combines the knowledge encoded in large language models with your own data sources, giving you more control and accuracy than either approach alone. The second is human in the loop, where AI systems handle routine cases, but escalate to human review when confidence is low. This creates systems that can learn and improve over time while maintaining high reliability. Third is the evaluation driven development pattern where you continuously measure model performance against reference data sets. Similar to how we use test driven development in traditional software. These patterns help us navigate the unique engineering trade-offs in AI systems. And make no mistake, these trade offs are very much where the art of AI engineering lies. For example, you often have to balance accuracy versus latency. More accurate models typically require more computational time. Freshness versus stability. Updating models frequently can improve relevance, but may introduce unexpected changes in behavior. Generality versus specificity. Models that perform well across many tasks rarely match the performance of specialized models on specific tasks. Understanding these trade-offs is critical because unlike in traditional software where you might optimize for a single metric like speed, AI systems require a careful balancing of competing concerns. As we progress through this course, we'll revisit these concepts with concrete examples. You'll build hands-on experience with probabilistic systems and develop an intuition for navigating their unique challenges. The mental shift from deterministic to probabilistic thinking might be the most valuable skill you'll develop as an AI engineer. It's a new lens that will transform how you approach problem solving, not just in ai, but through your whole engineering career.