यह हमारा सबसे किफ़ायती मल्टीमॉडल है. यह ज़्यादा फ़्रीक्वेंसी वाले और कम संसाधनों का इस्तेमाल करने वाले टास्क को तेज़ी से पूरा करता है. Gemini 3.1 Flash-Lite, एजेंटिक टास्क, आसान डेटा एक्सट्रैक्शन, और बहुत कम समय में जवाब देने वाले ऐप्लिकेशन के लिए सबसे सही है. इनमें बजट और स्पीड, मुख्य शर्तें होती हैं.
gemini-3.1-flash-lite-preview
| प्रॉपर्टी | ब्यौरा |
|---|---|
| मॉडल कोड | gemini-3.1-flash-lite-preview |
| कौन-कौनसे डेटा टाइप इसके साथ काम करते हैं |
इनपुट टेक्स्ट, इमेज, वीडियो, ऑडियो, और पीडीएफ़ आउटपुट टेक्स्ट |
| टोकन की सीमाएं[*] |
इनपुट टोकन की सीमा 1,048,576 आउटपुट टोकन की सीमा 65,536 |
| सुविधाएं |
ऑडियो जनरेट करने की सुविधा काम नहीं करता है बैच एपीआई काम करता है कैश मेमोरी में सेव होना काम करता है कोड चलाने की सुविधा काम करता है कंप्यूटर पर इस्तेमाल करने की सुविधा काम नहीं करता है फ़ाइल खोजने की सुविधा काम करता है Flex इन्फ़रेंस काम करता है फ़ंक्शन कॉल करने की सुविधा काम करता है Google Maps के साथ भरोसेमंद स्रोतों से जानकारी पाने की सुविधा काम करता है इमेज जनरेट करने की सुविधा काम नहीं करता है लाइव एपीआई काम नहीं करता है प्रायॉरिटी इन्फ़रेंस काम करता है भरोसेमंद स्रोतों से जानकारी पाने की सुविधा काम करता है स्ट्रक्चर्ड आउटपुट काम करता है प्रोसेस दिखाने की सुविधा काम करता है यूआरएल के कॉन्टेक्स्ट की सुविधा काम करता है |
| वर्शन |
|
| सबसे नया अपडेट | मार्च 2026 |
| जानकारी की कटऑफ़ तारीख | जनवरी 2025 |
डेवलपर गाइड
Gemini 3.1 Flash-Lite, सीधे-सीधे टास्क को बड़े पैमाने पर हैंडल करने के लिए सबसे सही है. यहां कुछ इस्तेमाल के उदाहरण दिए गए हैं, जिनके लिए Gemini 3.1 Flash-Lite सबसे सही है:
अनुवाद: तेज़ी से, कम लागत में, और बड़े पैमाने पर अनुवाद करना. जैसे, चैट मैसेज, समीक्षाएं, और सहायता टिकट को बड़े पैमाने पर प्रोसेस करना. सिस्टम के निर्देशों का इस्तेमाल करके, आउटपुट को सिर्फ़ अनुवाद किए गए टेक्स्ट तक सीमित किया जा सकता है. इसमें कोई अतिरिक्त टिप्पणी शामिल नहीं होती:
text = "Hey, are you down to grab some pizza later? I'm starving!" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", config={ "system_instruction": "Only output the translated text" }, contents=f"Translate the following text to German: {text}" ) print(response.text)ट्रांसक्रिप्शन: रिकॉर्डिंग, वॉइस नोट या किसी भी ऑडियो कॉन्टेंट को प्रोसेस करना. इसके लिए, स्पीच-टू-टेक्स्ट की अलग पाइपलाइन बनाने की ज़रूरत नहीं होती. यह मल्टीमॉडल इनपुट के साथ काम करता है. इसलिए, ट्रांसक्रिप्शन के लिए ऑडियो फ़ाइलें सीधे पास की जा सकती हैं:
# URL = "https://storage.googleapis.com/generativeai-downloads/data/State_of_the_Union_Address_30_January_1961.mp3" # Upload the audio file to the GenAI File API uploaded_file = client.files.upload(file='sample.mp3') prompt = 'Generate a transcript of the audio.' response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, uploaded_file] ) print(response.text)कम संसाधनों का इस्तेमाल करने वाले एजेंटिक टास्क और डेटा एक्सट्रैक्शन: एंटिटी एक्सट्रैक्शन, क्लासिफ़िकेशन, और कम संसाधनों का इस्तेमाल करने वाली डेटा प्रोसेसिंग पाइपलाइन, स्ट्रक्चर्ड JSON आउटपुट के साथ काम करती हैं. उदाहरण के लिए, ई-कॉमर्स के ग्राहक की समीक्षा से स्ट्रक्चर्ड डेटा निकालना:
from pydantic import BaseModel, Field prompt = "Analyze the user review and determine the aspect, sentiment score, summary quote, and return risk" input_text = "The boots look amazing and the leather is high quality, but they run way too small. I'm sending them back." class ReviewAnalysis(BaseModel): aspect: str = Field(description="The feature mentioned (e.g., Price, Comfort, Style, Shipping)") summary_quote: str = Field(description="The specific phrase from the review about this aspect") sentiment_score: int = Field(description="1 to 5 (1=worst, 5=best)") is_return_risk: bool = Field(description="True if the user mentions returning the item") response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, input_text], config={ "response_mime_type": "application/json", "response_json_schema": ReviewAnalysis.model_json_schema(), }, ) print(response.text)दस्तावेज़ों को प्रोसेस करना और उनका सारांश बनाना: पीडीएफ़ को पार्स करना और संक्षिप्त सारांश देना. जैसे, दस्तावेज़ों को प्रोसेस करने की पाइपलाइन बनाना या आने वाली फ़ाइलों को तुरंत ट्राइएज करना:
import httpx # Download a sample PDF document doc_url = "https://storage.googleapis.com/generativeai-downloads/data/med_gemini.pdf" doc_data = httpx.get(doc_url).content prompt = "Summarize this document" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[ types.Part.from_bytes( data=doc_data, mime_type='application/pdf', ), prompt ] ) print(response.text)मॉडल राउटिंग: कम समय में जवाब देने वाले और कम लागत वाले मॉडल का इस्तेमाल, क्लासिफ़ायर के तौर पर करें. यह टास्क की जटिलता के आधार पर, क्वेरी को सही मॉडल पर रूट करता है. यह प्रोडक्शन में एक असली पैटर्न है. ओपन-सोर्स Gemini CLI, टास्क की जटिलता को क्लासिफ़ाई करने और उसके मुताबिक Flash या Pro पर रूट करने के लिए, Flash-Lite का इस्तेमाल करता है.
FLASH_MODEL = 'flash' PRO_MODEL = 'pro' CLASSIFIER_SYSTEM_PROMPT = f""" You are a specialized Task Routing AI. Your sole function is to analyze the user's request and classify its complexity. Choose between `{FLASH_MODEL}` (SIMPLE) or `{PRO_MODEL}` (COMPLEX). 1. `{FLASH_MODEL}`: A fast, efficient model for simple, well-defined tasks. 2. `{PRO_MODEL}`: A powerful, advanced model for complex, open-ended, or multi-step tasks. A task is COMPLEX if it meets ONE OR MORE of the following criteria: 1. High Operational Complexity (Est. 4+ Steps/Tool Calls) 2. Strategic Planning and Conceptual Design 3. High Ambiguity or Large Scope 4. Deep Debugging and Root Cause Analysis A task is SIMPLE if it is highly specific, bounded, and has Low Operational Complexity (Est. 1-3 tool calls). """ user_input = "I'm getting an error 'Cannot read property 'map' of undefined' when I click the save button. Can you fix it?" response_schema = { "type": "object", "properties": { "reasoning": { "type": "string", "description": "A brief, step-by-step explanation for the model choice, referencing the rubric." }, "model_choice": { "type": "string", "enum": [FLASH_MODEL, PRO_MODEL] } }, "required": ["reasoning", "model_choice"] } response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=user_input, config={ "system_instruction": CLASSIFIER_SYSTEM_PROMPT, "response_mime_type": "application/json", "response_json_schema": response_schema }, ) print(response.text)प्रोसेस दिखाने की सुविधा: ऐसे टास्क के लिए बेहतर सटीक नतीजे पाने के लिए, जिनमें सिलसिलेवार तरीके से तर्क देने की ज़रूरत होती है, प्रोसेस दिखाने की सुविधा कॉन्फ़िगर करें. इससे मॉडल, फ़ाइनल आउटपुट देने से पहले, इंटरनल तर्क पर ज़्यादा कंप्यूटिंग खर्च करता है:
response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents="How does AI work?", config=types.GenerateContentConfig( thinking_config=types.ThinkingConfig(thinking_level="high") ), ) print(response.text)