‫Gemini 3.1 Flash-Lite (גרסת טרום-השקה)

המודל המולטימודאלי הכי משתלם שלנו, שמציע את הביצועים הכי מהירים למשימות קלות בתדירות גבוהה. ‫Gemini 3.1 Flash-Lite הוא המודל הכי טוב למשימות עם נפח גבוה של סוכנים, לחילוץ נתונים פשוט ולאפליקציות עם זמן אחזור נמוך במיוחד, שבהן התקציב והמהירות הם האילוצים העיקריים.

gemini-3.1-flash-lite-preview

נכס תיאור
קוד הדגם gemini-3.1-flash-lite-preview
סוגי נתונים נתמכים

קלטים

טקסט, תמונה, סרטון, אודיו ו-PDF

פלט

טקסט

מגבלות על טוקנים[*]

מגבלת טוקנים של קלט

1,048,576

מגבלת אסימונים בפלט

65,536

יכולות

יצירת אודיו

לא נתמך

Batch API

נתמך

שמירת נתונים במטמון

נתמך

ביצוע קוד

נתמך

שימוש במחשב

לא נתמך

חיפוש קבצים

נתמך

בקשה להפעלת פונקציה

נתמך

עיגון בעזרת מפות Google

לא נתמך

יצירת תמונות

לא נתמך

Live API

לא נתמך

חיפוש עם עיגון בנתונים

נתמך

פלטים מובְנים

נתמך

Thinking

נתמך

הקשר של כתובת ה-URL

נתמך

גרסאות
פרטים נוספים זמינים במאמר בנושא דפוסי גרסאות של מודלים.
  • Preview: gemini-3.1-flash-lite-preview
העדכון האחרון מרץ 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)
    
  • עיבוד מסמכים וסיכום שלהם: ניתוח קובצי PDF והחזרת סיכומים תמציתיים, למשל כדי ליצור צינור לעיבוד מסמכים או כדי למיין במהירות קבצים נכנסים:

    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-Lite כדי לסווג את מורכבות המשימה ולנתב ל-Flash או ל-Pro בהתאם.

    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)