← HarveyAI Interview Insights

HarveyAI·Software Engineer·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

HarveyAI software engineering interview centered on a file storage system design problem, with a pretty interesting follow-up that pushed into distributed systems territory. The core problem felt manageable but the second part is where things got real.

Questions Asked (2)

Q1

Design a file storage system ('The Vault') that supports adding files, reading files, deleting files, and listing files under a given directory path.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

I started with a trie-like structure for the directory tree and a hash map for file contents.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (file size limits, concurrency, consistency, scale) and then design a hierarchical namespace using a tree-like structure. Propose a data model (e.g., inodes or a directory table) and discuss trade-offs between simplicity and scalability, covering operations like add, read, delete, and list. Finally, address non-functional aspects like durability, availability, and performance optimizations.

Pro tip: Demonstrate awareness of real-world constraints by discussing how to handle large files (e.g., chunking) and concurrent access (e.g., locking or versioning), and mention how HarveyAI's domain (legal AI) might require strong audit trails and access controls.

1. Clarify Requirements

Ask questions to understand scale, file sizes, concurrency, consistency, and security needs. This ensures the design meets actual expectations.

2. High-Level Design

Outline the core components: a metadata store for directory hierarchy and a blob store for file contents. Sketch the API and data flow for each operation.

3. Data Model & Operations

Detail how to represent directories and files (e.g., inodes, adjacency lists) and implement add, read, delete, and list efficiently. Discuss indexing for fast lookups.

4. Scalability & Reliability

Address partitioning, replication, and consistency models. Explain how to handle failures, backups, and concurrent modifications.

5. Trade-offs & Optimizations

Compare design choices (e.g., SQL vs NoSQL, monolithic vs distributed) and suggest optimizations like caching, chunking, and lazy deletion.

Key Points to Mention

  • Hierarchical namespace representation (tree, inodes, or directory table)
  • Efficient listing of files under a directory (indexing, prefix search)
  • Handling large files via chunking and deduplication
  • Concurrency control (locking, versioning, or optimistic concurrency)
  • Durability and availability (replication, erasure coding, backups)
  • Security and access control (permissions, encryption, audit logs)

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

Q2

Given two separate instances of the vault (two replicas), design an efficient strategy to determine whether their file contents are consistent, minimizing the amount of data you need to transfer.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the constraints: file sizes, number of files, network bandwidth, and whether the vaults are static or changing. Then propose a hierarchical comparison strategy: first compare metadata (file lists, sizes, timestamps), then use cryptographic hashes (e.g., Merkle trees) to identify differing files, and finally transfer only the differing blocks or files. Emphasize minimizing data transfer by leveraging incremental hashing and possibly probabilistic data structures like Bloom filters for initial screening.

Pro tip: Mention that you would use a Merkle tree to efficiently compare large numbers of files, and that you can further optimize by comparing hashes of file chunks to pinpoint differences within a file, transferring only the mismatched chunks. Also, discuss trade-offs between hash collision probability and hash size, and consider using a secure hash like SHA-256.

1. Clarify Requirements and Constraints

Ask about the number and size of files, network bandwidth, whether the vaults are static or dynamic, and the acceptable probability of false positives/negatives. This determines the appropriate strategy.

2. Compare Metadata First

Exchange file lists with sizes and modification timestamps to quickly identify files that are likely different. This is a low-cost initial filter.

3. Use Hierarchical Hashing (Merkle Tree)

Build a Merkle tree over the files (or file chunks) on each replica. Compare the root hashes; if they differ, recursively compare child hashes to efficiently locate differing files or chunks.

4. Transfer Only Differences

Once differing files or chunks are identified, transfer only those from one replica to the other (or to a third party) to synchronize. Optionally, use delta encoding to send only the changed bytes.

5. Discuss Trade-offs and Optimizations

Consider trade-offs: Merkle tree depth vs. number of round trips, hash size vs. collision risk, and whether to use Bloom filters for an initial probabilistic check. Also mention handling of dynamic changes during comparison.

Key Points to Mention

  • Merkle trees for efficient hierarchical comparison
  • Cryptographic hashes (e.g., SHA-256) for content fingerprinting
  • Metadata comparison (file sizes, timestamps) as a first filter
  • Chunk-level hashing to minimize data transfer within large files
  • Trade-offs between hash collision probability and hash size
  • Handling dynamic changes and consistency during comparison (e.g., snapshots or versioning)

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