领域深度 · 数据与语料Field guide · Data and datasets
数据与语料:从一堆文件到能训练的语料Data and datasets: from a pile of files to trainable material
你从网盘里拖出 20 万条对话,觉得“数据够了”。真开训才发现:有的客户没授权,有的字段带手机号,训练集和测试集撞了同一批样本,出了问题还删不干净。数据能不能用,不看大小,看它能不能回答:从哪来、凭什么用、怎么处理、怎么复现、怎么删。You pull 200,000 conversations from a shared drive and call it “enough data”. Training starts and the problems appear: some customers never consented, some fields contain phone numbers, train and test share the same samples, and nobody can delete a bad batch cleanly. Whether data is usable is not a size question. It has to answer: where it came from, why you may use it, how it was processed, how to reproduce it and how to delete it.
- 先写用途句:这份数据到底要训练什么。Write the use sentence first: what exactly is this data training?
- 版权、合同、隐私、肖像分开核,不能合成一个“有授权”。Check copyright, contract, privacy and likeness separately; do not collapse them into “licensed”.
- 训练、验证、测试要按来源切,不能只随机切。Split train, validation and test by source, not just randomly.
完整版从下面开始;表格是查的时候用,不用背。The full guide starts below. Use the tables for reference; you do not need to memorise them.
假设一个具体活:用 2,000 条客服对话训一个工单分类器,只分“退款、物流、产品”三类。先写来源、许可、字段、切分和删除方式。Take one concrete job: 2,000 support conversations to train a ticket classifier with three labels: refund, shipping and product. Write the source, licence, fields, split and deletion method first.
1 · 先定用途:预训练、微调、偏好、评测、RAG 要的数据不一样1 · Fix the purpose: pretraining, fine-tuning, preference, evaluation and RAG need different data
同一个“数据不够”可能指五种不同问题:预训练缺规模与多样性,微调缺任务示例,偏好数据缺成对比较,评测集缺区分度,RAG 缺可检索且可引用的文档。五种用途的最小字段、质量门槛和风险完全不同。拿评测集去微调,拿网页语料去做 RAG,都会在最后才发现不可用。“Not enough data” can mean five different problems: pretraining lacks scale and diversity, fine-tuning lacks task examples, preference data lacks paired comparisons, evaluation lacks discrimination, RAG lacks retrievable and citable documents. Their minimum fields, quality bars and risks differ completely. Fine-tuning on an evaluation set or building RAG from raw web text only reveals the mismatch at the end.
用途要写成“输入—输出—判定”的句子。例如“给定一段客服对话,输出问题分类与是否升级,人工按 12 类标签判定”。写不出输入输出和判定,标注员只能自由发挥,质量无法复现。Write the purpose as an input–output–judgement sentence. For example: “given a customer-support dialogue, output the issue category and whether to escalate; a human judges against 12 labels.” Without input, output and judgement, annotators improvise and quality cannot reproduce.
| 用途Purpose | 最小字段Minimum fields | 质量门槛Quality bar | 主要风险Main risk |
|---|---|---|---|
| 预训练 / 继续预训练Pretraining / continued pretraining | 文本或图文、来源、许可、语言、时间Text or image-text, source, licence, language, date | 规模、去重、语言覆盖、低质过滤Scale, deduplication, language coverage, low-quality filtering | 版权、隐私、污染、长尾被过滤Copyright, privacy, contamination, long-tail removal |
| 监督微调Supervised fine-tuning | 指令、输入、期望输出、理由/标签Instruction, input, expected output, rationale or label | 任务覆盖、答案一致、难度分层Task coverage, answer consistency, difficulty tiers | 标签漂移、答案过短、模板化Label drift, short answers, templating |
| 偏好 / 对齐Preference / alignment | 同一输入的两个回答、偏好方向、理由Two responses to one prompt, preference direction, rationale | 对比有效、位置去偏、标注者一致Valid contrast, position debiasing, annotator agreement | 只会选长答案、文化偏差Preferring longer answers, cultural bias |
| 评测 / 基准Evaluation / benchmark | 题目、标准答案或评分器、难度、来源Item, reference answer or scorer, difficulty, source | 区分度、污染检查、评分可复跑Discrimination, contamination check, reproducible scoring | 训练集泄漏、评分器漂移Train-set leakage, scorer drift |
| RAG / 知识库RAG / knowledge base | 文档、段落、时间、权限、引用锚点Document, chunk, date, permission, citation anchor | 可检索、可更新、权限正确、引用可回原文Retrievable, fresh, correctly permissioned, citable to source | 过期、越权、切块断义Stale, over-permissioned, chunks that break meaning |
| 多模态Multimodal | 图像/音频/视频、文本描述、对齐、许可Image/audio/video, caption, alignment, licence | 分辨率、时长、对齐精度、场景覆盖Resolution, duration, alignment accuracy, scene coverage | 肖像、声音、商标、深度合成Likeness, voice, trademark, synthetic media |
2 · 权利不是一列:版权、合同、隐私、肖像分开核2 · Rights are not one column: copyright, contract, privacy and likeness are separate
“公开可访问”不等于“可以训练、可以商用、可以再分发”。网页内容可能受版权保护,数据库可能有汇编权利,平台条款可能限制抓取与再分发,个人信息受隐私规则约束,真人和声音还涉及肖像与人格权。每一层都要有单独的核对结果,不能用一个“CC”或“公开”概括。“Publicly accessible” does not mean “may be trained on, commercialised and redistributed”. Web content may be copyrighted, databases may carry compilation rights, platform terms may restrict crawling and redistribution, personal data is constrained by privacy rules, and real people and voices raise likeness and personality rights. Each layer needs its own check; one “CC” or “public” label cannot cover them.
本页只给核对顺序,不替任何用途下法律结论。许可与用途以授权文件、合同、平台条款和适用法律为准。拿不准时,先停用该批数据,而不是先训完再补授权。This page gives a checking order, not a legal conclusion for any use. Licences and use remain with authorisation documents, contracts, platform terms and applicable law. When unsure, stop using the batch before training, not after.
| 权利层Rights layer | 要问的问题Question | 要看的文件Document to read | 不能替代What does not substitute |
|---|---|---|---|
| 版权Copyright | 原文、图片、音频、代码是否受保护;是否允许复制、改编、商用Is the text, image, audio or code protected; are copying, adaptation and commercial use allowed | 许可协议、授权书、来源页Licence, authorisation, source page | “公开可见”或“注明出处”“Publicly visible” or “credit given” |
| 数据库 / 汇编Database / compilation | 抓取整库、重新组织、再分发是否被限制Are bulk extraction, reorganisation and redistribution restricted | 平台条款、数据库许可Platform terms, database licence | 单条内容的许可A licence for individual records |
| 合同 / 平台条款Contract / platform terms | API、爬虫、下载、缓存、二次分发是否允许Do the API, crawler, download, cache and redistribution terms allow it | ToS、API 条款、书面合同Terms of service, API terms, signed contract | 技术上看得到Technical accessibility |
| 个人信息Personal data | 是否含身份、联系方式、健康、位置、生物特征Does it contain identity, contact, health, location or biometric data | 隐私政策、同意记录、删除机制Privacy notice, consent record, deletion mechanism | “已脱敏”口头说明A verbal claim that it is anonymised |
| 肖像 / 声音 / 人格Likeness / voice / personality | 真人脸、声音、姓名、形象是否可识别;用途、期限、地域Is a real face, voice, name or persona identifiable; use, duration, territory | 肖像/声音授权、同意书、撤回条款Likeness or voice release, consent, withdrawal terms | 购买了一张照片Buying one photograph |
| 保密 / 跨境Confidentiality / transfer | 客户数据、内部文档、跨境传输是否允许Are client data, internal documents and cross-border transfer allowed | 保密协议、数据出境评估NDA, transfer assessment | “内部先用”“Internal use first” |
3 · 来源凭证:每一批数据都要能回到“哪一版、哪一天、什么许可”3 · Provenance: every batch must trace to a version, a date and a licence
来源凭证不是“数据来自互联网”。至少要有来源 URL 或数据集标识、抓取时间、HTTP 状态、许可快照、内容哈希、采集器与参数。网页会改、许可会换、账号会删。没有快照,半年后无法证明当时拿到的是什么。Provenance is not “the data came from the internet”. It needs at least a source URL or dataset identifier, retrieval time, HTTP status, licence snapshot, content hash, collector and parameters. Pages change, licences change and accounts disappear; without a snapshot, you cannot prove what was obtained six months later.
来源凭证要和数据分开存:数据表放内容与哈希,清单放来源与许可,日志放采集过程。这样删除或替换一条数据时,不必重写整张表。审计时也能按来源、许可、时间筛出问题批次。Store provenance separately from content: the data table holds content and hashes, the manifest holds source and licence, the log holds the collection process. Removing or replacing a record then does not require rewriting the table, and audits can filter problem batches by source, licence or date.
| 字段Field | 为什么必须有Why it is needed | 缺失后果If missing |
|---|---|---|
| 来源 URL / 数据集 IDSource URL / dataset ID | 回到原始页面或版本Return to the original page or version | 无法复核许可与内容Cannot recheck licence or content |
| 抓取时间与状态码Retrieval time and status | 区分正常页面、重定向、404、付费墙Distinguish normal pages, redirects, 404s and paywalls | 把错误页当正文Error pages become training text |
| 许可快照Licence snapshot | 证明当时适用的条款Prove which terms applied then | 条款更新后无法解释Cannot explain after terms change |
| 同意 / 授权记录Consent / authorisation | 真人、客户、内部数据的使用依据Basis for real people, clients and internal data | 无法证明“凭什么用”Cannot prove the basis for use |
| 内容哈希Content hash | 去重、版本比对、删除追踪Deduplication, version comparison, deletion tracking | 改了一字就无法定位One edit makes location impossible |
| 采集器与参数Collector and parameters | 复现同一批数据Reproduce the same batch | 换人换脚本结果不同Different person or script yields different data |
| 删除 / 撤回记录Deletion / withdrawal record | 从训练集、索引、缓存中移除Remove from training sets, indexes and caches | 数据仍在,权利已撤回Data remains after rights are withdrawn |
4 · 清洗:先定保留规则,再谈过滤强度4 · Cleaning: define what to keep before how hard to filter
清洗的目标不是“把数据弄干净”,而是“让留下来的数据能回答用途”。编码、模板、导航、重复、乱码、语言混杂要先处理。个人信息、毒性、成人内容、隐私泄露要按用途和规则处理。长尾语言、少数群体表达不能被“质量分”一锅端。Cleaning is not “make the data clean”; it is “make the retained data answer the purpose”. Fix encoding, boilerplate, navigation, duplicates, garbled text and mixed languages first. Handle personal data, toxicity, adult content and privacy leaks according to purpose and rules. Long-tail languages and minority expression must not be wiped out by one quality score.
每一条过滤规则都要有抽样证据:被删了多少、删了哪些、为什么删、对目标分布有什么影响。只报“清洗后 2TB”没有意义。要能说清从 3TB 到 2TB 失去了什么。Every filter needs sampled evidence: how much was removed, which records, why and what it did to the target distribution. “Two terabytes after cleaning” means nothing without saying what was lost between three and two.
编码与格式
做什么:统一 UTF-8、换行、HTML 去标签、PDF 抽文本
证据:解析失败率、抽样原文Encoding and format
What to do: Normalise UTF-8, line endings, strip HTML, extract PDF text
Evidence: Parse-failure rate, sampled text
模板与导航
做什么:去掉页眉页脚、菜单、广告、重复声明
证据:模板检测命中率、残留抽样Boilerplate and navigation
What to do: Remove headers, menus, ads and repeated notices
Evidence: Template hit rate, residual sample
语言识别
做什么:标注主语言与混杂比例
证据:混淆矩阵、短文本抽检Language identification
What to do: Label primary language and mixed-language ratio
Evidence: Confusion matrix, short-text audit
个人信息
做什么:识别姓名、电话、邮箱、身份证、地址、生物特征
证据:召回率、误杀率、脱敏记录Personal data
What to do: Detect names, phones, emails, IDs, addresses, biometrics
Evidence: Recall, false-positive rate, redaction log
去重
做什么:精确哈希 + 近重复(MinHash / SimHash 等)
证据:重复率、被删簇样本Deduplication
What to do: Exact hashes plus near-duplicate detection
Evidence: Duplicate rate, samples of removed clusters
质量过滤
做什么:长度、符号比、重复度、困惑度、分类器分
证据:各阈值保留率、分布变化Quality filtering
What to do: Length, symbol ratio, repetition, perplexity, classifier score
Evidence: Retention by threshold, distribution shift
安全过滤
做什么:按用途处理毒性、成人、违法与泄露内容
证据:命中类型、人工复核、申诉路径Safety filtering
What to do: Handle toxicity, adult, illegal and leaked content by purpose
Evidence: Hit types, human review, appeal path
5 · 标注:指南、试标、双标、裁决、漂移5 · Labelling: guideline, pilot, double annotation, adjudication, drift
标注质量不是“找更聪明的人”,而是“让两个人对同一条能做出同样判断”。先写指南,明确边界例、反例、必填字段和不允许的推断。再做 30–50 条试标,统计一致性与分歧。然后双标、裁决、抽检。直接上量,最后只会得到一套无法解释的标签。Annotation quality is not “find smarter people”; it is “make two people reach the same judgement on the same item”. Write the guideline with boundary cases, counterexamples, required fields and forbidden inferences. Pilot 30–50 items, measure agreement and disputes, then double-annotate, adjudicate and audit. Scaling first only produces unexplainable labels.
一致性指标要跟任务匹配。分类看 Cohen’s kappa 或 alpha,跨度看 ICC,排序看 Kendall’s tau。指标低时先改指南和样本,不要先骂标注员。还要留一份“金标集”,每次换人、换模型预标、换指南都复跑。Agreement metrics must fit the task: kappa or alpha for categories, ICC for continuous scales, Kendall’s tau for rankings. When agreement is low, revise the guideline and samples before blaming annotators. Keep a gold set and rerun it whenever annotators, model pre-labelling or guidelines change.
指南
产出:边界例、反例、字段、判定树
验收:新人读完能独立标 10 条Guideline
Output: Boundary cases, counterexamples, fields, decision tree
Acceptance: A newcomer can label ten items independently
试标
产出:30–50 条覆盖难例的样本
验收:分歧集中在哪里已写清Pilot
Output: 30–50 items covering hard cases
Acceptance: Disagreement hotspots documented
双标
产出:每条至少两人独立标
验收:一致性达到预设阈值Double annotation
Output: At least two independent labels per item
Acceptance: Agreement reaches the preset threshold
裁决
产出:第三人或规则裁决分歧
验收:裁决理由可追溯Adjudication
Output: A third person or rule resolves disputes
Acceptance: Rationale is traceable
金标集
产出:固定、隐藏、覆盖边界
验收:换人/换预标后仍能复跑Gold set
Output: Fixed, held out, boundary-heavy
Acceptance: Reruns after annotator or pre-label changes
漂移检查
产出:按时间、来源、难度分层抽检
验收:分布漂移有报警Drift check
Output: Stratified audit by time, source and difficulty
Acceptance: Distribution drift alerts
6 · 切分与污染:训练集、验证集、测试集不能只按随机切6 · Splits and contamination: train, validation and test are not a random cut
随机切分会让同一实体、同一模板、同一段文本的近重复同时出现在训练和测试。正确做法是先按实体、时间、来源或用户分组,再在组内切。对去重后的近重复做跨集检查。对公开基准做 n-gram 重叠与题目级比对。否则分数上涨只证明模型见过。A random split lets the same entity, template or near-duplicate text appear in both training and test. Group by entity, time, source or user first, then split within groups; check near-duplicates across sets; compare public benchmarks at n-gram and item level. Otherwise a higher score only proves the model has seen the test.
测试集要锁:锁定文件、锁定评分器、锁定预处理。每次调参都看测试集,等于把它变成验证集。最后需要一份从未参与选择的 holdout,哪怕小一点。Lock the test set: lock the file, the scorer and the preprocessing. Looking at it after every tuning run turns it into a validation set. Keep a holdout that never participated in selection, even if it is smaller.
按实体分组
适合:同一人物、产品、文档有多个样本
要防什么:同一实体跨集泄漏Group by entity
Use when: Multiple samples per person, product or document
Guard against: Same entity across sets
按时间切
适合:新闻、对话、交易、日志
要防什么:用未来预测过去、分布漂移Split by time
Use when: News, dialogue, transactions, logs
Guard against: Future leaking into past, distribution shift
按来源切
适合:多站点、多供应商、多设备
要防什么:来源特有模板被当能力Split by source
Use when: Multiple sites, vendors or devices
Guard against: Source-specific templates mistaken for capability
按用户切
适合:推荐、个性化、对话
要防什么:同一用户行为跨集Split by user
Use when: Recommendation, personalisation, dialogue
Guard against: Same user behaviour across sets
近重复检查
适合:网页、代码、论文、歌词
要防什么:改写、翻译、模板变体Near-duplicate check
Use when: Web, code, papers, lyrics
Guard against: Paraphrase, translation, template variants
基准污染检查
适合:使用公开评测
要防什么:题目、答案、解析进入训练Benchmark contamination
Use when: Using public benchmarks
Guard against: Items, answers or rationales in training
7 · 版本与复现:数据、代码、配置、环境一起锁7 · Versions and reproduction: lock data, code, config and environment together
只存“最终数据”无法复现。要存数据哈希与清单、清洗与标注代码、切分配置、随机种子、依赖版本、硬件环境、许可快照和变更记录。数据卡要写清用途、来源、字段、规模、语言、时间范围、已知偏差、禁止用途和联系方式。Storing only the “final data” does not reproduce. Keep data hashes and manifests, cleaning and labelling code, split config, random seeds, dependency versions, hardware environment, licence snapshots and a changelog. A dataset card states purpose, sources, fields, size, languages, time range, known biases, prohibited uses and contact.
版本号不要只写日期。用“数据哈希前 8 位 + 配置版本”能区分同一天的两批。每次重建产生新哈希,旧版本保留只读。数据卡与模型卡要互相引用,否则模型出问题时无法回到训练数据。Do not version by date alone. A short data hash plus config version distinguishes two batches on the same day; every rebuild produces a new hash and old versions stay read-only. Dataset cards and model cards should reference each other, or a model incident cannot be traced back to training data.
数据内容
记录方式:逐文件 SHA-256 + 总清单哈希
复现用途:确认是不是同一批Data content
Record: Per-file SHA-256 plus manifest hash
Reproduction use: Confirm the same batch
清洗 / 标注代码
记录方式:Git 提交 + 运行命令
复现用途:重跑同一处理Cleaning / labelling code
Record: Git commit plus command
Reproduction use: Rerun the same processing
切分配置
记录方式:实体/时间字段、比例、种子
复现用途:重建同一训练测试集Split config
Record: Entity/time fields, ratios, seed
Reproduction use: Rebuild the same train/test sets
依赖与环境
记录方式:锁文件、CUDA/驱动、硬件
复现用途:解释速度与数值差异Dependencies and environment
Record: Lockfile, CUDA/driver, hardware
Reproduction use: Explain speed and numeric differences
许可快照
记录方式:条款原文、日期、来源
复现用途:证明当时的使用依据Licence snapshot
Record: Terms text, date, source
Reproduction use: Prove the basis at the time
变更记录
记录方式:增删改、原因、影响范围
复现用途:审计与回滚Changelog
Record: Adds, removes, edits, reason, impact
Reproduction use: Audit and rollback
数据卡
记录方式:用途、来源、字段、偏差、禁止用途
复现用途:给使用者的边界说明Dataset card
Record: Purpose, sources, fields, biases, prohibited uses
Reproduction use: Boundary note for users
8 · 隐私与删除:先最小化,再谈“删得掉”8 · Privacy and deletion: minimise first, then discuss deletion
数据里的个人信息不只是姓名和电话。位置轨迹、设备 ID、聊天上下文、人脸、声纹、病历、客服记录都可能可识别。先做数据最小化:不需要的字段不采、不存、不传。需要保留的做脱敏、分权、加密和保留期限。Personal data is not just names and phone numbers. Location traces, device IDs, chat context, faces, voiceprints, medical records and support logs can all identify someone. Minimise first: do not collect, store or transfer fields you do not need; for what remains, redact, restrict access, encrypt and set retention.
删除要能传到训练集、索引、缓存、备份和派生数据。模型权重是否“忘记”某条数据,目前没有通用保证。能做的是停止继续使用、记录数据来源、在检索层移除、在微调数据中删除,并在模型卡里写清限制。不要把“重新训练一次”当成删除证明。Deletion must propagate to training sets, indexes, caches, backups and derived data. There is no general guarantee that model weights “forget” a record; what you can do is stop further use, record provenance, remove it from retrieval, remove it from fine-tuning data and state the limit in the model card. Do not treat one retraining run as proof of deletion.
- 按字段做最小化:用途不需要的字段不采、不存、不传给第三方。Minimise by field: do not collect, store or send fields the purpose does not need.
- 对直接标识符与准标识符分别处理:姓名、电话、身份证、设备 ID、位置、时间组合都可能重识别。Handle direct and quasi-identifiers separately: names, phones, IDs, device IDs, location and time combinations can re-identify.
- 访问分权:标注、训练、评测、审计看到的数据范围不同,默认最小权限。Separate access: annotation, training, evaluation and audit see different scopes; least privilege by default.
- 保留期限与删除流程写进合同和 runbook,不靠某个人记得删。Put retention and deletion into contracts and a runbook; do not rely on someone remembering to delete.
- 在数据卡和模型卡写清“不能保证完全遗忘”,把检索层与微调层的删除路径分开。State in the dataset and model cards that full forgetting is not guaranteed; separate retrieval-layer and fine-tuning-layer deletion paths.
9 · 成本:按“可用样本”算,不按“下载量”算9 · Cost: price usable examples, not downloaded volume
数据成本最容易低估的是人工与返工。下载和存储很便宜,清洗、标注、质检、法律核对和返工很贵。一批数据从 3TB 洗到 2TB,真正可用可能只有几十万条。报价或排期要按“验收通过的可用样本”算,并把标注轮次、返工比例和审核时间写进去。The most underestimated data costs are labour and rework. Download and storage are cheap; cleaning, labelling, QA, legal review and rework are not. A batch cut from three terabytes to two may yield only a few hundred thousand usable records. Quote and schedule per accepted usable example, with annotation rounds, rework rate and review time written in.
成本要分“一次性”和“持续”两部分:一次性是采集、清洗、标注、评测集建设。持续是更新、去重、漂移监控、删除请求、许可复核。只算一次性,上线后会被维护成本拖住。Split cost into one-off and ongoing: one-off covers collection, cleaning, labelling and evaluation-set construction; ongoing covers refresh, deduplication, drift monitoring, deletion requests and licence review. Counting only the one-off leaves maintenance to surprise you after launch.
获取 / 授权
单位:批 / 合同
为什么会失控:来源分散、条款逐个谈
控制办法:先做来源清单与优先级Acquisition / licensing
Unit: Batch / contract
Why it runs away: Scattered sources, term-by-term negotiation
Control: Source list and priority first
存储 / 传输
单位:GB / 月
为什么会失控:原始、中间、派生全量保留
控制办法:分层存储与保留期限Storage / transfer
Unit: GB per month
Why it runs away: Keeping raw, intermediate and derived copies
Control: Tiered storage and retention
清洗
单位:小时 / 万条
为什么会失控:规则反复改、无抽样验证
控制办法:先小批试跑,再全量Cleaning
Unit: Hours per 10k records
Why it runs away: Rules change repeatedly without sampling
Control: Pilot on a small batch before scaling
标注
单位:条 / 轮
为什么会失控:指南不清、双标变多标
控制办法:试标与一致性门槛Labelling
Unit: Items per round
Why it runs away: Unclear guideline, double annotation becomes many
Control: Pilot and agreement threshold
质检
单位:抽检比例
为什么会失控:只查总数、不查分层
控制办法:按来源/难度/时间分层QA
Unit: Audit rate
Why it runs away: Totals checked without stratification
Control: Stratify by source, difficulty and time
返工
单位:轮 / 批
为什么会失控:验收标准临时改
控制办法:验收表 + 变更单Rework
Unit: Rounds per batch
Why it runs away: Acceptance criteria change late
Control: Acceptance table plus change order
法律 / 合规
单位:次 / 批
为什么会失控:等出了问题再补
控制办法:上线前按权利层核对Legal / compliance
Unit: Review per batch
Why it runs away: Only after an incident
Control: Check by rights layer before launch
10 · 失败分支:先停批,再定位,不要先训完10 · Failure branches: stop the batch, locate the cause, do not train first
数据问题一旦进入训练,修复成本会成倍上升。看到许可不清、来源断链、标签漂移、测试泄漏或个人信息混入,先把对应批次隔离,再定位是采集、清洗、标注、切分还是版本问题。不要用“先训一版看看”换取暂时的进度。Once a data problem enters training, the fix cost multiplies. When a licence is unclear, provenance is broken, labels drift, test data leaks or personal data appears, isolate the batch first, then locate whether the cause is collection, cleaning, labelling, splitting or versioning. Do not trade a temporary schedule gain for “train one version and see”.
许可说不清
先查:来源、条款快照、授权范围
常见根因:只记了网址,没存条款
处理:停批,补授权或替换Unclear licence
Check first: Source, terms snapshot, scope
Likely cause: URL saved without terms
Fix: Stop the batch; add authorisation or replace
重复样本很多
先查:精确/近重复率、来源集中度
常见根因:多站转载、模板复制
处理:按簇去重,保留代表样本Many duplicates
Check first: Exact/near-duplicate rate, source concentration
Likely cause: Syndication, template copying
Fix: Deduplicate clusters, keep representatives
标签前后不一致
先查:指南版本、标注员、时间
常见根因:指南改了没复标
处理:重跑金标,按新指南返工Label drift
Check first: Guideline version, annotator, time
Likely cause: Guideline changed without relabelling
Fix: Rerun gold set, rework under new guideline
分数异常高
先查:训练/测试重叠、近重复、基准污染
常见根因:随机切分或题目泄漏
处理:重建分组切分,去污染后复测Suspiciously high score
Check first: Train/test overlap, near-duplicates, benchmark contamination
Likely cause: Random split or leaked items
Fix: Rebuild grouped splits, decontaminate, retest
含个人信息
先查:字段、识别器召回、人工抽检
常见根因:脱敏只做了正则
处理:隔离、脱敏、复检、记录删除Personal data present
Check first: Fields, detector recall, human audit
Likely cause: Regex-only redaction
Fix: Isolate, redact, re-audit, log deletion
类别严重失衡
先查:按来源/难度的分布
常见根因:清洗把少数类过滤掉
处理:分层保留,补采样或加权Severe class imbalance
Check first: Distribution by source and difficulty
Likely cause: Cleaning removed the minority class
Fix: Stratify, resample or reweight
来源页面已失效
先查:快照、哈希、镜像
常见根因:只存了 URL
处理:用快照复核;无法复核则下架Source page gone
Check first: Snapshot, hash, mirror
Likely cause: Only the URL was stored
Fix: Check the snapshot; remove if unverifiable
11 · 一条最小路径:从用途句到可复现数据卡11 · A minimum path: from purpose sentence to reproducible dataset card
下面这条路径适用于一批要用于微调、评测或 RAG 的数据。每一步都留下证据,下一才能开始。This path fits a batch intended for fine-tuning, evaluation or RAG. Each step leaves evidence before the next begins.
- 写用途句:输入、输出、判定、使用场景和不做什么。Write the purpose sentence: input, output, judgement, use case and what it will not do.
- 列来源与权利清单:来源、条款、授权、同意、地域、期限、禁止用途。List sources and rights: source, terms, authorisation, consent, territory, duration and prohibited uses.
- 建来源凭证:URL/ID、抓取时间、状态、许可快照、哈希、采集参数。Build provenance: URL/ID, retrieval time, status, licence snapshot, hash and collection parameters.
- 小批试洗:编码、模板、语言、PII、去重、质量与安全过滤,记录保留率。Pilot cleaning: encoding, boilerplate, language, PII, deduplication, quality and safety filtering; record retention.
- 写标注指南并试标 30–50 条:边界例、反例、一致性、分歧。Write the labelling guideline and pilot 30–50 items: boundary cases, counterexamples, agreement, disputes.
- 正式标注与裁决:双标、金标、抽检、漂移记录。Annotate and adjudicate: double annotation, gold set, audit, drift log.
- 分组切分与污染检查:实体/时间/来源分组,近重复与基准比对。Grouped splits and contamination checks: entity/time/source groups, near-duplicate and benchmark comparison.
- 锁版本:数据哈希、代码、配置、种子、环境、许可快照、变更记录。Lock versions: data hash, code, config, seed, environment, licence snapshot, changelog.
- 写数据卡并交付:用途、来源、字段、规模、偏差、禁止用途、删除路径。Write the dataset card and deliver: purpose, sources, fields, size, biases, prohibited uses and deletion path.
- 上线后监控:重复率、分布漂移、来源失效、删除请求、许可变化。Monitor after launch: duplicate rate, distribution drift, source failure, deletion requests, licence changes.
来源与延伸阅读Sources and further reading
以下链接用于核对事实、许可证与官方口径。外部页面可能更新;引用时以原文与核验日为准。These links are for checking facts, licences and official scope. External pages may change; cite the original text and check date.
- Datasheets for DatasetsDatasheets for Datasets数据集应记录的动机、构成、采集、处理、用途与维护信息。Motivation, composition, collection, processing, uses and maintenance that a dataset should document.
- Model Cards for Model ReportingModel Cards for Model Reporting模型卡如何记录用途、性能、局限与伦理考虑;与数据卡互相引用。How model cards record intended use, performance, limitations and ethical considerations; cross-reference with dataset cards.
- NIST AI Risk Management FrameworkNIST AI Risk Management Framework数据治理、风险识别与证据留存的框架;不是某一行业的合规结论。A framework for data governance, risk identification and evidence; not a compliance conclusion for a sector.
- Common Crawl · Terms of UseCommon Crawl · Terms of Use网页语料抓取与使用的条款边界;抓取前先读。Terms boundaries for crawling and using web corpora; read before collection.
- Creative Commons · 许可说明Creative Commons · LicencesCC 各许可的署名、商用、改编与再分发条件。Attribution, commercial use, adaptation and redistribution conditions across CC licences.
- NIST SP 800-122 · PII 指南NIST SP 800-122 · PII guide个人可识别信息的识别、分类与保护参考。Reference for identifying, classifying and protecting personally identifiable information.
- Data Statements for NLPData Statements for NLP为语言数据记录说话者、语言变体、采集情境与偏差。Recording speakers, language varieties, collection context and bias for language data.
- Deduplicating Training Data Makes Language Models BetterDeduplicating Training Data Makes Language Models Better训练数据去重对记忆、泄露与训练效率的影响。How training-data deduplication affects memorisation, leakage and training efficiency.
下一步Next
- 回到“数据与训练”路线Back to the data route
- 下一步:把隐私和上线门禁接上Next: connect privacy and launch gates
- 看其他 15 条主题路线Browse the other 15 topic routes
如果你照着做时卡住了,先回到对应主题路线,不要从头重读。If you get stuck while following it, go back to the matching route instead of rereading the whole guide.
← 回到首页← Back to home 发现错误?提交纠错Spot an error? Send a correction