GenAI Engineer Design Applications MEDIUM
PRODUCTION SCENARIO
A Generative AI Engineer registers two Unity Catalog function tools for a retail agent: one refunds a delivered order and one cancels an unshipped order. Both carry one-word docstrings, and in testing the LLM calls the refund function for 30% of cancellation requests.

What should the engineer fix first to improve tool selection?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Write docstrings that state what each function does and when to use it

The Unity Catalog functions toolkit reads and parses each function's docstring to tell the LLM how and when a tool applies, so one-word docstrings leave the model guessing between two similar actions. Renaming helps at the margin, since a name carries far less signal than a description. Few-shot examples cover the cases the engineer thought of and leave the tool definitions themselves uninformative. Merging the two functions moves the same ambiguity into an argument value.
Free

Keep practicing GenAI Engineer

45 original GenAI Engineer practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free