Documentation and Knowledge Management Questions
Governing how teams capture and keep knowledge usable: documentation standards, ownership models (centralized, federated or dedicated team) and review cadences, incentives and culture change that get engineers to document, decision records and assumption logs, post-project reviews that preserve lessons, and knowledge-base strategy so organizational knowledge stays findable and attributed. Includes building or buying a knowledge platform, migration and consolidation plans, taxonomy, tagging and search quality, linking docs to code, capturing tacit expertise into the knowledge base, detecting and remediating stale docs across a documentation estate, and versioning and change policies for shared reports and metric definitions. Covers the governance and lifecycle of a body of documentation, not the craft of writing any single document.
Design a searchable tagging and metadata model for an internal documentation portal that must serve thousands of datasets and hundreds of engineers. What fields would be mandatory, how would you keep the tag vocabulary from sprawling, and how would tags connect to team ownership and access controls?
Sample Answer
Direct answer
Give every doc or dataset entry a small mandatory core (type, owning team, lifecycle state, sensitivity), a controlled vocabulary for tags with a named steward, and make ownership and access derive from the metadata rather than being maintained separately. Search then works on structured fields first, free-text tags second.
Terms
- Metadata: data about a document (who owns it, what kind it is).
- Tag: a label attached to a doc for search and filtering.
- Controlled vocabulary: an approved list of tag values, changed only through a process.
- Steward: the person responsible for a domain's tags and doc quality.
- ACL (access control list): a rule saying which people or groups may see an item.
- Lifecycle state: draft, active, deprecated or archived.
- Sensitivity: how restricted the content is (public, internal, restricted).
- Model card: a short document describing a machine-learning model's purpose, data and limits.
- Facets: fixed filter categories in search, such as type or domain, shown as checkboxes or dropdowns.
- Alias: an alternative name that points at an approved tag, so "customers" finds docs tagged "customer".
- Recall (in search): how many of the relevant docs a search actually returns. Inconsistent tags hide relevant docs, so recall drops.
- Lineage: the record of where a dataset came from and which datasets or reports are built from it.
- Refresh cadence: how often a dataset is updated (hourly, daily). Schema: the list of columns and their types.
- Identity system: the company directory of people and groups (for example the single sign-on provider).
Mandatory fields (eight rows below, covering eleven individual fields: id, title, type, owner_team, steward, lifecycle, sensitivity, domain, last_reviewed, review_every_days, links; auto-fill most so people complete them)
| Field | Purpose |
|---|---|
| id, title | Stable identity and display |
| type (dataset, runbook, dashboard, model_card, architecture_doc) | Selects the template and extra fields |
| owner_team and steward | Who answers questions and reviews |
| lifecycle | Hides deprecated content from default search |
| sensitivity | Drives access and audit. Policy: restricted content must be reviewed at least every 90 days, stricter than the owner's normal window |
| domain (one value from a fixed list) | Primary browse path |
| last_reviewed and review_every_days | Freshness checks |
| links (code, upstream and downstream datasets) | Connects docs to reality |
Type-specific fields sit on top: a dataset adds schema and refresh cadence, a runbook adds the system and severity it covers, a model card adds training data and intended use.
Typed artifact example (sample record)
{
"id": "doc-4127",
"type": "runbook",
"title": "Orders pipeline: recovering a stuck nightly load",
"owner_team": "data-platform",
"steward": "priya.n",
"lifecycle": "active",
"sensitivity": "internal",
"domain": "orders",
"last_reviewed": "2026-03-02",
"review_every_days": 90,
"links": {"code": "repo://data-platform/orders-etl", "dataset": "ds-orders-daily"}
}
Finding stale or sensitive docs (runnable, with output)
The query computes days since last review (julianday is SQLite's date-to-number function, so subtracting two of them gives elapsed days) and compares it to each doc's window. On the sample date, 2026-09-28: doc-4127 was reviewed 210 days ago against a 90-day window, doc-2001 331 days ago against 180, doc-3310 100 days against 180 (fine), doc-2050 75 days against 180 (fine).
import sqlite3
db = sqlite3.connect(":memory:")
db.execute("""create table docs(id text, type text, owner_team text, lifecycle text,
sensitivity text, last_reviewed text, review_every_days int)""")
db.executemany("insert into docs values (?,?,?,?,?,?,?)", [
("doc-4127", "runbook", "data-platform", "active", "internal", "2026-03-02", 90),
("doc-2001", "dataset", "payments", "active", "restricted", "2025-11-01", 180),
("doc-3310", "model_card", "ml-platform", "active", "internal", "2026-06-20", 180),
("doc-1500", "dashboard", "bi", "deprecated", "internal", "2025-01-10", 90),
("doc-2050", "dataset", "payments", "active", "restricted", "2026-07-15", 180),
])
TODAY = "2026-09-28"
print("stale:")
for row in db.execute("""select id, type, owner_team from docs
where lifecycle = 'active'
and julianday(?) - julianday(last_reviewed) > review_every_days
order by id""", (TODAY,)):
print(row)
print("restricted and not reviewed in 90 days:")
for row in db.execute("""select id, type, owner_team from docs
where sensitivity = 'restricted'
and julianday(?) - julianday(last_reviewed) > 90
order by id""", (TODAY,)):
print(row)
Output:
stale:
('doc-2001', 'dataset', 'payments')
('doc-4127', 'runbook', 'data-platform')
restricted and not reviewed in 90 days:
('doc-2001', 'dataset', 'payments')
The runbook is flagged because 210 days is over its 90-day window, while the dataset entry doc-2001 is flagged twice: 331 days is past its 180-day window and, being restricted, past the stricter 90-day sensitive review rule. doc-2050 is also restricted but only 75 days old, so it is not flagged.
Stopping tag sprawl
- Two tiers: fixed facets (type, domain, lifecycle, sensitivity are dropdowns, never free text) and a governed tag list that a steward approves.
- Request flow: propose a tag, the steward checks for a synonym, then adds it as an alias (for example "customers" maps to "customer") instead of a new tag.
- Quarterly cleanup: merge tags used by fewer than a handful of docs, and report the tag count.
- Autocomplete from the approved list at authoring time prevents most duplicates.
Connecting tags to ownership and access
- owner_team maps to a group in the identity system, so ownership is reassigned in one place when teams reorganize.
- Sensitivity maps to an access rule: internal means all engineers, restricted means the owner group plus named approvers. Search filters results by the viewer's permissions, so restricted titles never leak in results.
- Access changes are logged, and a restricted doc without an owner is blocked from publication.
Trade-offs and pitfalls
- Too many mandatory fields means blanks or junk values. Auto-fill what you can (owner from the repo, type from the template).
- Free-text tags feel flexible but destroy recall in a year.
- Sensitivity set by the author alone is unreliable, so spot-check it and default new data-related pages to "internal".
- What would change my call: with only a few dozen docs a folder structure is enough.
You lead a team where documentation is poor and engineers resist writing it. Propose a multi-quarter plan to change the documentation culture. What do you do first, how do you handle cross-team governance, and how do you show progress each quarter?
Sample Answer
Direct answer
Do not start with a mandate or a big tool migration. Spend the first quarter finding out why engineers do not write docs (usually: no time, no clear owner, docs nobody reads, and no credit), fix the cheapest of those causes, and prove value on one high-pain area. Then add ownership and light governance in quarters two and three, and report progress with a small set of outcome metrics, not page counts.
Quarter 1: diagnose, then win one thing
- Interview 8-10 engineers across teams and read the last few months of onboarding questions and repeated Slack questions. Group them: "could not find it", "found it but wrong", "does not exist".
- Pick ONE painful area (typically on-call runbooks or service onboarding) and make it good, with the team's leads. A visible win before any policy is what buys credibility.
- Lower the cost of writing: a short template, docs stored next to code, and writing time budgeted in sprint planning as real capacity (meaning the team plans fewer feature points so writing is not unpaid overtime). A filled-in template for a service runbook is only four lines:
Purpose: Restart and drain the invoice worker when the queue backs up
Owner: payments team (#payments-oncall)
How to operate: 1) check queue depth on the dashboard 2) run the drain command 3) confirm depth falls
Known failure modes: drain hangs if the database is read-only; escalate to the database team
- Record a baseline: median time for a new hire to make a first merged change, and the count of repeat questions in the help channel. For example, the baseline might be 21 days and 30 repeat questions a month (illustrative), so later quarters have something to be compared against.
Quarter 2: ownership and governance across teams
- Every doc has an owning team (a field in the doc header plus a CODEOWNERS file, a repository file naming who must review changes in a path). No owner means it is archived after a notice period.
- A lightweight cross-team docs guild (a group with one rep per team, meeting monthly) owns the template, the style guide and the definition of "done" (the team's checklist of what must be true before a piece of work counts as finished). Teams keep autonomy on content; the guild owns only standards. This is a hybrid between central control and free-for-all.
- Add CI checks (automated checks on each pull request): broken links, missing owner, doc past its review date. Warn first, block later.
- Make docs part of the "definition of done" (the checklist a piece of work must satisfy before it counts as finished) for new services and for changes to public interfaces, and reflect it in review, not in a separate approval board.
Quarter 3: reinforce and scale
- Recognition: docs work counts in promotion and performance packets (the written evidence engineers submit when they are reviewed for a raise or promotion), and a short "doc of the month" is shared. Incentives beat exhortation.
- Onboarding curriculum: a 30-day reading path made of the docs that exist, where the new hire files an issue for each gap, and fixing it is their first contribution.
- Retire or merge stale docs so trust in what remains rises.
How to show progress each quarter (worked example)
A leading indicator is an early signal of behavior you control (services with owners); an outcome indicator is the result you actually want (faster onboarding), which moves later.
| Quarter | Leading indicator | Outcome indicator |
|---|---|---|
| 1 | Baseline recorded (for example 21 days to first accepted pull request, 30 repeat questions a month); pain area chosen | Repeat questions in that area (count) |
| 2 | Share of services with an owner, for example 40 of 50 = 80% | Docs past review date, falling |
| 3 | Share of new services shipped with a runbook | New-hire time to first merged change vs the Q1 baseline (for example 21 days down to 14, a one-third drop; illustrative) |
Report the trend against the baseline, and never celebrate volume (pages written), because it rewards padding.
ML organization variant (reproducibility as the goal)
In a machine learning (ML) team, the doc that matters most is whatever lets someone else reproduce a result. Replace the generic template with: a model card (a short standard doc stating what a model is for, its training data, evaluation results and known limits), the exact dataset version, code commit, random seed (the fixed number that makes random steps in training repeat identically) and environment, and the metrics table. A minimal model card reads: "Purpose: rank support tickets by urgency. Training data: tickets Jan to Jun, dataset v4. Evaluation: 0.82 accuracy on held-out tickets (illustrative). Limits: not tested on non-English tickets." CI checks verify the card exists and its links to data and code resolve before a model can be promoted. Ownership is per model, and the curriculum includes re-running one past experiment from docs alone; failure to reproduce it is a documentation bug to fix. Quality over time is measured by the share of promoted models whose results a second person reproduced from the docs.
Pitfalls
- Mandating with no time budget produces low-quality docs and resentment.
- Central review boards become bottlenecks; keep standards central and content federated.
- Measuring page counts, or reading only engagement, hides whether docs are trusted.
- What would change the plan: if the survey shows the problem is findability, not absence, invest in search and structure before asking anyone to write more.
You need to stand up a searchable internal knowledge base for engineering documentation that lives near the code and needs fine-grained permissions. Sketch a simple architecture, explain your search choices, the authoring and review workflow, the ownership model, and how you keep content current.
Sample Answer
Direct answer
Keep documentation as files in the code repositories (docs-as-code), build them into one site on every merge, and index the built content in a search service that filters results by the searcher's permissions. Ownership lives in the repo (a CODEOWNERS file), review is the normal pull request, and freshness is enforced by automated checks and review dates. That is enough for a modest scale; do not build a custom platform.
Terms
- Docs-as-code: writing docs in plain text (Markdown) inside the repository and reviewing them like code.
- CODEOWNERS: a repository file naming who must approve changes to given paths.
- CI (continuous integration): automated checks that run on every change.
- ACL (access control list): a rule on who may view an item.
- Audit log: a record of who accessed or changed what.
- Front matter: a small metadata header at the top of a Markdown file (owner, type, sensitivity, last_reviewed) that tools can read.
- Facets: clickable filters in search results, such as by team or page type. Typo tolerance: still finding "kubernetes" when someone types "kuberentes".
- Link unfurl: the preview card a chat tool shows when someone pastes a link. Lineage: a record of which data sources feed which datasets or reports.
- Model card: a short standard document describing what a machine learning model is for, its training data and its limits. Metric spec: a written definition of a business metric.
Architecture (simple)
Repos (Markdown + front matter) -> CI build and checks -> Static docs site
|
v
Search index (with access groups per page)
^
User -> single sign-on -> search API filters hits by user's groups
Search choices
| Option | Fits when | Watch out for |
|---|---|---|
| Database full-text search (for example PostgreSQL, a common open-source database with built-in text search) | Under a few hundred thousand pages, small team | Ranking tuning is manual |
| Dedicated search engine (for example OpenSearch, an open-source search server, or a hosted service) | Many repos, typo tolerance, synonyms, facets | Extra operations cost |
| Hosted enterprise search | Need connectors to chat, tickets, wiki | Cost and permission syncing |
| My default: start with the database or hosted engine; move up only when search quality complaints justify it. Whichever is chosen, store each page's allowed groups in the index and apply them as a filter at query time so titles and snippets of restricted pages never appear. Filtering after retrieval on the client is the classic leak: the server has already sent the restricted titles and snippets to the browser, so anyone can read them in the network response even if the page hides them. An index entry that supports the safe approach looks like this: |
{ "title": "Checkout runbook", "body": "...", "allowed_groups": ["payments-oncall"] }
query: text = "checkout runbook" AND allowed_groups contains any of (caller's groups)
The filter is part of the query, so a non-member gets zero hits back, not hits that are hidden afterwards.
Authoring and review workflow
- Author edits Markdown in the repo, using a template (runbook, architecture decision record or ADR, how-to guide) with front matter: owner, type, sensitivity, last_reviewed.
- Pull request triggers CI: link checker, formatting, required front matter, spelling, and a check that code-linked pages changed when the code did (or a note explains why not).
- CODEOWNERS approval merges, and the site rebuilds.
Ownership model
Every page has an owner team via CODEOWNERS or front matter. A weekly report lists pages past their review date, sent to the owner team. Orphans (owner team deleted) escalate to the engineering manager.
Keeping content current
- Review-by dates and a staleness banner after the date.
- CI flags pages whose linked code has changed since last review.
- Usage data: heavily used but stale pages get priority.
- Deleting is a feature: archive deprecated pages with redirects.
Common variations (optional extras, rarely the first question in an interview; same skeleton, different fields)
- Machine learning (ML) or data organization: add model cards and runbooks as typed pages, restrict sensitive ones by group, and keep an audit log of reads and edits. Auto-generated metadata (schemas, lineage) merges with human-written pages, and CI keeps the two consistent.
- A wiki serving about 100 teams: add versioned templates for runbooks and ADRs (a template for architecture decision records), a tag list with a steward, ranking by freshness and usage, and Slack and GitHub integrations (link unfurls, a bot posting stale-page reminders).
- BI artifacts: metric specs and dashboard templates as typed records with owner, definition and access, searchable alongside the rest.
I would keep all of these at component level, adding a variant only when a team needs it.
Worked example (illustrative)
An SRE edits the checkout service runbook in the repo. CI fails because the front matter (the metadata header) lacks an owner, so she adds one. The reviewer from the owning team approves, the site rebuilds, and the index updates with group "payments-oncall". A contractor outside that group searches "checkout runbook" and sees no hit. Three months later the owner gets the stale-page report.
Trade-offs and pitfalls
- Docs-as-code excludes non-engineers unless there is an editing path (a web editor over the repo), so plan one.
- Permission syncing between repos and the index is the hardest part. Test it with a deny case.
- Consistency versus speed: generated metadata is fast but shallow, human docs deeper but stale. Label which is which.
- What would change my call: heavy non-technical contributors favor a hosted wiki with an export to the repo.
Several product teams each own documentation for their own services, and compliance reviewers now need to see who is accountable for what. Design an ownership model: roles, edit rights, approvals, how quickly docs must follow code changes, and what audit evidence you keep.
Sample Answer
Direct answer
Give every doc one accountable owning team, encode that in the repository (not in someone's memory), use pull-request review as the approval and audit mechanism, set update deadlines by how risky the doc is, and keep the evidence automatically (version history, review records, and an ownership report). Compliance reviewers then answer "who is accountable for what" by pulling a report, not by asking around.
Roles and edit rights
| Role | Responsibility | Rights |
|---|---|---|
| Owner (a named team plus a named lead) | Accountable for accuracy and review dates | Approves changes; can archive |
| Contributor | Any engineer | Proposes edits by pull request |
| Reviewer | Owner team member, plus a domain expert for sensitive docs | Approves merge |
| Compliance reviewer | Reads, does not edit | Read access to all, plus the audit report |
| Docs platform admin | Tooling and permissions | No content authority |
Ownership lives in a doc header field and a CODEOWNERS file (a repository file naming who must review changes in a path), so branch protection (a repository setting that refuses to merge a change until the required approvals, including the owner's, are in) can require owner approval automatically. A tier is just a risk label your policy defines; three tiers is a common, workable number.
A concrete header and CODEOWNERS line:
# top of docs/payments/refund-runbook.md
owner: payments-team lead: J. Doe tier: 1
last_reviewed: 2026-07-15 next_review: 2027-01-15
# CODEOWNERS
/docs/payments/ @acme/payments-team
Approvals and update deadlines
- Tier 1 (security procedures, incident runbooks, data-handling): owner approval plus one independent reviewer; docs must be updated in the same pull request as the code change when it touches described behavior, and reviewed at least every six months.
- Tier 2 (service docs): owner approval; update within, say, five business days of a behavior change.
- Tier 3 (notes, drafts): no approval; auto-archived after inactivity.
The exact numbers are policy choices your compliance team sets; the structure is what matters: shorter deadlines for higher risk.
Audit evidence you keep
- Version history with author, reviewer and time (Git provides this).
- A generated ownership register (a table built automatically from the doc headers, never typed by hand): doc, owner team, tier, last reviewed date, next review date.
- Review records: pull-request approvals, and a signed attestation for periodic tier-1 reviews (a dated statement by the owner, "I re-read this and it is accurate", kept as a record).
- Exceptions: a log of overdue docs and who accepted the risk, with an expiry. One entry looks like:
ledger-reconciliation-guide | overdue since 2026-08-01 | risk accepted by: Director of Engineering | reason: rewrite tied to the payments migration | expires: 2026-10-31. When the expiry passes, the doc is either fixed or the acceptance is renewed on the record.
Worked example
A compliance reviewer asks: "Who is accountable for the payment-refund runbook, and when was it last verified?" The register shows: owner payments team (lead named), tier 1, last reviewed 2026-07-15 by two people, next review due 2027-01-15, and the linked pull request shows the approvals. No meeting was needed.
Lifecycle (creation to archive)
Draft, then in review, then published, then due for review (a timer), then either re-verified, updated, or archived. Archived docs stay in version control and carry a banner pointing to the replacement; nothing is deleted while retention rules (how long the company or a regulator requires records to be kept) apply.
ML organization variant: governance versus agility
For models, add a model owner and require a model card (a short standard document describing purpose, training data, evaluation and limits) before release. To protect agility, apply strict controls only to models in production or that affect customers; research notebooks and experiments stay lightweight (tier 3). Update deadlines follow releases: a model card must be current at each promotion (moving a model from testing into real production use). The trade-off: strict governance slows experimentation, so scope it by risk rather than applying it everywhere.
Pitfalls
Approvals that become rubber stamps, ownership assigned to a person who leaves (assign to teams and review quarterly), and evidence collected by hand only at audit time (automate it).
Engineers at your company rarely write documentation unless someone forces them to. Design an incentive program that encourages meaningful contributions. How would you judge quality, stop people from gaming it, and pilot it before a wide rollout?
Sample Answer
Direct answer
Pay for outcomes that readers experience (docs that get used, kept current and that reduce questions), not for volume. I would build a small program with three parts: visible recognition and career credit rather than cash, a quality signal that comes from readers and from freshness, and guardrails against gaming. Then pilot it with two or three teams for a quarter before scaling.
Terms
- Gaming: producing what the metric rewards without the value it was meant to stand for (for example, splitting one page into ten).
- Docs-as-code: writing docs as files in the code repository, reviewed like code.
- Stale doc: one whose owner has not confirmed it is correct within an agreed period.
- Pilot: a limited trial with a comparison baseline.
- README: the front-page file of a code repository that says what it is and how to run it.
- Swag: small branded goodies such as t-shirts or stickers.
- Freshness: whether the doc has been confirmed correct recently (for example within 90 days).
- Extrinsic rewards crowd out pride: paying or prizing people for something they would otherwise do because they care can make them care less, so the reward replaces the pride instead of adding to it.
Why people do not write docs today (diagnose first)
Usually it is not laziness: writing is invisible in reviews, there is no time budgeted, docs rot so writing feels wasted, and the payoff goes to someone else. An incentive on top of a broken environment fails, so the program pairs incentives with removing friction (templates, docs in the repo, docs time in sprint planning).
Incentives (ranked by what I would try first)
- Career credit: documentation impact counts in promotion and performance write-ups, with managers trained to ask about it.
- Recognition: a monthly "most useful doc" chosen by readers, plus named owners on high-traffic pages.
- Protected time: a small documentation allowance per sprint.
- Small rewards (swag, conference budget) as a garnish. Avoid cash per page.
Judging quality without counting words
| Signal | What it tells you | How it is gamed |
|---|---|---|
| Reader "was this helpful" votes and comments | Usefulness | Friends vote for friends; cap votes per reader per author and weight by distinct teams |
| Usage (views, links from code or tickets) | Whether people find it | Self-viewing; exclude the author's team |
| Freshness (owner confirmed within 90 days, code changed with the doc) | Whether it is current | Rubber-stamp "reviewed" clicks; audit a random sample by asking a peer to follow the doc |
| Reduction in repeat questions on that topic | Real impact | Slow to measure; use as a trend, not a score |
| A monthly sample of ten docs is scored by a peer using a short rubric (accurate, complete for the task, clear next step; 0 to 2 points each, so 0 to 6) and this sample outranks the automated numbers. |
Worked check on one page: last confirmed 2026-07-01, so on 2026-09-28 it is 89 days old and passes the 90-day rule. A page confirmed 2026-06-20 is 100 days old and is flagged stale. The first page has 14 helpful votes from 5 different teams and a peer score of 5 of 6, so it is a strong result. A page with 14 votes all from the author's own team and a peer score of 2 of 6 is not, however popular it looks.
Anti-gaming guardrails
- Never reward raw count or length.
- Credit revisions and deletions of duplicates as much as new pages.
- Rate limits on credited edits per person and per page, and a minimum age before the same page earns credit again.
- Publish the rules so gaming is visible, and review outliers by hand.
Pilot design
Pick two teams that volunteer plus one comparison team without the program. Baselines before start: share of services with a current README, and median time for a new hire to make a first change (measure, don't guess). Run for one quarter, then interview participants and read the sampled docs. Success means participants' freshness and reader ratings rise versus the comparison team without a jump in trivial pages. Illustrative numbers: at baseline 6 of 20 services (30 percent) have a current README and a new hire's median time to a first change is 12 days. After a quarter, the pilot teams are at 14 of 20 (70 percent) and 7 days while the comparison team went from 30 to 35 percent. The gap, not the raw rise, is the signal. Adjust rules, then extend in waves.
Worked example (illustrative)
A team splits one 3-page setup guide into nine tiny pages to raise its count. Under the program the credit came from reader-rated usefulness and freshness, so nine thin pages earn less, the peer sample flags fragmentation, and the reviewer merges them, crediting the merge.
Trade-offs and pitfalls
- Extrinsic rewards can crowd out pride in the work, so keep rewards modest and tied to helping others.
- Heavy scoring becomes a job of its own. Keep to three or four signals.
- What would change my call: in a very small team, direct manager expectations beat a formal program.
Unlock Full Question Bank
Get access to all 25 Documentation and Knowledge Management interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.