
9/3/2024 · Lewis Liu, Terry Koo
What this post added
Introduced Controlled Generation for Gemini 1.5 Flash, adding 'enum' support to the existing Controlled Generation feature for Gemini 1.5 Pro. This enables developers to define response schemas (based on OpenAPI 3.0) for AI outputs, ensuring predictable, structured, and machine-readable results. Controlled generation is also automatically enabled when using function calling with Gemini 1.5. The underlying technique is based on controlled decoding, with a research paper available for further details. The feature adds minimal latency and does not require storing user data.