Quiz collegato alla guida · Medio Livello

Token massimi e quiz sulle sequenze di arresto

Verifica la differenza tra i token massimi e la finestra di contesto, come funzionano le sequenze di arresto e come leggere i motivi di finitura per rilevare il troncamento.

Percorsi guida correlatiToken massimi e sequenze di arresto
Domanda 1 di 8

Cosa limita max tokens?

Anteprima di ogni domanda8 domande

Le risposte e le spiegazioni vengono visualizzate mentre rispondi al quiz.

  1. Cosa limita max tokens?
    • The total tokens of input plus output in the context window
    • The number of tokens the model may generate in a single response
    • The number of requests per minute
    • La dimensione del vocabolario del modello
  2. La tua chiamata restituisce un motivo di fine generazione 'length' nell'API di OpenAI. Cosa è successo?
    • The model finished its answer naturally
    • A stop sequence was matched
    • The output hit the maximum token limit and was cut off
    • The model requested a tool call
  3. Quale stop_reason di Anthropic indica che il modello ha deciso che la sua risposta era completa?
    • end_turn
    • max_tokens
    • stop_sequence
    • tool_use
  4. Perché impostare un valore basso per max tokens non rende le risposte concise?
    • The API ignores low values
    • The model writes as usual and is simply cut off when it reaches the limit
    • It makes the model skip the first half of its answer
    • It only affects input tokens
  5. La sequenza di arresto trovata viene normalmente inclusa nel testo restituito?
    • Yes, always at the end
    • Yes, but only when streaming
    • No, it is normally left out of the output
    • Only if it is a single character
  6. A reasoning model returns an empty visible answer. What is a likely cause described in the guide?
    • The stop sequence was too long
    • Hidden reasoning tokens used up the output limit
    • The context window was too large
    • The prompt was written in lowercase
  7. Which stop sequence is the best choice for ending after a structured answer block?
    • il
    • a single space
    • </answer>
    • .
  8. When streaming a response, when should your code decide whether the output was truncated?
    • After the first chunk arrives
    • When the finish reason arrives at the end of the stream
    • Before sending the request
    • Streaming responses cannot be truncated