A grounded-answer Function should persist audit rows to Cosmos DB with minimal custom SDK plumbing. What helps?
Select an answer to reveal the explanation.
Short Explanation
Output bindings are the pre-addressed envelope—your Function drops the audit row and Cosmos is already on the label.
Full Explanation
A grounded-answer Function that must persist audit rows to Cosmos DB with minimal custom SDK plumbing should use an Azure Functions Cosmos DB output binding. The binding writes municipal AI audit documents (prompt hash, grounded answer id, citations, clerk id) declaratively so developers focus on grounding logic rather than boilerplate client code.
Only printing audit lines to the Function console leaves no durable, queryable store for oversight. Requiring operators to paste answers into Cosmos Data Explorer by hand does not scale and breaks automation. Storing audit rows exclusively in browser localStorage on resident phones is not a city system of record and is invisible to central audit.
Exam caveat: Functions bindings (Cosmos, Storage, Service Bus, Event Grid) are exam-critical for reducing glue code. Output bindings complement—not replace—identity and validation; still configure connection via app settings/Key Vault and choose partition keys suited to audit query patterns.
Operational check: configure a Cosmos output binding on the grounded-answer Function, invoke with a test grounded response, and verify the audit document appears in the target container with expected attributes without explicit SDK upsert code in the Function body.