A 311 agent stores short-lived conversation memory in Cosmos DB alongside long-lived knowledge chunks. How should TTL be applied?
Select an answer to reveal the explanation.
Short Explanation
TTL is the sticky note on the fridge for tonight’s 311 chat—let memory expire—while the policy binder (knowledge chunks) stays on the shelf without that short fuse.
Full Explanation
Cosmos DB time-to-live (TTL) can expire items automatically. For a 311 agent, apply TTL to short-lived conversation memory items so session context ages out, while leaving long-lived knowledge chunks used for RAG without that short TTL. Separating ephemeral agent state from durable municipal knowledge prevents policy and FAQ content from disappearing when chat memory should expire.
Setting the same short TTL on knowledge chunks and conversation memory causes the RAG corpus to evaporate with chat sessions—breaking grounded answers. Disabling TTL everywhere and manually purging knowledge during every rush hour is operationally fragile and confuses memory cleanup with knowledge management. Storing conversation memory only in public CDN edge caches with no retention policy leaks civic interaction data and lacks Cosmos TTL semantics.
Exam caveat: TTL is evaluated per item (or container default); design distinct item types or containers so memory and knowledge lifecycle policies do not collide. Operational check: create sample memory items with short TTL and knowledge items without it, verify memory expiry in the account, confirm knowledge chunks remain queryable after the TTL window, and audit that no PII-heavy 311 transcripts are retained beyond the city’s retention policy.