← Sonatus Interview Insights

Sonatus·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Interviewed for a software engineering role at Sonatus and got hit with a pretty deep system design question around building a RAG pipeline for vehicle documentation. Solid interview, covered a lot of ground from ingestion all the way through evaluation.

Questions Asked (1)

Q1

Design a RAG system to support vehicle documentation, covering ingestion of multiple file types, chunking and embedding, vector storage, hybrid retrieval, prompt construction, evaluation for faithfulness, and handling content freshness.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This was basically the whole interview rolled into one question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer as an end-to-end pipeline, starting with ingestion and chunking, then moving through embedding, storage, hybrid retrieval, and prompt construction. Emphasize evaluation for faithfulness and strategies for content freshness, tying each choice to trade-offs in latency, cost, and accuracy. Use the vehicle documentation context to illustrate domain-specific challenges like multi-modal files and versioning.

Pro tip: Proactively discuss how you would handle versioned documents and stale content—e.g., by attaching metadata and using time-decay in retrieval—since this is a common pain point in automotive documentation and shows you think beyond the happy path.

1. Ingestion and Preprocessing

Design a pipeline to ingest PDFs, HTML, images, and structured data, extracting text and metadata while handling OCR for scanned documents. Normalize content and attach source, version, and timestamp metadata for later filtering.

2. Chunking and Embedding

Choose a chunking strategy (e.g., semantic or fixed-size with overlap) that preserves context, and select an embedding model suited to technical text. Discuss trade-offs between chunk size, retrieval granularity, and computational cost.

3. Vector Storage and Hybrid Retrieval

Store embeddings in a vector database (e.g., Pinecone, Weaviate) and implement hybrid retrieval combining dense vectors with sparse methods like BM25. Explain how to fuse results and apply metadata filters for version or vehicle model.

4. Prompt Construction and Generation

Construct prompts that include retrieved context, user query, and instructions to cite sources and avoid hallucination. Discuss techniques like re-ranking, context window management, and fallback strategies when confidence is low.

5. Evaluation and Freshness

Define metrics for faithfulness (e.g., groundedness, answer relevance) and set up automated evaluation with human-in-the-loop. Implement freshness by monitoring document updates, re-indexing changed content, and using time-aware retrieval.

Key Points to Mention

  • Multi-modal ingestion: handling PDFs, images, and structured data with OCR and metadata extraction.
  • Chunking strategies: semantic vs. fixed-size, overlap, and preserving document structure.
  • Hybrid retrieval: combining dense and sparse methods, fusion techniques (e.g., RRF), and metadata filtering.
  • Prompt engineering: context injection, citation, and hallucination mitigation.
  • Faithfulness evaluation: metrics like RAGAS, human evaluation, and iterative refinement.
  • Content freshness: versioning, incremental indexing, and time-decay in retrieval scoring.

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