Κουίζ που συνδέεται με οδηγό · Μεσαίο Επίπεδο

How to Build a Chatbot with an LLM API Quiz

Build a chatbot around an API request loop, state and provider differences, streaming, tool execution, token limits, and safe error handling.

Σχετικές διαδρομές οδηγώνHow To Build A Chatbot With An LLM API
Ερώτηση 1 του 8

Σε μια ροή Συμπληρώσεων Συνομιλίας που διαχειρίζεται ο πελάτης, ποια συμφραζόμενα στέλνονται συνήθως σε κάθε νέο γύρο;

Προεπισκόπηση κάθε ερώτησης8 ερωτήσεις

Οι απαντήσεις και οι εξηγήσεις εμφανίζονται καθώς κάνετε το κουίζ.

  1. Σε μια ροή Συμπληρώσεων Συνομιλίας που διαχειρίζεται ο πελάτης, ποια συμφραζόμενα στέλνονται συνήθως σε κάθε νέο γύρο;
    • Only the newest user message
    • The full array of prior messages plus the new one
    • A compressed binary session token
    • Just the system prompt
  2. Σε μια ροή συνομιλίας που διαχειρίζεται ο πελάτης και είναι χωρίς κατάσταση, γιατί μπορεί το bot να αναφέρεται σε προηγούμενους γύρους?
    • The model stores a session on the provider's server automatically
    • The client resends the full message history on every call
    • The API caches embeddings of prior turns
    • The model has a persistent memory across all users
  3. Σύμφωνα με τον οδηγό, ποιο είναι το κύριο πρακτικό όφελος της ροής απαντήσεων σε ένα chatbot;
    • It reduces the total token cost of the request
    • It allows the model to skip the system prompt
    • It improves perceived speed by rendering text as it arrives
    • It removes the need for error handling
  4. Σύμφωνα με τον οδηγό, τι πρέπει να προκαλεί εκθετική καθυστέρηση αντί για άμεση επανάληψη;
    • A successful 200 response
    • Rate limit errors (429) and transient server errors (5xx)
    • Any assistant message longer than expected
    • A user typing a new message
  5. Πώς ενσωματώνεται η κλήση εργαλείων στον βασικό βρόχο του chatbot;
    • The model executes the function itself on the provider's servers
    • The application runs the requested function and appends its result as a message before calling the model again
    • Tool calls replace the system prompt entirely
    • The client must switch to a different API endpoint
  6. For a new OpenAI chatbot, what API and conversation-state approach does current documentation recommend?
    • Chat Completions is no longer supported
    • Responses is recommended for new projects; Chat Completions remains supported and commonly uses client-supplied message history
    • Responses can only accept one user turn
    • Both APIs always store the same server-side conversation
  7. Why is counting characters or words insufficient for managing a chatbot's context window?
    • Context limits are enforced in tokens, which don't map directly to characters or words
    • Characters are always more expensive than tokens
    • The API rejects any request with punctuation
    • Word counts are only relevant for streaming
  8. According to the guide, what is a recommended strategy when a conversation's message array grows too large for the context window?
    • Delete the system prompt to save space
    • Trim or summarize older turns before the limit is reached
    • Switch every message to the assistant role
    • Stop streaming responses