AWS Generative AI Developer Professional (AIP-C01) · Free practice question 6 of 12
Choosing a 1-hour prompt cache TTL
In Kelsall Tax's assistant, customers load a long tax guide into a session and often return with follow-up questions 15 to 40 minutes later. The model supports both 5-minute and 1-hour cache TTLs. How can the team keep the guide cached between those follow-ups?
- A.Leave the TTL unset, because the default keeps entries for a full day
- B.Send a dummy request every 30 minutes with a 5-minute TTL
- C.Set the ttl field to 1h on the cache checkpoint after the guide
- D.Store the guide in a guardrail so the model reads it from there
Show answer and explanation
Correct answer: C. Set the ttl field to 1h on the cache checkpoint after the guide
Why: Cache entries expire if not hit within the TTL; when follow-ups arrive after more than five minutes, the 1-hour TTL, set with the ttl field on the checkpoint for supported models, keeps the prefix available. With no ttl the default is five minutes. Pinging every 30 minutes would miss a 5-minute window. Guardrails filter content and do not hold prompt context.
More free AWS Generative AI Developer Professional (AIP-C01) questions
- Semantic chunking breakpoint threshold
- Word filters for competitor names
- AgentCore Code Interpreter sandbox
- AgentCore Browser for portals without APIs
- SCP rules for global inference profiles
- Batch job completion events
- Evaluating responses from external models
- Guardrail versions for production
- GraphRAG with Neptune Analytics
- Returning tool results in Converse
- pgvector iterative scans with filters