← mercor Interview Insights

mercor·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026Remote

Summary

Mercor ML Engineer interview that was basically one big system design question about building an LLM eval harness from scratch. No behavioral stuff, just a deep technical dive into architecture and reliability. Pretty interesting problem but a lot to cover in one session.

Questions Asked (1)

Q1

Design and implement a lightweight evaluation harness for a language model running locally via Ollama. Walk through the system design, major components, data flow, and how you'd make it reliable and extensible.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is a meaty one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (model, tasks, metrics, scale), then present a modular architecture with clear separation of concerns: task loading, model inference via Ollama API, evaluation logic, and result aggregation. Walk through the data flow from dataset to report, emphasizing reliability (retries, caching, validation) and extensibility (plugin-based metrics, config-driven tasks).

Pro tip: Mention that you'd version both the harness and the model (e.g., via Ollama model digests) to ensure reproducibility, and implement a caching layer for model responses to avoid redundant inference during iterative development.

1. Clarify Requirements and Constraints

Ask about the model(s), task types (e.g., QA, summarization), evaluation metrics, dataset size, and expected throughput. Confirm whether the harness runs locally or in CI, and any latency/cost constraints.

2. Design Modular Architecture

Outline components: Task Loader (parses YAML/JSON configs), Ollama Client (handles API calls with retries and timeouts), Evaluator (computes metrics), Result Store (saves outputs and scores), and Reporter (generates summaries). Emphasize interfaces for extensibility.

3. Define Data Flow and Execution

Describe the pipeline: load tasks -> for each sample, call Ollama API -> collect responses -> compute metrics -> aggregate results -> generate report. Include error handling and logging at each stage.

4. Address Reliability and Extensibility

Discuss retries with exponential backoff, caching responses, input validation, and deterministic seeding. For extensibility, propose plugin-based metrics and task types, and configuration-driven execution.

5. Discuss Trade-offs and Future Work

Highlight trade-offs like synchronous vs. asynchronous calls, local vs. remote evaluation, and simplicity vs. feature richness. Suggest future enhancements like parallel execution, distributed evaluation, or integration with experiment trackers.

Key Points to Mention

  • Ollama API integration: endpoints, streaming, and handling model loading/unloading
  • Modular design with clear interfaces for tasks, metrics, and model clients
  • Reliability: retries, timeouts, caching, and error handling
  • Extensibility: plugin architecture for custom metrics and task types
  • Reproducibility: versioning of model, harness, and datasets; deterministic evaluation
  • Performance considerations: batching, concurrency, and resource management

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