Calling LLM APIs — Final Exam

14 questions · pass mark 80% · 20 minute limit. The timer auto-submits at zero.

Time remaining: 20:00
  1. Question 1easy

    In a messages/chat API call, what is the `system` role for?

  2. Question 2medium

    On the Anthropic SDK, what is response.content?

  3. Question 3medium

    How do you give a chat model memory of earlier turns?

  4. Question 4medium

    Why prefer structured (JSON-schema) outputs over parsing free text?

  5. Question 5hard

    In tool/function calling, who decides WHEN a tool is called and WHAT actually runs?

  6. Question 6medium

    What does the SDK's tool runner do?

  7. Question 7medium

    How should API keys be provided to the SDK?

  8. Question 8hard

    Best practice for handling API errors?

  9. Question 9easy

    What does the `assistant` role in the messages array contain?

  10. Question 10medium

    Which are true about LLM provider APIs generally? (Select all that apply)

    Select all that apply.

  11. Question 11medium

    messages.parse() returned parsed_output = None. What does that most likely indicate?

  12. Question 12easy

    When should you stream a response?

  13. Question 13medium

    Name the message role (one word) used for instructions that set the model's overall behavior.

  14. Question 14hard

    Two words: the API property (as a general concept) meaning the API keeps no memory between calls, so you resend history.

0 / 14 answered