Search⌘ K
AI Features

Functional vs. Non-Functional Requirements

Explore the distinction between functional and non-functional requirements in machine learning system design. Learn to identify input-output contracts and uncover constraints such as latency, throughput, fairness, and cost. This lesson helps you ask the right clarifying questions to create deployable, production-ready ML architectures and avoid common pitfalls in design interviews.

Consider a candidate who walks into an interview and is asked to design a real-time fraud detection system for a payments company. They confidently outline the functional contract: the system ingests a transaction, runs it through a classifier, and returns a fraud or not-fraud label. The interviewer nods, but the candidate never asks about latency. The payment gateway times out after 100 milliseconds, and the proposed deep learning model takes 300 milliseconds to score a single transaction. If the candidate does not ask about throughput, the design may not support millions of transactions per second during peak events such as Black Friday or major sales campaigns. The candidate also misses fairness constraints, cost limits, and data freshness requirements. The design may be logically coherent, but unusable in production.

This scenario plays out repeatedly in ML system design interviews. With the task type identified and defended from the previous step, the next critical move is decomposing the problem into requirements that will govern every downstream design choice. Functional requirements define what the system does. Non-functional requirements (NFRs) define the constraints under which it must operate. Missing NFRs is the single most common reason interview designs are judged as junior-level, because it signals that the candidate cannot bridge the gap between a model that works on a notebook and a system that works in production.

Attention: A design that satisfies every functional requirement but violates even one critical NFR is undeployable. Interviewers at L4 through Staff+ levels specifically probe for this awareness.

Functional requirements explained

Functional requirements describe the input-output contract of the ML system from the perspective of whoever consumes its output. They answer a direct question: given some input, what does the system produce?

These requirements map closely to the task type you selected in the previous step. For a YouTube-style recommendation system, the functional requirement is generating a ranked list of video candidates given a user context. For an Uber ETA system, it is returning a predicted trip duration given an origin, destination, and current traffic conditions. For a content moderation pipeline, it is classifying user-uploaded images as safe or unsafe.

Functional requirements are typically the easier category to extract because they mirror the product surface. However, precision matters. A well-scoped functional requirement specifies three things: the input, the output, and the consumer of that output. The consumer matters because it shapes ...