A "distance from home" feature depends on the request's location and must be computed the same way in training and serving. What fits?
- Exam domain
- Model Development44% of the exam
- Difficulty
- Hard
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Model Development (44% of the exam)
Objective in the exam guide: Develop on-demand features using feature serving for consistent use across training and production environments.
On-demand features via feature serving are named.
Why B is the answer
An on-demand feature: a Unity Catalog UDF via FeatureFunction
On-demand features run a registered UDF at training and inference time, so the logic is identical and uses request-time inputs.
Remember: On-demand features keep logic consistent.
How it works
On-demand features compute from request inputs with shared code.
In detail
- UDF in Unity Catalog.
- FeatureFunction in the training set.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Leave it out of the modelWrong
The feature may be valuable.
B. An on-demand feature: a Unity Catalog UDF via FeatureFunctionRight
On-demand features keep logic consistent.
C. Compute it differently in each environmentWrong
Two implementations drift.
D. Precompute it for every possible locationWrongMost tempting
Every location cannot be precomputed.
Why it tempts: Precomputing seems faster.
Use case
An illustrative scenario, not a real incident.
Illustrative: a fraud model computes distance from the card's home with the same UDF everywhere.
See it in different ways
sequenceDiagram participant P0 as Request participant P1 as Serving participant P2 as UDF P0->>P1: location P1->>P2: compute distance P2-->>P1: feature value
How to read this chart
- 1. Request sends "location" to Serving.
- 2. Serving sends "compute distance" to UDF.
- 3. Serving gets a reply from UDF: "feature value".
mindmap
root(("Features"))
n1["Precomputed"]
n2["Feature tables"]
n3["On demand"]
n4["UDF at request time"]How to read this chart
- The centre is "Features".
- "Precomputed" covers "Feature tables".
- "On demand" covers "UDF at request time".