certslothcertsloth
PAA/Topic 03

Google Cloud / Professional · Upcoming

Custom agents, memory and retrieval

2 min read5 recall promptsReviewed 2026-10-10

Memory hook: Session is now; memory is selected history.

Must remember

  • ADK supports custom agent composition and tools. Choose large/small, managed/self-hosted and open/proprietary models according to task quality, security, latency, cost and operational control.
  • Session state holds current interaction context; durable memory retains selected information across sessions. Managed sessions and Memory Bank help with lifecycle, but applications still need user/tenant isolation and deletion rules.
  • RAG pipelines ingest, chunk, embed, retrieve, filter and rerank. Evaluate recall and relevance separately from generated-answer quality; use metadata and identity filters before exposing evidence.
  • Agent Retrieval/Vector Search and database-backed retrieval serve different scale and access patterns. Keep embedding versions, index freshness and source identifiers aligned.
  • Tools expose explicit schemas and bounded capabilities. Validate arguments and results, use timeouts and safe retries, and distinguish read-only retrieval from irreversible business actions.
  • Agent Identity/Registry and supported MCP servers help discover and authorize capabilities. Discovery is not an access grant; authenticate each call and propagate the user context when needed.

Choose under exam pressure

Requirement Choice and reason
Remember a preference across sessions A scoped durable memory record with consent, provenance and expiry where appropriate.
Retrieve current internal facts Permission-aware RAG rather than relying on model weights.

Traps

  • A long context window is not a durable database.
  • Similarity search alone cannot guarantee exact entity identity or authorized access.

Active recall

1. What distinguishes session state from long-term memory?

Session state supports the current interaction; long-term memory deliberately persists selected information.

2. Why rerank retrieved passages?

To improve relevance ordering after an initial broader retrieval.

3. What should a tool schema constrain?

Permitted arguments, types and required fields, supplemented by authorization and business validation.

4. How avoid cross-tenant memory leakage?

Enforce tenant/user partitioning and authorization on writes, retrieval and caches.

5. Why retain source identifiers?

To cite evidence, refresh changed content and remove deleted or unauthorized data.

Sources

CLOSE THE NOTES. EXPLAIN THE CHOICE.

How well could you recall it?

Your next review is based on this answer. Progress stays in this browser.

Search across every published topic.