Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • Best Browsers 2026: Rankings and Top Lists
  • AI Browser Guides and Resources
  • Browser Comparisons: Head-to-Head Guides
  • Browser Reviews and Explainers
  • Browser Alternatives
  • Browser Directory: Guides by Browser
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Productivity Resources
  • SillyTavern Model Guides and Presets

Popular Guides

  • Best Browsers 2026: Top 10 Ranked & Compared
  • Best Free AI Browsers 2026: Plans & Prices Compared
  • Rabbit Browser: What It Is & Why Tabbit Is Better
  • Firefox vs Chrome 2026: Privacy, RAM & Speed Compared
  • Best Lightweight Browsers 2026: 7 Tested for RAM & Speed
  • AI Browser List 2026: 10 Browsers Compared
  • Neobrowser: Norton Neo, Download & Alternatives
  • Edge vs Chrome 2026: Speed, RAM & Battery Tested
  • Best Internet Browser for Android 2026
  • Best AI Browser 2026: Top 9 Tested & Ranked

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
English
简体中文English
Prompts and workflows

Gemini 3.8 Flash · prompt

Extract document facts into validated JSON

Use Gemini 3.8 Flash to extract facts from long documents into stable JSON, then validate the result in your application.

Source reviewed; not testedGoogle Gemini API with JSON Schema/structured output support in the selected SDK or REST configuration.

Prerequisites and inputs

  • Source document
  • Field schema
  • Missing-field policy

Complete templates

Editorial adaptation: structured extraction

Tabbit editorial adaptation; not the original source prompt
You are a rigorous information-extraction assistant.

Task: extract fields from the material below and return JSON that strictly conforms to {{SCHEMA_JSON}}.

Rules:
1. Use only facts explicitly present in the material. Use null for unsupported fields only if the schema permits it; otherwise report that the schema cannot express missing data. Do not infer.
2. Preserve numbers, dates, units, and proper names. If a value is ambiguous, record the issue in validation_notes only if the schema declares that field.
3. Preserve source order for lists and do not duplicate the same fact.
4. Use {{LANGUAGE}} for values where language is required; keys must exactly match the schema.
5. Before returning, check required fields, types, enums, and value ranges. Use validation_notes only if the schema declares that field.

Return JSON only. Do not add Markdown fences, explanations, or extra keys.

SCHEMA:
{{SCHEMA_JSON}}

SOURCE:
{{SOURCE_TEXT}}

Replace before running: {{SCHEMA_JSON}}, {{SOURCE_TEXT}}, {{LANGUAGE}}

Steps

  1. Save a fixed version of the source text and confirm you may send it to the API.

  2. Define field types in a schema. Allow null for missing values. Explicitly declare validation_notes if you want that field.

  3. Replace all three variables with the schema, source, and output language. Configure the same schema in the API structured-output setting; instructions alone do not enable that setting.

  4. Run one request and retain the raw output. Parse JSON, validate types, enums, and ranges, then check each populated value against the source.

  5. Record missing evidence and manual corrections. Valid JSON is not evidence of factual accuracy.

Illustrative input and output

This is an editorial format example, not a model response or measured test.

Input: The meeting took place on 2026-09-18. Attendance was not supplied.

{"date":"2026-09-18","attendees":null,"validation_notes":["Attendance was not supplied"]}

The schema must allow integer or null for attendees and define validation_notes as an array of strings.

Acceptance and recovery

CheckPass conditionRecovery
JSON shapeParses and matches the schemaSimplify nesting and verify API configuration
FactsEvery non-null value has source evidenceRemove inferred values; allow null or require manual review
CompletenessAll required fields existFix the missing-value contract before retrying
ScopeNo unsupported inferenceAdd evidence fields; avoid automatic downstream writes

The source documents an interface capability. This template is an original Tabbit editorial adaptation and has not been tested on Gemini 3.8 Flash.

Read the source research notes

One-sentence takeaway

Google's official model page marks Structured outputs as Supported for the stable gemini-3.8-flash; the structured output documentation gives the exact model configuration as response_format: type="text", mime_type="application/json", with the JSON Schema placed in schema. This constrains JSON syntax and shape, but the application must still validate field semantics and handle cases where the schema is too large, too deeply nested, or unsupported.

Use cases

  • Suitable tasks: Information extraction, fixed-enum classification, structured summarization, preparing typed inputs for downstream APIs, and tasks that require streaming JSON fragments.

  • Unsuitable tasks: Treating valid JSON as proof of factual correctness or authorization for a safety-sensitive action; fields generated by the model remain untrusted input and cannot bypass business validation, permissions, or human confirmation.

  • Applicable model version: The stable gemini-3.8-flash; the API model ID corresponds exactly to the model string in the official code.

  • Applicable client, agent, or API: The Google Gemini API's Interactions API. The Google GenAI SDK supports defining schemas with Pydantic (Python) and Zod (JavaScript); other SDKs, agent frameworks, or third-party platforms must verify the field mapping themselves.

  • Output notes: The model page lists the output modality as Text; structured JSON is returned through the text response and should not be misunderstood as a standalone JSON output modality.

Ready-to-use content

Python: Official Pydantic configuration

The core schema, model ID, and request fields from Google's structured output example are retained below; Recipe.model_json_schema() generates the JSON Schema through Pydantic, while model_validate_json parses and validates the returned value on the application side.

from google import genai
from pydantic import BaseModel, Field
from typing import List, Optional

class Ingredient(BaseModel):
    name: str = Field(description="Name of the ingredient.")
    quantity: str = Field(description="Quantity of the ingredient, including units.")

class Recipe(BaseModel):
    recipe_name: str = Field(description="The name of the recipe.")
    prep_time_minutes: Optional[int] = Field(
        description="Optional time in minutes to prepare the recipe."
    )
    ingredients: List[Ingredient]
    instructions: List[str]

client = genai.Client()
prompt = """
Please extract the recipe from the following text.
The user wants to make delicious chocolate chip cookies.
They need 2 and 1/4 cups of all-purpose flour, 1 teaspoon of baking soda,
1 teaspoon of salt, 1 cup of unsalted butter (softened), 3/4 cup of granulated sugar,
3/4 cup of packed brown sugar, 1 teaspoon of vanilla extract, and 2 large eggs.
For the best part, they'll need 2 cups of semisweet chocolate chips.
First, preheat the oven to 375°F (190°C). Then, in a small bowl, whisk together the flour,
baking soda, and salt. In a large bowl, cream together the butter, granulated sugar, and brown sugar
until light and fluffy. Beat in the vanilla and eggs, one at a time. Gradually beat in the dry
ingredients until just combined. Finally, stir in the chocolate chips. Drop by rounded tablespoons
onto ungreased baking sheets and bake for 9 to 11 minutes.
"""

interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input=prompt,
    response_format={
        "type": "text",
        "mime_type": "application/json",
        "schema": Recipe.model_json_schema()
    },
)

recipe = Recipe.model_validate_json(interaction.output_text)
print(recipe)

Native JSON Schema: Configuration skeleton

When not using Pydantic, pass the schema directly while keeping the official request fields unchanged:

response_format = {
    "type": "text",
    "mime_type": "application/json",
    "schema": {
        "type": "object",
        "properties": {
            "label": {
                "type": "string",
                "enum": ["positive", "neutral", "negative"],
                "description": "The classification label."
            },
            "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "description": "A confidence score between 0 and 1."
            }
        },
        "required": ["label", "confidence"],
        "additionalProperties": False
    }
}

interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input="Classify the sentiment of: The new UI is incredibly intuitive.",
    response_format=response_format,
)

Streaming structured output

The official example creates a stream with stream=True; the text block in each step.delta is a valid, concatenable JSON fragment. Do not treat the first fragment received as a complete object; concatenate the fragments after the stream ends and perform final schema validation.

from pydantic import BaseModel
from typing import Literal

class Feedback(BaseModel):
    sentiment: Literal["positive", "neutral", "negative"]
    summary: str

stream = client.interactions.create(
    model="gemini-3.8-flash",
    input="The new UI is incredibly intuitive. Add a very long summary to test streaming!",
    response_format={
        "type": "text",
        "mime_type": "application/json",
        "schema": Feedback.model_json_schema()
    },
    stream=True
)

for event in stream:
    if event.event_type == "step.delta":
        if event.delta.type == "text" and getattr(event.delta, "text", None):
            print(event.delta.text, end="", flush=True)

JSON Schema support range

Google's documentation explicitly states that this is a subset of JSON Schema. The following are currently available:

CategorySupported items
Basic typesstring, number, integer, boolean, object, array, null
Descriptive propertiestitle, description
Objectsproperties, required, additionalProperties
Stringsenum, format (such as date-time, date, time)
Numbersenum, minimum, maximum
Arraysitems, prefixItems, minItems, maxItems

When null values are allowed, include null in the type array, for example {"type": ["string", "null"]}. The description in a schema guides the model; it is not application-layer data validation or an authorization rule.

Boundaries with function calling and tools

  • Structured outputs: Formats the final answer; suitable for tasks that require a fixed structure in the final result.

  • Function calling: Proposes functions and arguments to execute during a conversation; the application is responsible for validating, executing, and returning the result.

  • Structured output + built-in tools: Google's documentation marks this combination as Preview, and the example uses a Gemini 3 series model; do not rewrite the documentation's gemini-3.1-pro-preview example as a tool guarantee specific to 3.8. The Gemini 3.8 Flash model page lists Structured outputs, Function calling, and search capabilities separately, but whether they can be used in the target account, SDK version, and specific tool combination still requires real-world testing.

Testing/workflow steps

  1. Fix model="gemini-3.8-flash" and first use a small object schema to verify the SDK, account, and Interactions API field mapping.

  2. Check whether the response can be parsed as JSON, then use Pydantic, Zod, or an equivalent validator to verify types, enums, numeric ranges, required fields, and business rules.

  3. Gradually increase nesting depth and array constraints; record schema rejections, parse failures, missing fields, and semantic errors, rather than attributing complex-schema problems to the prompt.

  4. For streaming requests, consume only the text incrementally, then concatenate and validate the complete JSON after the stream ends; when it fails, retain a diagnosable error state and do not pass a partial object downstream.

  5. If tools are enabled at the same time, validate structured output independently first, then validate tool calls; apply allowlists, permission, idempotency, and human-confirmation checks to tool parameters.

Raw evidence and data

Official pageVerifiable contentHow this article uses it
Gemini 3.8 Flash model pageModel ID is gemini-3.8-flash; stable version; Structured outputs Supported; input token limit 1,048,576 and output token limit 65,536Proves the exact model and capability status; does not treat token limits as recommended per-request values
Structured output documentationThe Python example uses client.interactions.create, response_format, mime_type="application/json", and schema; Pydantic/Zod are supported; output can be streamedForms the executable configuration and streaming-processing constraints
JSON Schema support section in the structured output documentationOnly a subset of JSON Schema is supported, with a warning that schemas that are too large or too deeply nested may be rejectedForms the schema-design and error-handling boundaries

Applicability boundaries

  • Structured outputs mainly ensure that output conforms to the syntax and declared shape; Google explicitly requires applications to validate values and implement error handling for results that conform to the schema but are semantically wrong.

  • “Supported” does not mean that all regions, account tiers, SDK versions, agent frameworks, or third-party routes are synchronized; conduct a real smoke test before production launch.

  • JSON Schema implements only the subset listed officially; do not assume that unlisted keywords are valid. Large or deeply nested schemas may be rejected.

  • A schema's description provides model guidance and cannot take responsibility for permissions, privacy, SQL injection protection, or business authorization.

  • Streaming chunks can be concatenated into final JSON, but intermediate fragments may not be complete objects; parsing and business validation must be completed after the stream ends.

  • Structured output and function calling solve different problems. Any write, payment, email, deletion, or device-control action must be protected by application-side permissions, auditing, and human confirmation.

  • Token limits, capability switches, pricing, and lifecycle on the model page may change; this article records only the official page state collected on 2026-09-08.

Source excerpt or observation (compliant short quotation)

Google's core configuration requirement is to use the text type, set mime_type to application/json, and then provide a JSON Schema in the schema field. In engineering terms, treat it as a “validatable output contract,” not a guarantee of factual correctness or execution authority.

Source and dates

Google AI for Developers · Source date: 2026-09-02 · Edited: 2026-09-20

Read the original source
Variable checklist

Still to replace: 3

{{SCHEMA_JSON}}{{SOURCE_TEXT}}{{LANGUAGE}}

Related prompts

Configure a validated Gemini function-calling loopConfigure the Gemini 3.8 Flash APIBuild a four-layer fact-checking Agent for AntigravityTurn a YouTube video into reusable editing rules

Related reviews

Vals AI Finance Agent v2: retrieval and analysisGoogle's official benchmarks and reproduction boundariesArtificial Analysis: current speed, latency, and version scopeAIIQ: benchmark coverage and task boundaries

Read the full analysis

Overview · English

Gemini 3.8 Flash: What Changed and How to Get Access

A sourced guide to Gemini 3.8 Flash, its changes from 3.7, access routes, limits, pricing timing and practical fit.

Full review · English

Gemini 3.8 Flash Review: Strong Workhorse, Conditional Upgrade

A public-evidence review of Gemini 3.8 Flash, covering reasoning levels, benchmark limits, speed, cost, community feedback and workload fit.

Pricing · English

Gemini 3.8 Flash Pricing: The 2027 2× Rate Change and Cost per Task

A decision guide to Gemini 3.8 Flash pricing: the rate card, cache and effort levers, Flex and Batch, family comparisons, and a browser-only calculator.

Alternatives · English

Gemini 3.8 Flash Alternatives: Choose by Task and Budget

Compare four Gemini 3.8 Flash alternatives by completed-task cost, response path, tools, context, deployment fit, and original evidence.

Gemini 3.8 Flash

Use Gemini 3.8 Flash in Tabbit

Run this guide in the environment listed above. Downloading does not transfer the template or establish model availability for your account.