返回提示词目录第 1392 页

编写数据集说明与字段文档

根据已有资料整理数据粒度、字段含义、更新机制与质量限制,生成说明文档及待补信息清单。

完整提示词

<context>
This is documentation for a dataset a data team keeps running and that other people build on: a warehouse table, a data product, a partner feed or an ML training set. Its readers are analysts, engineers and partner teams deciding in a few minutes whether they can depend on it. It fails when it lists column names without units or meaning, omits the grain and the time zone, describes the ideal pipeline instead of the known gaps, never says how fresh the data is or what happens when it is late, and changes schema without warning so dashboards break. It follows the spirit of "Datasheets for Datasets" and data cards, kept short enough to be read. For a one-off research dataset being archived, a dataset README with a codebook fits better.

Access: {{access}}.
</context>

<task>
<dataset_notes>
{{dataset_notes}}
</dataset_notes>
{{#schema}}
<schema>
{{schema}}
</schema>
{{/schema}}

1. Summary: what the dataset is, the grain (one row per what), coverage in time and population, approximate size, and the two or three uses it is good for and one it is not.
2. Ownership: owning team, how to report a problem, and where breaking changes are announced.
3. Lineage and processing: upstream sources and systems, filters, deduplication, joins, anything imputed or derived, and business rules applied (for example "cancelled orders excluded").
4. Schema: every field with type, unit, meaning in plain words, allowed values or range, null meaning (unknown, not applicable, not collected) and the time zone of every timestamp. Mark the primary key and join keys to other datasets.
5. Freshness: refresh schedule, typical lag between the event and its row, the latest time data is expected each day, how late, corrected or deleted records are handled (restatements, backfills), and how consumers can tell a load is complete.
6. Quality, gaps and biases: known missing periods, coverage gaps, definition or measurement changes over time with dates, sampling or selection effects, and who or what is under-represented. Name the checks that run on each load, if the notes give them.
7. Change policy: how schema changes are versioned, how much notice consumers get before a breaking change, and how deprecated fields are retired. If the notes say nothing, write [X] and propose a policy marked "proposed".
8. Licence, terms and privacy: who may use it and for what, attribution, whether it contains personal data, what was removed or pseudonymised, re-identification risks from combined fields (quasi-identifiers such as birth year plus location plus timestamps), and access controls.
9. Example: a short query or code snippet that reads the data and computes something correct, using the real field names and respecting the grain (no double counting).
</task>

<constraints>
- Use only facts from the notes and schema. Write [X] for anything missing and list it under Missing information; never guess units, time zones, schedules or licences.
- If the notes suggest personal data but say nothing about its handling, flag it prominently rather than describing safeguards that may not exist.
- Keep field meanings concrete: "order total in EUR including VAT, at time of purchase", not "the total".
- Do not overstate quality, and do not hide a limitation even if asked; describe it neutrally.
- If the notes do not say what the dataset contains or where it comes from, ask for the source system, the grain and a schema or sample rows before writing.
</constraints>

<output_format>
## Datasheet
The publishable document in Markdown with `###` headings for steps 1 to 9; the schema as a table (field, type, unit, meaning, nulls, notes); the example in a code block.
## Missing information
Numbered list of [X] items, each with who can likely answer it (owning team, upstream system owner, privacy or legal).
</output_format>

可替换内容

  • {{access}}
  • {{dataset_notes}}
  • {{#schema}}
  • {{schema}}
  • {{/schema}}
  • [X]

分类与标签

编程开发、数据集文档、字段字典、数据质量、数据血缘

前往 AI 图片创作