Bird
0
0

Which strategy best balances memory use and speed?A.

hard📝 Application Q15 of 15
Agentic AI - Production Agent Architecture

You want to speed up an AI agent that processes user queries by caching results. Which strategy best balances memory use and speed?

  • A. Cache all results forever.
  • B. Cache only recent results with a size limit.
  • C. Never cache, always compute fresh results.
  • D. Cache results but never check before computing.
ACache only recent results with a size limit.
BCache all results forever.
CNever cache, always compute fresh results.
DCache results but never check before computing.
Step-by-Step Solution
Solution:
  1. Step 1: Understand caching trade-offs

    Caching all results forever uses unlimited memory, which is impractical.
  2. Step 2: Choose a balanced caching strategy

    Limiting cache size to recent results saves memory and keeps speed benefits.
  3. Final Answer:

    Cache only recent results with a size limit. -> Option A
  4. Quick Check:

    Limited cache balances memory and speed [OK]
Quick Trick: Limit cache size to keep memory use reasonable [OK]
Common Mistakes:
  • Caching everything without limit
  • Not checking cache before computing
  • Skipping caching entirely

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Agentic AI Quizzes