chatlab-analyze

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ChatLab Analyze

ChatLab 分析

Query and analyze records already imported into ChatLab through the read-only
clb
CLI.
Follow the user's requested response language; otherwise use the conversation language, preserving the user's Chinese variant when applicable. Keep commands, field names, IDs, and evidence markers unchanged.
For importing a new chat export, use
chatlab-import
when available; otherwise follow
clb import --help
and preview the exact import before writing.
通过只读的
clb
CLI 查询和分析已导入 ChatLab 的记录。
遵循用户要求的回复语言;否则使用对话语言,适用时保留用户的中文变体。命令、字段名、ID 和证据标记保持不变。
如需导入新的聊天导出文件,优先使用
chatlab-import
(若可用);否则参照
clb import --help
的说明,并在写入前预览确切的导入内容。

Workflow

工作流程

1. Prepare the Query

1. 准备查询

Load the current command contract once per task. List sessions only when the target is not already known:
bash
clb manifest
clb sessions list --format json
Reuse the session, member, and time range already identified in the conversation. Ask only when the returned candidates and context cannot resolve a material ambiguity. If the CLI is unavailable, report the missing capability; installation requires authorization.
每个任务加载一次当前命令契约。仅当目标未知时才列出会话:
bash
clb manifest
clb sessions list --format json
复用对话中已确定的会话、成员和时间范围。仅当返回的候选结果和上下文无法解决实质性歧义时才进行询问。如果 CLI 不可用,说明缺失该能力;安装需要授权。

2. Start with a Dedicated Command

2. 从专用命令开始

Use the simplest command that directly answers the question:
bash
clb messages search "<keyword>" --session <session-id> --format agent
clb messages between --member me --member <member> --session <session-id> --last 90d --format agent
clb topics list --session <session-id> --last 30d --format agent
Use
--format agent
for message text and
--format json
for structural scouting such as sessions, members, counts, and
--no-content
searches.
使用能够直接回答问题的最简单命令:
bash
clb messages search "<keyword>" --session <session-id> --format agent
clb messages between --member me --member <member> --session <session-id> --last 90d --format agent
clb topics list --session <session-id> --last 30d --format agent
消息文本查询使用
--format agent
,会话、成员、计数等结构探查以及
--no-content
搜索使用
--format json
。

3. Add Context or Statistics

3. 添加上下文或统计信息

Only deepen the query when the first result is insufficient:
bash
clb messages context --id 1021 --session <session-id> --window 10 --format agent
clb stats keywords --session <session-id> --member <member> --last 90d --top 20 --format json
When more evidence is needed and
meta.hasMore
is true, continue with
--cursor <meta.nextCursor>
and the same query conditions. Stop when the question is answered; disclose any partial coverage instead of treating a page as the complete dataset.
仅当首次返回结果不足时才深化查询:
bash
clb messages context --id 1021 --session <session-id> --window 10 --format agent
clb stats keywords --session <session-id> --member <member> --last 90d --top 20 --format json
当需要更多证据且
meta.hasMore
为 true 时,使用
--cursor <meta.nextCursor>
和相同的查询条件继续查询。问题得到解答后即停止;需说明部分覆盖情况,切勿将单页结果视为完整数据集。

4. Use SQL Only as a Fallback

4. 仅将 SQL 作为备用方案

Use read-only SQL only when no dedicated command can answer the question:
bash
clb schema --session <session-id> --format json
clb sql "SELECT COUNT(*) AS n FROM message" --session <session-id> --format json
仅当没有专用命令可以回答问题时,才使用只读 SQL:
bash
clb schema --session <session-id> --format json
clb sql "SELECT COUNT(*) AS n FROM message" --session <session-id> --format json

Privacy and Answers

隐私与答复

  • Queries keep privacy preprocessing enabled; do not use
    --raw
    or mutate data/config. A separate request to import follows the import workflow.
  • Never reveal full chat dumps. ChatLab's safe output applies the user's privacy preprocessing.
  • Cite available evidence with
    [#1021]
    ,
    [#1021*]
    , or
    [#1021-1024]
    . Only individual IDs can be passed to
    messages context --id
    ; merged ranges are display-only.
  • Start with the answer, name the queried session and time range, then separate observed facts from interpretation.
  • Avoid overclaiming emotional intent in relationship analysis. Follow
    error.hint
    only when the correction is clear.
  • 查询保持隐私预处理启用状态;请勿使用
    --raw
    或修改数据/配置。单独的导入请求需遵循导入工作流程。
  • 切勿泄露完整的聊天转储内容。ChatLab 的安全输出会应用用户的隐私预处理规则。
  • 使用
    [#1021]
    、
    [#1021*]
    或
    [#1021-1024]
    引用可用证据。只有单个 ID 可以传递给
    messages context --id
    ;合并范围仅用于展示。
  • 先给出答案,说明查询的会话和时间范围,再将观察到的事实与解读分开。
  • 在关系分析中避免过度推断情感意图。仅当修正方向明确时,才遵循
    error.hint
    。