← American Express Interview Insights

American Express·AI Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Had a deep-dive technical screen at Amex for an AI Engineer role, basically one long question about how memory works in AI agents. Pretty niche topic and the interviewer clearly knew their stuff, so there was nowhere to hide.

Questions Asked (8)

Q1

How does short-term or working memory function in an AI agent, and what are its limitations?

System DesignTechnical Trade-offs
Author's notes

I talked about the context window being the agent's active workspace and how everything outside it is effectively invisible unless you retrieve it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining short-term/working memory in AI agents as the context window or state buffer that holds recent interactions and task-relevant information. Then explain how it functions (e.g., attention mechanisms, recurrent states) and discuss limitations like capacity constraints, forgetting, and cost. Finally, tie it to system design trade-offs and potential mitigations.

Pro tip: Emphasize that working memory in AI agents is not just about size but about effective management—highlight techniques like summarization, retrieval-augmented generation, and memory networks to show depth. Also, relate it to real-world constraints like latency and cost in production systems, which resonates with American Express's focus on scalable, reliable AI.

1. Define working memory in AI agents

Explain that it's the component that temporarily stores and manipulates information needed for immediate tasks, analogous to human working memory. Mention common implementations like context windows in LLMs or hidden states in RNNs.

2. Describe how it functions

Discuss mechanisms such as attention (e.g., transformer self-attention), recurrent loops, or external memory modules. Highlight how information is encoded, maintained, and retrieved during task execution.

3. Identify key limitations

Cover capacity limits (fixed context length), degradation over long sequences (e.g., lost-in-the-middle), computational cost (quadratic attention), and inability to persist beyond session. Also mention challenges with irrelevant information and forgetting.

4. Discuss trade-offs and mitigations

Explain trade-offs between memory size, latency, and cost. Propose solutions like summarization, retrieval-augmented generation, hierarchical memory, or external databases to extend effective memory.

5. Relate to system design and American Express context

Connect to real-world implications: e.g., in customer service agents, working memory must handle multi-turn dialogues without losing context, while balancing cost and response time. Mention compliance and data privacy considerations if relevant.

Key Points to Mention

  • Context window limitations in large language models (e.g., token limits, performance degradation with length)
  • Attention mechanisms and their quadratic complexity as a bottleneck
  • Techniques like summarization, retrieval-augmented generation (RAG), and memory networks to augment working memory
  • Trade-offs between memory capacity, inference latency, and computational cost
  • Differences between short-term memory in AI and human working memory (e.g., no true consolidation, lack of episodic memory)
  • Real-world impact: maintaining conversation state, personalization, and task continuity in production AI systems

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you design long-term memory for an agent that needs to persist information across sessions?

System DesignData Modeling
Author's notes

This is where I felt more comfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the agent's requirements and constraints, then propose a layered memory architecture that balances short-term context with long-term persistence. Focus on data modeling, storage choices, retrieval mechanisms, and how to handle updates and conflicts, while addressing scalability and compliance needs.

Pro tip: Emphasize the importance of memory consolidation and forgetting mechanisms to prevent unbounded growth and maintain relevance, and discuss how you would evaluate the memory system's impact on agent performance.

1. Clarify Requirements and Constraints

Ask questions to understand the agent's use cases, data types, volume, latency, privacy, and compliance requirements (e.g., GDPR, PCI-DSS for American Express).

2. Design Memory Architecture

Propose a multi-tiered memory system: short-term (session context), long-term (persistent storage), and possibly episodic/semantic memory. Choose appropriate storage technologies (e.g., vector DB, relational DB, key-value store).

3. Define Data Model and Schema

Outline how memories are represented (e.g., embeddings, structured records), including metadata like timestamps, source, confidence, and access patterns.

4. Implement Retrieval and Update Mechanisms

Describe how the agent retrieves relevant memories (e.g., similarity search, recency, importance) and updates them (e.g., consolidation, conflict resolution, forgetting).

5. Address Scalability, Security, and Evaluation

Discuss scaling strategies (sharding, caching), security (encryption, access control), and how to measure effectiveness (e.g., task success, latency, memory hit rate).

Key Points to Mention

  • Vector databases for semantic retrieval of memories
  • Memory consolidation and forgetting policies to manage growth
  • Handling conflicts and updates in long-term memory
  • Compliance with data privacy regulations (GDPR, CCPA)
  • Latency and cost trade-offs in memory retrieval
  • Evaluation metrics for memory system performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

What is the difference between episodic and semantic memory in the context of an AI agent, and how would you implement each?

System DesignTechnical Trade-offs
Author's notes

Episodic is specific past interactions, semantic is accumulated facts and skills.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining episodic and semantic memory in cognitive science terms, then map them to AI agent architectures. For each, describe implementation approaches, data structures, and retrieval mechanisms, and discuss trade-offs in a financial services context like American Express.

Pro tip: Emphasize how episodic memory enables personalized, context-aware interactions (e.g., remembering past customer issues), while semantic memory provides stable, factual knowledge (e.g., policies), and highlight the importance of balancing both for robust AI agents in regulated industries.

1. Define the concepts

Briefly explain episodic memory as storage of specific events/experiences with temporal and contextual details, and semantic memory as general world knowledge and facts independent of personal experience.

2. Map to AI agent architecture

Describe how episodic memory can be implemented as a time-indexed event store (e.g., vector database with timestamps) and semantic memory as a knowledge graph or embedding-based retrieval over static documents.

3. Implementation details

For episodic: use sequence models (e.g., RNNs, transformers) with memory networks or external memory like Redis with TTL. For semantic: use pre-trained language models, knowledge graphs (e.g., Neo4j), or vector databases (e.g., Pinecone) for similarity search.

4. Discuss trade-offs

Compare storage costs, retrieval speed, update frequency, and accuracy. Episodic memory is dynamic and personalized but can be noisy; semantic memory is stable and scalable but may lack context.

5. Relate to American Express use cases

Give examples: episodic memory for remembering customer interactions to provide continuity; semantic memory for compliance rules, product info, and fraud patterns.

Key Points to Mention

  • Definition of episodic vs. semantic memory from cognitive psychology
  • Implementation using vector databases, knowledge graphs, and memory networks
  • Retrieval mechanisms: similarity search vs. structured queries
  • Trade-offs: personalization vs. generalization, storage vs. speed, update frequency
  • Integration with LLMs and RAG (Retrieval-Augmented Generation) for both memory types
  • Regulatory and privacy considerations in financial services (e.g., PII handling in episodic memory)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Walk me through different retrieval strategies for agent memory and when you'd pick one over another.

System DesignTechnical Trade-offs
Author's notes

Went through vector store similarity search, structured DB lookups for deterministic queries, and hierarchical summaries for compressing old context.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by categorizing retrieval strategies into semantic, keyword, hybrid, and graph-based approaches, then explain the trade-offs in terms of accuracy, latency, cost, and scalability. Use a decision framework that ties each strategy to specific agent memory use cases, such as short-term conversational context vs. long-term factual recall, and emphasize how you'd evaluate and iterate based on metrics.

Pro tip: Always anchor your answer in the agent's specific requirements—like real-time response needs or compliance constraints—and mention that you'd start with a simple baseline (e.g., vector search) before adding complexity, showing you prioritize pragmatism over buzzwords.

1. Categorize retrieval strategies

Briefly list the main types: dense (semantic) retrieval, sparse (keyword) retrieval, hybrid, and graph-based or structured retrieval. Explain that each serves different memory access patterns.

2. Map strategies to memory types

Connect each strategy to agent memory types: short-term (conversation buffer) often uses recency or keyword; long-term (episodic/semantic) uses dense or hybrid; relational memory uses graph-based.

3. Evaluate trade-offs

Discuss trade-offs: dense retrieval excels at semantic similarity but can miss exact matches and is costlier; sparse is fast and precise but lacks semantic understanding; hybrid balances both; graph-based captures relationships but requires structured data.

4. Apply a decision framework

Propose criteria for selection: query type (semantic vs. keyword), latency requirements, data volume, and update frequency. For example, use hybrid for general Q&A, graph for multi-hop reasoning.

5. Include evaluation and iteration

Mention how you'd measure performance (e.g., recall@k, latency, cost) and iterate—starting simple and adding complexity only when metrics justify it.

Key Points to Mention

  • Dense retrieval (e.g., embeddings with FAISS) for semantic similarity in long-term memory.
  • Sparse retrieval (e.g., BM25) for exact keyword matching and low-latency needs.
  • Hybrid retrieval combining dense and sparse for robust performance.
  • Graph-based retrieval for relational or multi-hop queries in structured memory.
  • Trade-offs: accuracy vs. latency, cost, and scalability.
  • Evaluation metrics like recall@k, MRR, and latency to guide strategy selection.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you handle forgetting or compaction in an agent's memory to keep it from growing unbounded?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a memory management challenge with trade-offs between recall accuracy, latency, and cost. Then propose a tiered architecture combining summarization, importance-based retention, and periodic compaction, and discuss how to evaluate and tune it for American Express's use case.

Pro tip: Emphasize that forgetting is a feature, not a bug—design intentional decay policies and measure their impact on downstream task success. Also, mention that compaction should be idempotent and versioned to allow rollback if quality degrades.

1. Clarify requirements and constraints

Ask about the agent's use case, memory size limits, latency requirements, and regulatory constraints (e.g., financial data retention). This ensures your solution aligns with business needs.

2. Design a tiered memory architecture

Propose short-term (episodic) and long-term (semantic) memory stores, with different retention policies. Use summarization and embedding-based retrieval to compress and access information efficiently.

3. Define forgetting and compaction strategies

Implement importance scoring (e.g., recency, frequency, relevance) to decide what to forget. Use periodic compaction (e.g., clustering and summarization) to merge redundant memories and reduce size.

4. Address trade-offs and evaluation

Discuss trade-offs between memory size, retrieval accuracy, and computational cost. Propose metrics (e.g., task success rate, memory footprint) and A/B testing to validate the approach.

5. Ensure robustness and compliance

Mention safeguards like versioning, audit logs, and fallback mechanisms. For American Express, highlight data privacy and regulatory compliance (e.g., GDPR, CCPA).

Key Points to Mention

  • Importance-based retention using recency, frequency, and relevance scores
  • Summarization and embedding-based compression for long-term memory
  • Periodic compaction via clustering and merging of similar memories
  • Trade-offs between memory size, latency, cost, and recall accuracy
  • Evaluation metrics and A/B testing to tune forgetting policies
  • Compliance with data retention regulations and auditability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you design the read and write APIs for an agent memory system?

System DesignAPI & Integrations
Author's notes

Talked about a write API that accepts key-value or embedding pairs with metadata, and a read API that supports both exact lookup and semantic search.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the agent memory system, such as data types, access patterns, and consistency needs. Then propose a high-level API design that separates read and write operations, and dive into key design decisions like data modeling, indexing, and scalability. Finally, discuss trade-offs and how you would handle edge cases like concurrent writes and memory eviction.

Pro tip: Emphasize idempotency and versioning for write APIs to handle retries and concurrent updates gracefully, and consider read-your-writes consistency for a better user experience. Also, mention how you would monitor and evolve the API over time.

1. Clarify Requirements

Ask questions to understand the use case: What kind of agent? What memory types (episodic, semantic)? Expected read/write ratio, latency, and consistency requirements? This ensures the design meets actual needs.

2. Define Data Model and Storage

Propose a data model for memories (e.g., key-value with metadata, or graph-based for relationships) and choose appropriate storage (e.g., vector DB for embeddings, relational for structured data). Explain how this influences API design.

3. Design Write API

Outline endpoints for creating, updating, and deleting memories. Include parameters like agent_id, memory_type, content, and metadata. Discuss idempotency, versioning, and batch operations.

4. Design Read API

Define endpoints for retrieving memories by ID, querying by filters (time range, type, tags), and semantic search. Consider pagination, sorting, and consistency levels (e.g., strong vs eventual).

5. Address Scalability and Reliability

Discuss partitioning, caching, rate limiting, and handling failures. Mention how to ensure data durability and how to evolve the API without breaking clients.

Key Points to Mention

  • Idempotency keys for write operations to safely handle retries
  • Versioning of memories to manage updates and conflicts
  • Efficient indexing and querying, including vector search for semantic retrieval
  • Consistency models (e.g., read-your-writes, eventual consistency) and their trade-offs
  • Pagination and filtering for large result sets
  • Security and access control (authentication, authorization, data isolation per agent)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How do you handle consistency and conflicts when multiple agents or sessions share the same memory store?

System DesignTechnical Trade-offs
Author's notes

This was the hardest part of the whole conversation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the memory model (shared vs. partitioned) and the consistency requirements (strong vs. eventual) based on the use case. Then describe a layered approach: conflict detection, resolution strategies, and consistency mechanisms, emphasizing trade-offs between latency, accuracy, and complexity. Finally, tie it to American Express's need for reliable, auditable AI systems by mentioning monitoring and fallback strategies.

Pro tip: Show maturity by acknowledging that perfect consistency is often impractical in multi-agent systems; instead, propose a pragmatic mix of optimistic concurrency with conflict resolution and eventual consistency where acceptable, backed by clear SLAs.

1. Clarify Requirements and Constraints

Ask about the memory store's role (e.g., factual knowledge, session state) and the required consistency level (strong vs. eventual) given latency and availability needs.

2. Choose a Consistency Model

Select a model (e.g., strong consistency via distributed locks, eventual consistency via CRDTs or version vectors) based on trade-offs and the criticality of data.

3. Implement Conflict Detection and Resolution

Use versioning, timestamps, or vector clocks to detect conflicts; resolve via last-write-wins, merge policies, or human-in-the-loop for high-stakes decisions.

4. Design for Scalability and Fault Tolerance

Partition memory where possible, use quorum-based reads/writes, and ensure idempotent operations to handle retries and partial failures.

5. Monitor, Audit, and Iterate

Instrument conflict rates and consistency violations; log all changes for auditability; continuously refine policies based on observed patterns.

Key Points to Mention

  • CAP theorem and its implications for distributed memory stores
  • Conflict resolution strategies: last-write-wins, CRDTs, operational transformation, and merge functions
  • Versioning mechanisms: vector clocks, Lamport timestamps, and optimistic concurrency control
  • Consistency models: strong, eventual, causal, and session guarantees
  • Trade-offs between latency, availability, and consistency in multi-agent systems
  • Real-world examples: how databases like Redis, Cassandra, or DynamoDB handle consistency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

How would you evaluate whether an agent's memory is actually working well in production?

System DesignA/B Testing & Experimentation
Author's notes

Talked about recall precision, checking if the agent surfaces the right memories given a query, and also downstream task success rate as a proxy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining what 'working well' means for the agent's memory in terms of business and user outcomes, then propose a multi-layered evaluation combining offline metrics, online A/B tests, and production monitoring. Emphasize the need for both quantitative metrics (e.g., retrieval accuracy, task success) and qualitative signals (e.g., user feedback, error analysis) to get a holistic view.

Pro tip: Tie memory evaluation directly to business KPIs like customer satisfaction or resolution rate, and highlight the importance of setting up guardrail metrics to detect regressions early. Also, mention that memory effectiveness can degrade over time due to data drift, so continuous monitoring is key.

1. Define success criteria and metrics

Clarify what 'working well' means for the agent's memory in the context of American Express, such as improved personalization, reduced repetition, or higher task completion. Select both direct memory metrics (e.g., recall@k, precision) and downstream business metrics (e.g., customer effort score, containment rate).

2. Offline evaluation with curated datasets

Use historical interaction logs to create labeled datasets for memory retrieval and utilization. Measure how often the agent retrieves relevant past information and uses it correctly to answer queries or complete tasks.

3. Online A/B testing with control groups

Deploy the memory-enabled agent against a baseline (e.g., no memory or simpler memory) in a controlled experiment. Randomize users and compare key metrics to isolate the memory's impact, ensuring statistical significance.

4. Production monitoring and anomaly detection

Set up dashboards to track memory-related metrics in real-time, such as hit rate, latency, and error rates. Use anomaly detection to alert on sudden drops in performance or shifts in user behavior.

5. Qualitative analysis and iterative improvement

Regularly sample and review agent-user conversations to identify memory failures (e.g., forgetting context, retrieving irrelevant info). Incorporate user feedback and conduct root cause analysis to drive improvements.

Key Points to Mention

  • Define clear, business-aligned success metrics for memory (e.g., task success rate, customer satisfaction).
  • Use offline evaluation with labeled data to measure retrieval accuracy and relevance.
  • Conduct online A/B tests with proper randomization and guardrail metrics to measure causal impact.
  • Monitor production metrics continuously and set up alerts for degradation.
  • Perform qualitative error analysis and user feedback loops to catch subtle memory issues.
  • Consider memory-specific challenges like data drift, privacy, and latency that can affect performance.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.