Day 85 of 133

LLM agents: ReAct, Plan-and-Execute, memory + DSA review

When to use an agent; designing memory for long-running agents.

DSA · NeetCode Linked List

  • Merge K Sorted ListsDSA · Linked List

    Interview questions to prep

    1. Compare divide-and-conquer (pairwise merge, O(N log k)) vs heap-of-k-heads (also O(N log k)) — when does each win in practice?
    2. What if the lists are streaming — does the heap approach still work?

GenAI · LLM agents

  • ReAct, Plan-and-ExecuteGenerative AIYao et al.

    Interview questions to prep

    1. Walk through ReAct: how does interleaving thought and action change behavior?
    2. When does Plan-and-Execute beat pure ReAct?
  • Interview questions to prep

    1. How would you design memory for a long-running personal-assistant agent?
    2. What invalidates a memory entry, and how do you forget gracefully without losing important state?
    3. A long chat loses earlier details. How would you combine summarization memory, vector memory, and short-term context?
    4. Why is saving everything not the same as building useful memory?
    5. How would you prevent semantic drift where the assistant starts relying on its own stale summaries?
  • Interview questions to prep

    1. Compare workflow vs agent — when do you NOT need an agent?
    2. Walk through the building-blocks: prompt chaining, routing, parallelization, orchestrator-workers — when does each apply?
  • Interview questions to prep

    1. How do you validate intermediate agent steps before allowing a high-risk tool call?
    2. Where do you add human approval in a support, finance, or compliance agent?
    3. How do you prevent prompt injection from tool outputs from hijacking the agent?

References & further reading