Skip to main content

Posts

Showing posts from October, 2026

Evaluation Datasets & Regression Testing for RAG

Reliable Retrieval-Augmented Generation (RAG) applications need more than a few example prompts. They need a representative, versioned evaluation dataset that tests whether the system retrieves the right evidence and produces accurate, grounded, safe answers. A good evaluation process helps teams compare chunking strategies, embedding models, prompts, and retrieval configurations without relying only on subjective impressions. Interview framework Explain the evaluation objective, representative query coverage, trusted reference evidence, separate retrieval and answer metrics, leakage controls, repeatable test runs, and decision criteria for accepting a change. 1. How would you create an evaluation dataset for an enterprise RAG application? Answer: I would start from real user tasks and business risks, then create a curated, versioned set of queries with trusted evidence and expected outcomes. The dataset should represent both common requests and high-impact edge cases. Define t...

Feature Engineering & Feature Stores

1. How would you design a feature pipeline for a fraud detection system? Answer: Design around the model's latency and risk requirements. Fraud detection commonly combines historical behavior with near-real-time transaction signals. Ingest events: capture transactions, account changes, device signals, and reference data. Validate schemas and retain event IDs and timestamps. Stream reliably: use a durable event platform such as Kafka or Pub/Sub; handle duplicates, retries, late arrivals, and malformed records. Compute features: calculate transaction counts and sums over 5-minute, 1-hour, and 24-hour windows, distinct devices, account age, and historical risk indicators. Use streaming for low-latency features and batch for large historical aggregates. Preserve training/serving parity: use governed feature definitions and point-in-time-correct historical joins. Store appropriately: maintain historical feature values in an offline store and low-latency latest values in an onl...

Vector Databases & Semantic Search

Semantic search retrieves content based on meaning rather than requiring exact keyword matches. Vector databases make this practical at scale, but production systems must balance retrieval quality, latency, cost, freshness, filtering, and operational complexity. These questions focus on the design decisions behind reliable vector retrieval. 1. What is an embedding, and how is it used in semantic search? Answer: An embedding is a numerical vector that represents content—such as text, an image, or another object—in a learned semantic space. An embedding model maps similar meanings to vectors that are close under a chosen similarity or distance measure. How semantic search works Prepare content: Clean and chunk documents into meaningful searchable units. Generate document vectors: Pass each chunk through an embedding model and store its vector with a stable ID and metadata. Embed the query: Convert the user's query into a vector using a compatible model and configuration....

Data Modeling Interview Questions and Answers

Prepare for data engineering interviews with practical explanations of dimensional modeling, star and snowflake schemas, SCD Type 2, late-arriving data, many-to-many relationships, fact table grain, and denormalization. How to use this guide: Start with the concise interview answer, walk through the example, and explain the tradeoffs. Real interviewers want to hear how you would apply the concepts, not just definitions. 1. How would you design a dimensional model for an e-commerce business? Interview answer: Begin with the business processes and analytical questions, not the table names. For e-commerce, typical processes are order placement, payment, shipment, return, and inventory snapshots. Define a separate fact table at the appropriate grain for each process and connect it to conformed dimensions. Example dimensional model Table Grain Example columns fact_order_line One line item on an order order_id, line_id, customer_key, product_key, order_date_key, quantity, net_sales fact_...