Question 4 of 5

Why was an answer cut off, and how do you distinguish completion from a limit?

An answer looks almost complete, but the application cannot parse its final record. Is increasing the output length enough?

You request the names of five cities and receive two names followed by half of a third. Generation may have reached its output limit. If the service reports why it stopped, inspect that information before saving the list. Otherwise a partial response can easily be mistaken for the entire result.

WHERE TO START

How could the application tell that a list ended halfway through?

What to know before this question
Topic example · What goes into a request

Insert a message before the last one. What will the loop print?

messages = ["Hello", "Remember ticket 17"]
for message in messages:
    print(message)
Line notes
  1. Keep the text of two messages in order.
  2. Visit each message we plan to send.
  3. Display the current message.

How would you rate your understanding?

This is your self-assessment. Progress is saved in this browser.

Not rated yet

← Back to Your first AI application