用途
persona-seed 用于从人口语料库种子提供者(population / corpus seed providers)创建 OpenPersona 包。它被定位为一个编排技能(orchestration skill),可对接多个语料提供者(corpus providers),其中 MatrAIx Persona 1M 是第一个适配器,而非特殊产品路径。
依赖链为:persona-seed → skills/open-persona → openpersona create。
同类技能(sibling)为 anyone-skill,用于对特定主体进行证据蒸馏。资料建议:面向真实人物 / 命名角色时优先使用 anyone-skill;面向来自语料库的人口采样与原型时优先使用 persona-seed。
触发方式
触发短语包括:
- /persona-seed
- "create a persona from MatrAIx"
- "sample a persona from Persona 1M"
- "pick a seed profile and generate a pack"
- "从人口语料里生成人格包"
架构
处理流程如下:
user intent → provider.search (attribute filter) → agent re-rank + user pick → provider.fetch + toSeed → SeedProfile → fill gaps (name, role, boundaries…) → map-seed-to-persona.js → persona.json → openpersona create --config … → write-provenance.js → soul/seed-provenance.json
相关契约:references/provider-contract.md
相关模式(schema):schemas/intent.schema.json、schemas/seed-profile.schema.json
注册表:providers/registry.json(hfRepo / provider id → module;/datasets 发布 ≠ seed-capable)
提供者:providers/<id>/ 模块,需显式注册。
工具(脚本)
需将 SEED_DIR 设置为该技能目录(包含 SKILL.md 的路径)。
- 列出注册表:node ${SEED_DIR}/scripts/search.js --list-providers
- 可作种子(seed-capable)的 HF 仓库:node ${SEED_DIR}/scripts/search.js --seed-capable
- 列出提供者能力:node ${SEED_DIR}/scripts/search.js --capabilities
- 按 HF 仓库查看能力:node ${SEED_DIR}/scripts/search.js --repo MatrAIx2026/MatrAIx_Persona_1M --capabilities
- 搜索种子:node ${SEED_DIR}/scripts/search.js --intent '<json>'
- 获取原始数据:node ${SEED_DIR}/scripts/search.js --fetch --id <id>
- 转换为 SeedProfile:node ${SEED_DIR}/scripts/search.js --to-seed --id <id>
- 映射为 persona.json:node ${SEED_DIR}/scripts/map-seed-to-persona.js --seed <seed.json> --overrides '<json>' --out persona.json
- 写入溯源:node ${SEED_DIR}/scripts/write-provenance.js --pack <packDir> --seed <seed.json>
- 完整流水线:node ${SEED_DIR}/scripts/run-pipeline.js --intent '<json>' --name "…" --slug … --role assistant --out <dir>
- 校验语料:node ${SEED_DIR}/scripts/prepare-corpus.js --validate <corpus.json|.jsonl>
默认语料为离线 fixture(5 行),位于 providers/matraix-persona-1m/fixtures/。capabilities() / provenance 会报告 corpusMode: "fixture" 和一个 fixture dataset id,而非 Hugging Face 1M 发布版。
更大语料(按提供者):
MatrAIx — 可选下载 + 解码(需 python3 + pyarrow [+ huggingface-cli])
bash ${SEED_DIR}/scripts/decode-matraix.sh --download --limit 1000 export MATRAIX_CORPUS_PATH=./matraix-1m.decoded.json
Nemotron Personas USA — 将 HF 行导出为 JSON/JSONL,然后:
export NEMOTRON_CORPUS_PATH=./nemotron-usa.jsonl node ${SEED_DIR}/scripts/search.js --repo nvidia/Nemotron-Personas-USA --intent '{"domain":["software"]}'
空过滤结果返回 [](不会静默回退到未过滤结果)。若搜索为空,应重新检查意图。
使用方式(分阶段流程)
Phase 0 — 路由:如果用户想要有证据支撑的特定真实人物 / 命名角色 → 转交 anyone-skill。如果用户想要采样原型 / 语料种子 → 继续此技能。确认提供者(默认 matraix-persona-1m)。
Phase 1 — 意图:抽取一个 Intent 对象(参见 schemas/intent.schema.json),字段包括 roleHint、domain、traits、locale、region、exclude、query、limit(默认 5)。不要替用户臆造 MatrAIx 属性名;保持意图为此规范化形状。
Phase 2 — 搜索 + 重排:运行 search.js --intent …(属性过滤打分)。若数组为空,应拓宽或改写意图——不要臆造命中项。由 agent 依据用户自由文本目标对候选短名单重新排序。展示 3–5 个候选(摘要 + 亮点 + corpusMode),请用户挑选一个(或在确认后自动选择最优)。
Phase 3 — SeedProfile:运行 node ${SEED_DIR}/scripts/search.js --to-seed --id <chosen-id> > /tmp/seed-profile.json。展示 identity.summary、关键特质、缺口(gaps)以及 constraints.sensitiveFlags。与用户一起补齐缺口:必需项为 personaName、slug、role;建议项为 boundaries(尤其在 healthcare_domain 被标记时)。绝不要为 MatrAIx / 统计种子设置 soul.identity.sourceIdentity。
Phase 4 — persona.json + 创建:
node ${SEED_DIR}/scripts/map-seed-to-persona.js
--seed /tmp/seed-profile.json
--overrides '{"personaName":"…","slug":"…","role":"mentor"}'
--out /tmp/persona.json
随后遵循 skills/open-persona 生成 / 安装:
npx openpersona create --config /tmp/persona.json --output <dir> --install
(或该仓库中可用的等价非交互式 create 标志)
Phase 5 — 溯源:在包目录存在后:
node ${SEED_DIR}/scripts/write-provenance.js --pack <packDir> --seed /tmp/seed-profile.json
仅写入 soul/seed-provenance.json —— 不会向 persona.json 添加未知的根键。
适用场景
适用于从人口语料库中按属性过滤采样原型人格、生成 OpenPersona 包的工作流;适用于需要可插拔语料提供者、需要来源溯源记录的场景;可通过添加 providers/<id>/ 模块接入更多语料。
伦理与限制
- 语料种子是原型,不是在世人物的数字孪生。
- 有人类基础的 MatrAIx 行是去标识化的统计档案——仍然不得声称 "I am that person."。
- 尊重 capabilities() 中的数据集许可说明。
- 被标记为 healthcare 的种子必须保留临床非权威(non-authority)边界。
- 空过滤结果返回 [],不会静默回退到未过滤结果。
- 默认语料为离线 fixture(5 行),并非 Hugging Face 1M 发布版。
扩展新语料
若模式匹配,优先使用已有族适配器(family adapter)。否则添加实现该契约的 providers/<id>/。在 providers/registry.json 中注册(hfRepos、family、status)。无需新增编排技能——复用此技能。仅 /datasets 列表本身并不足够。