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
- 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?
- What if the lists are streaming — does the heap approach still work?
GenAI · LLM agents
Interview questions to prep
- Walk through ReAct: how does interleaving thought and action change behavior?
- When does Plan-and-Execute beat pure ReAct?
Interview questions to prep
- How would you design memory for a long-running personal-assistant agent?
- What invalidates a memory entry, and how do you forget gracefully without losing important state?
- A long chat loses earlier details. How would you combine summarization memory, vector memory, and short-term context?
- Why is saving everything not the same as building useful memory?
- How would you prevent semantic drift where the assistant starts relying on its own stale summaries?
Interview questions to prep
- Compare workflow vs agent — when do you NOT need an agent?
- Walk through the building-blocks: prompt chaining, routing, parallelization, orchestrator-workers — when does each apply?
Interview questions to prep
- How do you validate intermediate agent steps before allowing a high-risk tool call?
- Where do you add human approval in a support, finance, or compliance agent?
- How do you prevent prompt injection from tool outputs from hijacking the agent?
References & further reading