Technical Writing and Documentation Questions
The craft of producing durable, reference-quality written artifacts and keeping them accurate: READMEs and quick-start guides, design docs, RFCs and technical proposals, runbooks and deployment guides, model cards, datasheets and data dictionaries, bug reports and reproducible examples, postmortem write-ups, handoff documents, pull request descriptions, code comments, release notes, experiment reports, and knowledge-base articles. Covers structure and information design, writing for a specific audience and for future readers (including plain language and accessibility), templates and style standards, docs-as-code workflows with CI checks, testing of examples and snippets, documentation review and quality checks, versioning and freshness checks on the documents you own, keeping sensitive data out of docs, and measuring whether documentation works. Architecture decision records, API reference docs, PRDs and PR/FAQs, and live presentations are covered elsewhere.
Here is an excerpt from a postmortem executive summary: 'We saw performance drop last week due to model weirdness. Engineers fixed something. Customers had issues. Will update later.' List the concrete improvements you would make and rewrite it.
Sample Answer
Direct answer. The excerpt fails because a reader learns nothing they can act on: no dates, no size of the problem, no cause, no customer impact, no status, no next date. Every sentence is vague ("weirdness", "something", "issues") and it hides ownership. An executive summary must let a busy reader decide, in 30 seconds, whether they need to do anything.
Concrete improvements (what each sentence is missing)
- Replace "last week" with exact dates and duration (start, end, timezone).
- Replace "performance drop" with the metric, the baseline and the size of the drop, with a range if uncertain.
- Replace "model weirdness" with the cause in plain language, and mark clearly what is confirmed versus suspected.
- Replace "engineers fixed something" with what was done (reverted, retrained, patched) and how we know it worked.
- Quantify customer impact: how many, which segment, what they experienced, what we are doing for them.
- State the current status (resolved, mitigated, monitoring) and the exact time of the next update. "Will update later" gives no commitment.
- Name the follow-up and who owns it, and keep a blameless tone (say "a change to the feature pipeline", not a person).
- Define terms for a non-ML reader (for example, "recommendation quality score") and lead with the conclusion.
Rewrite (illustrative facts, to be replaced by the real ones)
Summary. From 3 to 10 June (UTC), our product recommendations were less relevant for customers on mobile. Click-through on recommendations fell from its usual level of about 4.0% to about 3.1%. Estimated affected users: 15,000 to 20,000, based on a labeled sample and traffic logs.
Cause (confirmed). A change to how one input, the customer's recent-views list, was computed sent the model stale data for mobile sessions. The model itself was unchanged.
Resolution. We reverted the change on 10 June at 09:40 UTC; click-through returned to normal by 12:00 UTC and has stayed there for 24 hours.
Customer impact and action. No customer data was exposed. Customers saw less relevant suggestions; no orders were lost that we can measure. No customer action is needed.
What we are changing. Add automatic checks on input data for all models (owner: ML Platform, due 30 June).
Next update: 17 June, 10:00 UTC, with the full postmortem.
Note the rewrite is about 150 words (I counted 153 including the bold labels), so it still reads in under a minute, separates confirmed from estimated, and ends with a date the reader can hold us to.
Which improvement fixes which sentence.
| Original sentence | Fixed by | Where it lands in the rewrite |
|---|---|---|
| "performance drop last week" | 1, 2, 8 | Summary: exact dates, metric, baseline and size of drop |
| "due to model weirdness" | 3, 8 | Cause (confirmed): plain-language cause |
| "Engineers fixed something" | 4, 7 | Resolution and What we are changing |
| "Customers had issues" | 5 | Customer impact and action |
| "Will update later" | 6 | Next update: date and time |
Terms. A feature pipeline is the automated job that prepares the inputs a model reads (here, the recent-views list). Feature drift or distribution shift means those inputs change shape over time, so the model sees data unlike what it learned on. Both are engineering words; the rewrite says "stale data" instead. A labeled sample is a few hundred sessions that people checked by hand to see whether the suggestions were actually stale; if, say, most checked mobile sessions in the window were affected, that share is applied to the traffic logs' count of mobile users to get a range like 15,000 to 20,000. State that basis and keep it a range.
Pitfalls. Over-correcting into jargon ("feature drift caused distribution shift") that executives cannot use; false precision when the number is an estimate (give a range and its basis); implying blame. If the facts are not known yet, say exactly that ("cause under investigation; next update at 15:00") rather than filling the gap with vague words.
How do you record a model's assumptions and known limitations so future maintainers are not surprised? Write a sample entry for an assumption about label noise.
Sample Answer
Direct answer
Keep an assumptions-and-limitations register: one short entry per assumption, stored in the repository next to the model and linked from the model card. Each entry says what is assumed, the evidence for it, what breaks if it is wrong, how you would notice, who owns it and when it is next reviewed. (Two metric words used below: recall is the share of real fraud the model catches, and precision is the share of its fraud alerts that really are fraud. A register is simply a list kept in one agreed place.) That structure means a future maintainer can tell a checked fact from a hopeful guess, and knows when to revisit it.
Fields for each entry
- Statement: one sentence, specific enough to be false.
- Evidence: what was measured, on how many examples, when.
- Impact if wrong: which metric or decision it corrupts.
- Detection: the check or monitor that would reveal it (a number and a threshold).
- Owner and review date: a person or team, plus the next review.
- Status: active (believed true), retired (no longer relevant), or violated (a check showed the assumption is false, so the entry triggers action).
Sample entry: label noise (illustrative)
Label noise means some training labels are wrong (a fraudulent payment tagged legitimate, for example).
id: A-007
title: Training labels are mostly correct but undercount fraud
status: active
assumption: >
Fraud labels come from chargebacks and analyst confirmation. We assume that
fewer than about 10% of labels are wrong, and that the errors are mostly
missed fraud (labelled legitimate) rather than false fraud.
evidence: >
Manual re-review of 200 randomly sampled labelled payments found 14
disagreements (14/200 = 7%). Of the 14, 11 were fraud labelled legitimate
and 3 were legitimate labelled fraud (illustrative split), which is what
supports the word "mostly". Sample date and reviewer sheet linked.
why_it_matters: >
Missed fraud in the labels teaches the model that some fraud looks normal,
so it may give low fraud scores (be overconfident that the payment is safe)
to that pattern. The same noise distorts the scorecard: fraud the labels
missed is not counted as fraud, so measured recall covers only the fraud
that was easy to spot and is likely overstated, and a correct alert on an
unlabelled fraud is counted as a false alarm, which understates precision.
if_wrong: >
Above roughly 15% noise, or noise concentrated in one merchant type, the
reported precision and recall are not trustworthy for that segment, so we
stop quoting them for it until relabelled.
detection: >
Re-audit 200 labels each quarter. 20 of 200 is 10%, the limit in the
assumption itself, so reaching it flips the status to violated and starts a
review. The 15% line in if_wrong is a separate, later trigger: it is where
we stop trusting the metrics, not where we start to worry.
owner: fraud-analytics
last_reviewed: 2026-06-30
next_review: 2026-09-30
linked_from: model-card.md#limitations
Why this entry works
- "Fewer than about 10%" is checkable; "labels are mostly clean" is not.
- The evidence is derived from stated counts: 14 of 200 is 7%, under the 10% assumption, and the alert threshold of 20 of 200 (10%) matches the assumption. The three numbers have three jobs: 10% is the belief, 20 of 200 is the tripwire for that belief, and 15% is the point where reported metrics are withdrawn.
- The impact line ties noise to concrete effects on recall and precision rather than to a vague quality worry.
- It has an owner and a next review, so it does not rot.
Pitfalls
- Burying assumptions in a notebook comment where no one looks.
- Listing limitations as a wall of caveats with no evidence, owner or trigger.
- Never retiring entries, so the register fills with stale items and stops being read.
You own a model or pipeline that a new engineer will inherit next month. How would you structure its documentation so data scientists, software engineers and product owners can each find what they need quickly, and what would you check before calling it handover-ready?
Sample Answer
Direct answer
I would build a "start here" page that routes each audience to their own path, organise the body around a takeover outline, meaning the standard section list a successor needs (overview, product context, training data and preprocessing, evaluation, operations, known issues), and call it handover-ready only after a cold-read test: the new engineer performs real tasks using nothing but the documents.
Structure
- Start here (half a page): what the model does in two sentences, who owns what, and three links: "I am a data scientist", "I am a software engineer", "I am a product owner".
- Overview and product context: the user problem, who consumes predictions, what a wrong prediction costs. Product owners stop reading here and should have what they need.
- Training data and preprocessing: sources, time window, filters, feature list, known biases, and how to regenerate the training set. Data scientists start here.
- Evaluation: metrics, the held-out set (examples kept aside from training so the score is honest), the current result, and what would count as a regression (a score drop compared with the current result).
- Operations: how it is deployed, how to retrain, monitoring and alerts, on-call actions. Software engineers start here.
- Known issues and decisions: open bugs with workarounds, past decisions and why, things I would fix given time.
Handover-ready checks
- Cold-read test: on a clean machine, the newcomer retrains on a small sample, finds the latest evaluation result, and responds to a mock alert (a practice alert fired on purpose), without asking me. Each question they do ask becomes a document fix.
- Access and ownership: repositories, data, dashboards, secrets managers and on-call rotation are granted and listed by name.
- Truth check: every command and link in the docs has been run or clicked this week.
- Product owner check: the owner can say, from the page alone, when the model should not be used.
- Live handover: a shadow period (the newcomer watches me work in week 2, then I watch them in week 3) and a paired first change, since some knowledge (why the decision threshold is 0.7: the model outputs a score from 0 to 1, and it flags a case only at or above the threshold, chosen by trading false alarms against misses) only surfaces in conversation. Capture it afterwards.
Worked example
With a month, week 1: draft and cold-read by a colleague who does not know the project. Week 2: fix gaps, add known issues, and run the first half of the shadow period, where the newcomer watches me retrain and handle a mock alert. Week 3: the new engineer does the retrain and alert exercises while I watch and answer only when they are truly blocked, logging every question I am asked. Week 4: paired change and release. Anything I still had to answer verbally in week 3 goes into the docs before I call it done.
What the pages might say (illustrative). Start here: "This model scores loan applications for fraud risk. Owner: risk-data team. Data scientists start at Training data; engineers at Operations; product owners read Overview and stop." Known-issues entry: "Scores drift after holiday periods. Workaround: retrain from the January snapshot. Not fixed because the retrain job needs a separate budget line."
Pitfalls
Documenting only the happy path, forgetting access rights, and ending with a document nobody has actually followed.
What does a good pull request description contain for a complex change? Show me a short example for a change to a data preprocessing step.
Sample Answer
Direct answer
A good PR (pull request, a proposed change that reviewers read before it is merged) description lets a reviewer who has not seen your work understand why the change exists, what it does, how you know it works, and what could go wrong, without reading the whole diff first. For ML changes it also records what is needed to reproduce the run. It stays short: a reviewer's attention is the scarce resource.
What it contains
- Why: the problem, with a link to the ticket or experiment.
- What changed: behaviour, not a line-by-line diff.
- How tested: the tests or runs, with the seed and data version.
- Risk and compatibility: who is affected, what needs retraining or migrating, how to roll back.
- Review focus and non-goals: where to look hard, and what is deliberately left alone.
Key to the example, in plain words: to impute is to fill in a missing value. The training split is the portion of data the model learns from, and validation is the portion held back to test it. Serving is the live system that uses the model to answer requests. Leakage is validation information sneaking into training and inflating scores. A seed is a fixed starting value so random steps repeat. A dataset version labels an exact snapshot of the data. A fixture is a small fixed test input. Retrained means trained again on data. The fix(...), feat and tune prefixes follow a naming convention (Conventional Commits) where a commit message starts with its type.
Example: a data preprocessing change
fix(preprocess): impute session_length with the training median, not 0
Why: Missing session_length was filled with 0, which the model reads as
"a session of zero seconds" and treats as a strong signal.
What: Missing values are now filled with the median computed on the
TRAINING split only and saved to preprocess_stats.json. Validation and
serving load that file, so no validation data influences the fill value.
Tested: New unit test on a 5-row fixture (3, 5, missing, 8, missing).
Column mean was 3.2 with zero-fill and is 5.2 with median-fill (5, from
the observed 3, 5, 8). Full run used seed 42 and dataset version v7.
Compatibility: Models trained before this change expect the old fill and
must be retrained. Rollback: revert; preprocess_stats.json is ignored.
Review focus: that the median is never computed from validation rows.
Why concise text matters for reproducing ML workflows
Months later someone asks what changed between model v12 and v13. The commit or PR is the index: its message plus the seed, dataset version and config identifies the run. A vague message forces archaeology, and a wall of text goes unread.
Three short commit-message examples
- Hyperparameter:
tune: lower learning rate from 1e-3 to 3e-4 for stable loss (experiments/lr_sweep.md). The learning rate is the size of each adjustment step in training, and 3e-4 is 0.0003. The message gives the change, the reason (loss was unstable at the larger value) and where the evidence lives. - Preprocessing fix:
fix(preprocess): impute session_length with training median, not 0 - Feature addition:
feat: add days_since_last_login, computed at prediction time to avoid leakage. The reason is in the message: computing it from data that only exists after the outcome would leak the answer to the model.
Pitfalls
- "Fixed stuff" says nothing. A pasted diff duplicates what reviewers can already see.
- Skipping the compatibility line is how a model quietly stops matching its serving code.
Write the one-page model card for a production fraud-detection classifier, starting with the non-technical summary a risk manager will read first.
Sample Answer
Direct answer
Lead with a plain-language summary of five or six short sentences (the one below has six) that answers a risk manager's questions: what does it do, how often is it right, what does it get wrong, what should nobody use it for, who owns it. Put the technical detail on the pages after it, with the intended reader named on each section. Below is the card, using illustrative numbers I derive from a stated confusion count.
The card (illustrative)
Card: Card-Transaction Fraud Scorer, v4. Owner: Fraud Analytics team. Reviewed: quarterly.
1. Summary for the risk manager (audience: risk, operations, non-technical)
This model gives every card payment a fraud score between 0 and 1. Payments scoring 0.85 or higher are held for a human analyst. In a test on 100,000 past payments, of which 500 were fraud, it caught 400 (80%) and missed 100. It held 1,000 payments in total, so 600 were genuine customers, meaning 4 in 10 held payments were truly fraud. It is not a decision to close an account and must not be used to reject a payment with no human review. If fraud patterns change (a new attack, a new merchant type) accuracy can fall quietly; we check this weekly.
2. Technical detail (audience: data scientists, model validators)
- Model: gradient-boosted trees, trained on 12 months of labelled payments, label = confirmed fraud within 60 days (chargeback, where a customer disputes a payment and the bank reverses it, or analyst confirmation).
- Threshold 0.85 chosen to keep alert volume within analyst capacity, not to maximise accuracy.
- The confusion count for that test (how each of 100,000 payments was classified):
| Flagged | Not flagged | |
|---|---|---|
| Actually fraud | 400 (caught) | 100 (missed) |
| Actually genuine | 600 (false alarms) | 98,900 |
- Metrics at the threshold. Recall is the share of real fraud caught; precision is the share of flagged payments that are truly fraud; false positive rate is the share of genuine payments wrongly flagged: recall 400/500 = 80%; precision 400/1,000 = 40%; false positive rate 600/99,500, about 0.6% of genuine payments.
- Limits: late-arriving labels mean the most recent weeks understate fraud; performance not validated for a new country.
3. Operations and audit appendix (audience: auditors, model risk)
Model risk (the team that assesses risk from models themselves) and model validators (independent reviewers who check the model) need: training data window and sources, feature list and owners, validation report link, drift monitors (checks that detect the world changing so the model quietly gets worse) and alert thresholds, change log with approver, fallback if the model is unavailable (rules-only mode).
Threshold trade-off (illustrative)
Raising the threshold flags fewer payments, so precision rises but recall falls. If analysts could review only 500 alerts per 100,000 payments, a higher threshold might hold 500 and catch, say, 300 of the 500 frauds: recall 60%, precision 300/500 = 60%. Tell the risk manager that halving the alerts trades some caught fraud for less analyst work, and the number lost is the one to watch.
Why it is built this way
- The risk manager gets the number they decide with (alert volume and what fraction is real fraud) without any ML jargon; "recall" and "precision" appear only in section 2.
- The single most important honest sentence is that 6 in 10 alerts are false. Hiding that would make the analyst workload a surprise.
- Each section names its audience, so a reader can stop where their need ends. A two-page technical appendix plus a one-page summary works well for a model audit report for the same reason.
Pitfalls
- Quoting "80% accurate": with 0.5% fraud, a model that flags nothing is 99.5% accurate, so accuracy is the wrong headline.
- Giving the threshold without saying it is a business choice that can move.
- Omitting the fallback and the owner.
Unlock Full Question Bank
Get access to all 21 Technical Writing and Documentation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.