Bird
0
0

You want to design an AI chatbot that remembers the last 500 tokens of conversation. The model has a context window of 300 tokens. What is a good approach?

hard📝 Application Q15 of 15
AI for Everyone - How AI Models Actually Work
You want to design an AI chatbot that remembers the last 500 tokens of conversation. The model has a context window of 300 tokens. What is a good approach?
ASplit the conversation into 300-token chunks and send all at once
BSend only the last 300 tokens each time to the AI
CIncrease the context window to 500 tokens or more
DIgnore the context window and send all 500 tokens anyway
Step-by-Step Solution
Solution:
  1. Step 1: Understand context window limits and memory needs

    The AI can only consider up to its context window tokens at once, here 300 tokens, but you want to remember 500 tokens.
  2. Step 2: Find solution to match memory with context window

    To remember 500 tokens, the context window must be at least 500 tokens; increasing it is the correct approach.
  3. Final Answer:

    Increase the context window to 500 tokens or more -> Option C
  4. Quick Check:

    Context window must fit tokens to remember [OK]
Quick Trick: Context window must be large enough to hold all tokens [OK]
Common Mistakes:
  • Sending more tokens than context window allows
  • Trying to send multiple chunks at once
  • Ignoring context window limits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AI for Everyone Quizzes