PRODUCTION SCENARIO
A Generative AI Engineer builds an internal IT assistant that answers "How many licenses are left for Figma?" thousands of times a day. The query is always the same lookup against one Unity Catalog table, with the product name as the only variable.
Which structured retrieval tool should the engineer build for this lookup?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: A Unity Catalog SQL function that takes the product name as a parameter
Databricks guidance is to build a structured retrieval tool as a Unity Catalog SQL function when the query is known ahead of time and the agent provides the parameters, which is one keyed lookup repeated at volume. A Genie Agent writes fresh SQL per question, which suits open-ended exploration but adds latency and variance here. An ai_query call pays for model inference on a question SQL answers deterministically. Embedding one row per product turns an exact key lookup into a fuzzy match.