← Zillow Interview Insights

Zillow·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
May 2026

Summary

Zillow ML engineer interview with a coding round focused on agent architecture. The prompt was pseudocode only, which I appreciated, but the scope was bigger than I expected for a single session.

Questions Asked (1)

Q1

Write pseudocode for a ReAct-style agent loop that alternates between reasoning steps and tool-calling actions, including state management and basic safeguards like max steps and error handling.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

The pseudocode-only part was a relief but I still overcomplicated the state structure early on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the ReAct loop's core components: reasoning, action, observation, and state. Then outline pseudocode with clear state management, max steps, and error handling, emphasizing modularity and observability. Finally, discuss trade-offs like step limits and error recovery strategies.

Pro tip: Mention that you'd log each reasoning step and tool call for debugging and evaluation, and consider using a timeout per tool call to prevent hangs. This shows production awareness beyond basic pseudocode.

1. Define State and Initialization

Initialize a state object to track the conversation history, current step count, and any intermediate results. Set a maximum step limit to prevent infinite loops.

2. Reasoning Step

At each iteration, generate a thought based on the current state, deciding whether to call a tool or produce a final answer. This is typically done by an LLM.

3. Action and Observation

If a tool is chosen, execute it with the given arguments, capture the result or error, and append the observation to the state. Handle tool errors gracefully.

4. Loop Control and Termination

Increment the step count and check if the max steps is reached or if a final answer is produced. If so, exit the loop and return the result.

5. Error Handling and Safeguards

Implement try-catch around tool calls, log errors, and optionally retry or fallback. Also include a timeout for each step to avoid hanging.

Key Points to Mention

  • State management: maintaining conversation history, step count, and intermediate results.
  • Max steps safeguard: preventing infinite loops and controlling cost.
  • Error handling: catching tool errors, logging, and deciding whether to retry or abort.
  • Tool call timeout: ensuring individual actions don't block indefinitely.
  • Observability: logging reasoning steps and tool calls for debugging and evaluation.
  • Trade-offs: balancing step limit vs. task complexity, and error recovery vs. simplicity.

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