Data Engineering for AI Systems from First PrinciplesPost 20 of 21 · 21 of 21 written
- How to use this guide
- 01Why AI runs on data engineering
- 02Representing data: bytes, types, schemas, formats
- 03Storage: where bytes live and what reading them costs
- 04Databases from first principles
- 05Data modeling: shaping data for its readers
- 06Distributed systems: the physics of many machines
- 07Batch processing: transforming data in bulk
- 08Streaming: data that never ends
- 09Architectures: warehouse, lake, lakehouse
- 10Pipelines and orchestration
- 11Data quality, contracts, lineage and observability
- 12Data engineering for machine learning
- 13Data engineering for LLMs
- 14Data engineering for RAG and AI applications
- 15Feeding GPUs: data loading for training
- 16Governance, privacy and security
- 17Cost and performance reasoning
- 18The tool landscape, mapped to principles
- 19Learning path and hands-on projects
- 20Question bank for fluency
- 21Glossary
20. Question bank for fluency
Data Engineering · 20 of 214 min readOct 2026
Data Engineering · Post 20 of 214 min readOct 2026
Fluency means asking the right question at the right moment. Use the first two lists in design reviews and incidents; use the self-test to check your understanding, covering the answer column first.
Design review: questions for any data system
- What is the grain of each table, and who owns its schema?
- Where is the source of truth, and how many copies exist?
- How fresh must the data be, and what does each step of freshness cost?
- If any step runs twice, what happens?
- How does late or out-of-order data get handled?
- What could make the output wrong without anything failing?
- Which checks block publishing, and who is alerted?
- Can we rebuild every layer from raw data, and how long would it take?
- Can we reproduce the exact dataset behind a given model or report?
- Who can read the data, is that logged, and how is deletion handled end to end?
- What does it cost per unit, and at ten times the volume?
- Which formats are open, and what would leaving this vendor require?
Debugging: questions when something looks wrong
- When did it start, and what changed then: code, data, schema or infrastructure?
- Do row counts match at every step, in and out?
- Are there duplicates on the key that should be unique?
- Are time zones, units and precision consistent across the join?
- Is the query reading what I think it reads? What does EXPLAIN say?
- Is one partition or one key doing all the work?
- For a model: does performance differ by slice, and did input distributions shift?
- For RAG: was the right chunk retrieved at all, and if so, why did the answer still miss it?
Self-test
| Question | One-line answer | Section |
|---|---|---|
| Why do columnar formats speed up analytics? | Queries read only the columns they need, values compress well, and engines process them in vectorized batches | 2 |
| What do Parquet footers enable? | Column pruning and skipping row groups using min/max statistics | 2 |
| Why is object storage unsuitable for random small reads? | Every request pays roughly 10–100 ms of latency | 3 |
| What makes a database durable after a crash? | The write-ahead log, flushed before data pages change | 4 |
| B-tree or LSM-tree for a write-heavy workload? | LSM-tree: buffered, sequential writes with background compaction | 4 |
| What is write skew? | Two transactions each check a rule, then both write, jointly breaking it | 4 |
| Why does Type 2 history matter for ML? | It preserves what was true at prediction time, preventing temporal leakage | 5 |
| What is idempotency, and why is it central? | Running twice equals running once; it makes retries and backfills safe | 6 |
| How is “exactly once” actually achieved? | At-least-once delivery plus idempotent or transactional processing, end to end | 6 |
| Why are shuffles expensive? | Data is serialized, written to disk and sent across the network | 7 |
| What is skew, and one fix? | One key or partition dominates the work; salting splits it | 7 |
| Event time versus processing time? | When it happened versus when the system saw it | 8 |
| What does a watermark trade off? | Latency of results against completeness | 8 |
| Why is CDC better than polling updated_at? | It captures deletes and every intermediate change with little source load | 8 |
| How does a lakehouse commit stay atomic on object storage? | New files are written first, then the catalog swaps one metadata pointer atomically | 9 |
| What is write-audit-publish? | Write to staging, validate, then publish atomically only if checks pass | 10 |
| Name four kinds of leakage. | Target, temporal, preprocessing, and group leakage | 12 |
| What is training-serving skew? | Features computed differently in training and in production | 12 |
| How does MinHash estimate similarity? | The chance two documents share a minimum hash equals their Jaccard similarity | 13 |
| Why decontaminate training data? | Benchmark overlap inflates evaluation scores | 13 |
| Why combine BM25 with embeddings? | Keywords catch exact tokens such as IDs and names that embeddings blur | 14 |
| What must change when the embedding model changes? | Every vector must be recomputed; old and new vectors are incompatible | 14 |
| How do you know if training is data-bound? | The GPU waits on the data loader between steps | 15 |
| Why shard training data? | Large sequential reads avoid per-file latency | 15 |
| What does erasure require in an AI system? | Finding and deleting every copy, including indexes, logs and training sets, guided by lineage | 16 |
| What is the cheapest way to make a query faster? | Read fewer bytes: prune partitions, columns and row groups | 17 |