AS AgentScopeAPI 手册 / API Reference
PROJECT P2 · Research Analyst · 350 XP

研究分析师Research Analyst

带证据链的竞品尽调 AgentCompetitive research with an evidence chain

类比Analog Perplexity Deep Research / GensparkPerplexity Deep Research / Genspark 难度Level 进阶Advanced 专注Focus 10h · 14 天days 技能Skills 检索增强Retrieval & RAG流程编排Orchestration生产意识Production readiness状态与会话State & sessions

项目计时Project clock

能专注时再开始。计时与截止保存在本机浏览器;离开时记得暂停。Start when you can focus. The clock and deadline persist in this browser; pause whenever you leave.

项目计时Project timebox 未开始Not started —
00:00:00 专注时长focus time
350 完成奖励 XPXP on finish
里程碑Milestones 0 / 5
交付物Deliverables 0 / 5
时间预算Time budget 10h 完成窗口Window 14 天14 days 节奏Cadence 建议 5 次 × 2 小时,两周内交付Five 2-hour sessions across two weeks

项目简报Brief

投资团队要在 48 小时内完成一份竞品尽调。资料来自 20 份公开文档、访谈纪要和内部笔记;报告中的每条结论都必须能追溯到证据,冲突观点要显式列出,没有证据时必须说“不知道”。

An investment team needs competitive due diligence in 48 hours. Sources include 20 public documents, interview notes and internal memos. Every claim must trace to evidence, conflicting views must be explicit, and the agent must say “unknown” when evidence is missing.

交付定义Definition of done

一套研究流水线:分块与索引、带引用的检索、researcher/critic 两段式评审、12 题评测集,最终产出带证据映射和局限说明的 brief。

A research pipeline: chunking and indexing, citation-first retrieval, a researcher/critic review loop, a 12-question evaluation set, and a brief with an evidence map and limitations.

产物契约Artifact contract

先冻结产物形状,再写 Agent。后续里程碑与评测都读取这份契约。Freeze the shape before writing the agent. Every later milestone and evaluation reads this contract.

ResearchBrief 与证据映射 / ResearchBrief and evidence map
{
  "question": "How does competitor X price enterprise seats?",
  "claims": [
    {
      "claim": "Enterprise starts at $40/seat/month",
      "citations": ["doc-03#pricing", "doc-11#enterprise"],
      "confidence": "high"
    }
  ],
  "unknowns": ["volume discount floor"],
  "contradictions": ["doc-03 says $40, doc-07 says $35"]
}

里程碑Milestones

每条验收成立后再勾选里程碑。小时数是预算,不是秒表目标。Check each milestone only when its acceptance holds. Hours are a budget, not a stopwatch target.

  1. 把 20 份资料入库;保留标题、来源、日期与段落元数据;按标题或 300–500 token 切分并去重。

    Ingest 20 sources; keep title, source, date and paragraph metadata; split by heading or 300–500 tokens and dedupe.

    验收Acceptance

    manifest 能列出 20 份文档与稳定 chunk id;重复运行 chunk 数不变。

    A manifest lists 20 documents with stable chunk ids; rerunning produces the same chunk count.

  2. 建立索引;每个 claim 的引用必须包含 source、heading、chunk id 与 score;阈值按实际分布校准。

    Build the index; every claim citation includes source, heading, chunk id and score; calibrate thresholds to the actual score distribution.

    验收Acceptance

    抽 5 个问题,top-k 能命中证据段;引用不存在的 chunk 数为 0。

    For five sampled questions, top-k hits the evidence section; zero citations point to absent chunks.

  3. researcher 起草,critic 用结构化 verdict 指出 unsupported/missing;最多两轮改写,验证至少一次拒绝。

    The researcher drafts; the critic returns a structured verdict listing unsupported/missing items; cap revisions at two and record at least one rejection.

    验收Acceptance

    trace 中有 reject → revise → approve;critic 与 researcher 使用独立上下文。

    The trace shows reject → revise → approve; critic and researcher use separate contexts.

  4. 构造 12 道题(3 道无答案);统计引用精确率、无依据断言率与正确拒答率;跑两次结果一致。

    Build 12 questions including 3 unanswerable; measure citation precision, unsupported-claim rate and correct abstention; two runs match.

    验收Acceptance

    三项指标达到门槛;无答案题不允许编造。

    All three metrics meet the thresholds; unanswerable questions are not fabricated.

  5. 写出 brief、证据映射、冲突说明与局限;用费曼方式解释“引用精确率为什么比召回率更值得先抓”。

    Write the brief, evidence map, contradictions and limitations; explain in Feynman style why citation precision matters before recall.

    验收Acceptance

    随机抽 5 条结论可在 1 分钟内定位证据;README 可复现全流程。

    Five random claims can be traced to evidence within a minute; the README reproduces the whole pipeline.

交付物Deliverables

每项交付物必须真实存在且可复现。完成门槛会检查全部勾选,再要求复盘。Every deliverable must exist on disk and be reproducible. The finish gate checks all boxes, then asks for a reflection.

  1. 8–12 条结论,每条带引用;开头给出 TL;DR 与已知未知。

    8–12 claims, each cited; open with a TL;DR and known unknowns.

  2. claim → source / heading / chunk id / score;报告中的每条引用都能在这里找到。

    Claim → source / heading / chunk id / score; every citation in the brief resolves here.

  3. 列出相互矛盾的证据、取舍理由与仍然未知的问题。

    List conflicting evidence, why you chose one reading, and what remains unknown.

  4. 12 道题(含 3 道无答案);引用精确率 ≥ 0.8,无依据断言 ≤ 10%,应拒答全部拒答。

    12 questions including 3 unanswerable; citation precision ≥ 0.8, unsupported claims ≤ 10%, and all unanswerable cases abstain.

  5. 语料来源、切分参数、检索阈值、失败模式与复现命令。

    Corpus sources, chunking parameters, retrieval thresholds, failure modes and reproduction commands.

评分表Rubric

宣告完成前诚实自评。低于 80 分意味着该迭代,而不是该交付。Grade yourself honestly before calling it done. Anything below 80 is a signal to iterate, not to ship.

评分项Criterion分值Points达标标准What good looks like
证据与引用Evidence and citations30

每条结论可定位;引用含 source/heading/chunk/score;无凭空引用。

Every claim is locatable; citations carry source/heading/chunk/score; no invented references.

分析与冲突处理Analysis and contradictions25

结论有取舍、有边界;冲突观点显式列出,不强行统一。

Claims show judgment and limits; conflicting views are explicit instead of flattened.

编排与评审Orchestration and review20

critic 独立、verdict 结构化、重试有上限;能看到拒绝和改写。

Independent critic, structured verdict, capped retries; rejections and revisions are visible.

评测质量Evaluation15

问题集覆盖边界与无答案;指标可复算;两次运行一致。

Question set covers edges and abstention; metrics are recomputable; two runs agree.

交付与复盘Delivery and reflection10

brief 可读、局限诚实、README 可复现。

Readable brief, honest limits, reproducible README.

合计Total100

双轨实现Build on your track

交付物不绑定语言。按团队需要选择轨道;完成记录会保存你交付所用的轨道。The deliverable is language-agnostic. Follow the track that fits the team; the finish record stores the track you shipped on.

当前轨道Current track
Python 2.0.11 轨道Track

用 KnowledgeBase 做检索与引用,用第二个 Agent 做独立评审;报告只能从 hits 生成,模型记忆不是事实源。

Use KnowledgeBase for retrieval and citations, and a second agent as independent reviewer; generate the report from hits, never from model memory.

01

语料与索引Corpus and index

ApproxTokenChunker 或标题切分保留语义边界;metadata 存 source/heading/date,评测时才能定位。

Use ApproxTokenChunker or heading splits to preserve semantics; store source/heading/date in metadata so evals can locate evidence.

02

检索与引用Retrieval and citations

先打印分数分布再定阈值;哈希嵌入的分数偏低,不要直接套生产阈值。

Print the score distribution before setting a threshold; hash embeddings score low, so do not reuse a production threshold.

03

评审与拒答Review and abstention

critic 返回 Review(approved, reasons, missing);缺证据时明确写入 unknowns,禁止补写。

The critic returns Review(approved, reasons, missing); missing evidence goes into unknowns instead of being filled in.

Python 2.0.11 · skeleton
hits = await knowledge.retrieve(question, top_k=5)
context = render_citations(hits)          # source + heading + chunk + score

draft = await researcher.reply(UserMsg("user", brief_prompt(question, context)))
review = await critic.reply(
    UserMsg("user", review_prompt(draft)),
    structured_schema=Review,
)

# 未通过时,把 review.missing 作为下一轮输入;最多两轮。
assert all(citation in evidence_index for citation in draft.citations)

引用只写文件名:报告看起来有引用,但无法定位到段落。证据必须带 source + heading + chunk id + score。

Citations that only name a file look sourced but cannot be located. Evidence needs source + heading + chunk id + score.

Java 2.0.4 轨道Track

用 SimpleKnowledge + rag-simple 检索,ReActAgent 起草与评审;RetrieveConfig 的阈值必须按你的嵌入分布校准。

Use SimpleKnowledge from rag-simple for retrieval, with ReActAgent drafting and reviewing; calibrate RetrieveConfig thresholds to your embedding distribution.

01

知识库Knowledge base

用 SimpleKnowledge 入库;返回的 Document 保留 metadata,引用映射从 metadata 生成。

Ingest with SimpleKnowledge; keep Document metadata and build the citation map from it.

02

阈值与 top-kThreshold and top-k

RetrieveConfig.builder().limit(5).scoreThreshold(0.0) 先跑通,再按分数分布提高阈值。

Start with RetrieveConfig.builder().limit(5).scoreThreshold(0.0), then raise the threshold from the score distribution.

03

结构化评审Structured review

评审用 record + call(..., Review.class, ...);不要用字符串判断通过。

Use a record + call(..., Review.class, ...); never judge approval from a string.

Java 2.0.4 · skeleton
SimpleKnowledge knowledge = SimpleKnowledge.builder()
        .embeddingModel(embeddingModel)
        .build();

List<Document> hits = knowledge.retrieve(question,
        RetrieveConfig.builder().limit(5).scoreThreshold(0.0).build())
        .block();

String context = renderCitations(hits);
Review review = critic.call(List.of(Msg.user(reviewPrompt(draft))), Review.class, ctx).block();

把默认 0.5 阈值直接用在哈希嵌入上,会检索为空,然后模型开始编造;先打印分数分布再定阈值。

Applying the default 0.5 threshold to hash embeddings returns nothing and the model starts inventing; print the score distribution first.

进阶与资源Stretch goals and resources

  • 加入时间加权:同一问题的旧资料降权,冲突时优先近期来源。

    Add recency weighting: down-rank stale sources and prefer recent ones when claims conflict.

  • 把证据映射导出为可点击的 HTML,引用可跳转到原文段落。

    Export the evidence map as clickable HTML that jumps to the source paragraph.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.