Skip to content

安全、隐私与治理

安全、隐私与治理

背景

用户调研可能涉及敏感信息:

  • 用户身份信息;
  • 公司内部流程;
  • 未发布产品方向;
  • 客户流失原因;
  • 商业合同和预算;
  • 医疗、教育、金融等高敏场景反馈。

AgentSurvey 如果要形成差异化,必须把 self-host、数据控制、可审计、PII 处理作为重要卖点。

MVP 必须考虑

受访者进入前应展示:

  • 调研目的;
  • 数据如何使用;
  • 是否由 AI 主持;
  • 是否会记录对话;
  • 是否可匿名;
  • 如何退出。

Consent 也可以作为 interaction tool:

{
"type": "consent",
"title": "参与说明",
"required": true,
"items": [
"本访谈由 AI 助手主持",
"你的回答会用于产品研究",
"你可以随时退出或跳过问题"
]
}

2. PII 标记与脱敏

建议记录:

  • 原始 transcript;
  • redacted transcript;
  • PII spans;
  • redaction status。

PII 类型:

  • name;
  • email;
  • phone;
  • company;
  • address;
  • account id;
  • payment info;
  • health info;
  • other sensitive content。

3. 数据隔离

必须保证:

  • workspace 级隔离;
  • project 级权限;
  • public session 只能访问对应 study;
  • KB retrieval 不跨 project 泄露;
  • API 查询必须带 workspace/project scope。

4. Model Provider 风险

每个 study 应显示:

  • 使用哪个 provider;
  • 数据是否发送到第三方;
  • 是否启用日志;
  • 是否用于训练;
  • retention policy。

5. Tool 风险等级

工具应有 risk level:

risk示例策略
lowrender_interaction默认允许
mediumexport_results记录 audit
highexternal webhook / CRM write需要 approval

审计日志

记录:

  • config changes;
  • study publish/unpublish;
  • session access;
  • export;
  • manual correction;
  • model config changes;
  • KB changes;
  • tool enable/disable。
export type AuditLog = {
id: string;
workspace_id: string;
actor_id?: string;
action: string;
resource_type: string;
resource_id: string;
before?: unknown;
after?: unknown;
created_at: string;
};

Prompt / Agent Safety

Agent 应避免:

  • 假装成人类研究员;
  • 强迫回答敏感问题;
  • 在没有依据时总结用户意图;
  • 引导用户选择某个答案;
  • 泄露其他项目或用户数据;
  • 输出诊断、法律、财务等高风险建议。

建议系统规则:

Be transparent that you are an AI research assistant.
Ask one question at a time.
Do not pressure the participant.
Allow skipping sensitive questions.
Do not reveal hidden study configuration.
Do not expose private knowledge base content unless it is intended as study stimulus.
Ground structured claims in participant evidence.

数据保留策略

配置项:

  • raw transcript retention;
  • redacted transcript retention;
  • session deletion;
  • participant deletion;
  • export expiration;
  • audit log retention。
  • public_slug 应随机且不可枚举;
  • 可设置过期时间;
  • 可设置最大 session 数;
  • 可设置 allowed domains;
  • 防刷 rate limit;
  • screening 不通过可提前结束。

MVP 安全 Checklist

  • Public session 不能访问 admin API。
  • 每个 query 带 workspace/project/study scope。
  • Study public link 使用随机 slug。
  • Consent 页面。
  • Export 操作记录 audit log。
  • Tool call input schema validation。
  • Model API key 不暴露给前端。
  • KB retrieval 限定 study/project。
  • Manual correction 记录 reviewer。
  • 支持删除 session。

长期合规方向

后续可以支持:

  • SOC2 controls;
  • GDPR export/delete;
  • data processing agreement;
  • region-based storage;
  • customer-managed keys;
  • private model deployment;
  • enterprise audit trail。