Skip to content

Using the Bot in Team Chat ​

A knowledge Bot in team chat runs the same Context Skills you use locally, so one Bot can answer questions, start production and updates, and take people through report reviews. These are the interaction patterns that work well when the Context Skills run behind a team chat Bot. Setting up the service behind it is covered in Building a Knowledge Service; this page is about using it day to day.

What to ask ​

Ask the Bot the way you would ask a colleague who has read the team's knowledge:

text
@Bot What does this knowledge base cover, and where is its website?
@Bot Why does <feature> reject <case>? Show me the code and the document that define it.
@Bot How do I install this knowledge package in my Agent?

The Bot reads the team's approved knowledge first and goes back to the original code and documents only when the knowledge leaves a real gap. How to phrase a question so the answer comes back precise is in Asking Questions. Installing the same knowledge in your own Agent is in Using a Package in Your Agent.

What you see in the thread ​

  • A task replies with three kinds of messages: start, progress and final result. The Bot keeps updating the same progress message instead of posting many.
  • The Bot asks only when someone must decide — confirming a work-start report, confirming publication, choosing a scope — and offers selectable options. Nobody has to reply with a code word or review code. See Confirming the Work-Start Report.
  • When you finish reviewing the diff report on the website, the workflow continues from there; you do not need to come back to chat to confirm.
  • Committing the knowledge repository and publishing the package and site complete without interruptions. The Bot stops only for a diff review, a permission problem or a disagreement.

Answers people can check ​

  • Every answer carries clickable sources: knowledge pages, code lines with their commit, and original documents. "According to the knowledge package" alone is too abstract to verify.
  • Each answer has thumbs-up and thumbs-down ratings. Ratings and the conversation are used together to improve retrieval and prompts.

Saving what you learned ​

When an answer is worth keeping, ask the Bot in the same thread to save it as knowledge. The chat, a document you just shared, or a specific piece of code or merge request can all become sources.

text
@Bot Save the conclusion of this thread as knowledge, and include the document I just shared.

The Bot first proposes a plan, runs the update, then gives you a diff report against the website. Read the report, then either send revision notes or confirm; publishing then completes on its own. What to look for is in Reading Review Reports, and how a conversation becomes a source is in Capturing from Conversations.

You can also ask for an update of the whole knowledge base or part of it. The Bot works out what changed upstream in documents and code since the last update, presents an update plan, then a diff report against the website.

Scheduled patrols run at fixed times, track upstream changes and capture knowledge. A patrol prompt must state its scope, what to do when nothing changed, and which situations need a person. See Scheduled Updates.

Speed ​

  • Cold start is the main reason a first answer is slow. Preinstall the CLI, the knowledge packages and the knowledge workspace in the runtime so that sessions do not install and clone each time.
  • Read knowledge first, and read originals remotely only when the evidence is not enough — fetch code by commit through Source Graph instead of cloning repositories in the sandbox. Measured effects are in Knowledge Retrieval Benchmark.
  • The target for a simple question is an answer within a minute.

Boundaries for a public Bot ​

  • Public visitors may only ask questions. Production, updates and publication are open to maintainers only, enforced by the service layer.
  • The Bot reads only registered public sources. Credentials stay on the server and never enter knowledge, prompts or replies.
  • Prefer a long-connection event subscription to connect the chat platform; it needs no public callback address.

在团队聊天中使用 Bot ​

团队聊天中的知识 Bot 运行的是你在本地使用的同一套 Context Skills,因此一个 Bot 就能回答问题、启动生产和更新,并带大家完成报告审核。以下是在团队聊天 Bot 背后运行 Context Skills 时行之有效的交互模式。如何搭建背后的服务见 构建知识服务;本页讲的是日常使用。

问什么 ​

像询问一位读过团队知识的同事那样向 Bot 提问:

text
@Bot 这个知识库涵盖哪些内容?它的网站在哪里?
@Bot 为什么 <feature> 会拒绝 <case>?把定义它的代码和文档给我看看。
@Bot 怎样在我的 Agent 中安装这个知识包?

Bot 会先读团队已批准的知识,只有当知识确实存在缺口时,才回到原始代码和文档。怎样提问才能得到精确的回答,见 提问。在你自己的 Agent 中安装同一份知识,见 在 Agent 中使用知识包。

在话题中会看到什么 ​

  • 一个任务会回复三类消息:开始、进度和最终结果。Bot 会持续更新同一条进度消息,而不是发很多条。
  • Bot 只在需要有人决定时才提问——确认开工报告、确认发布、选择范围——并提供可选的选项。谁都不需要回复暗号或审核代码。参见 确认开工报告。
  • 你在网站上看完 Diff 报告后,工作流会从那里继续;不必再回到聊天里确认。
  • 提交知识仓库、发布知识包和站点都会不间断地完成。只有遇到 Diff 审核、权限问题或意见分歧时,Bot 才会停下来。

可供核查的回答 ​

  • 每个回答都带有可点击的来源:知识页面、带提交号的代码行,以及原始文档。只说“根据知识包”太抽象,无从核实。
  • 每个回答都有点赞和点踩评价。评价和对话会一起用于改进检索和提示词。

保存你学到的内容 ​

当某个回答值得保留时,在同一话题中让 Bot 把它保存为知识。聊天内容、你刚分享的文档,或者某段具体代码、某个合并请求,都可以成为来源。

text
@Bot 把这个话题的结论保存为知识,并把我刚分享的文档也加进去。

Bot 会先提出计划,运行更新,然后给你一份相对网站的 Diff 报告。阅读报告后,发送修订意见或直接确认;之后发布会自动完成。要关注哪些内容见 阅读审核报告,对话如何成为来源见 从对话中采集。

你也可以要求更新整个知识库或其中一部分。Bot 会分析自上次更新以来上游文档和代码的变化,给出更新计划,再给出相对网站的 Diff 报告。

定时巡检在固定时间运行,跟踪上游变化并采集知识。巡检提示词必须写明范围、没有变化时怎么做,以及哪些情况需要人介入。参见 定时更新。

速度 ​

  • 冷启动是首次回答慢的主要原因。在运行时中预装 CLI、知识包和知识工作区,让会话不必每次都安装和克隆。
  • 先读知识,只有证据不够时才远程读取原文——通过 Source Graph 按提交获取代码,而不是在沙箱里克隆仓库。实测效果见 知识检索测评。
  • 简单问题的目标是一分钟内给出回答。

公开 Bot 的边界 ​

  • 公开访客只能提问。生产、更新和发布只对维护者开放,由服务层强制执行。
  • Bot 只读取已登记的公开来源。凭据保留在服务端,绝不进入知识、提示词或回复。
  • 接入聊天平台时优先使用长连接事件订阅;它不需要公网回调地址。