lumen-citations
它能做什么
这项技能说明 AI 应如何在 Lumen 中引用文档段落。Lumen 是一款审阅法律文件的工具。适合需要让每项论断都能追溯到出处的律师和法务团队。
适用场景
- ✓AI 对合同或其他文档作出论断,必须注明出处的时候。
- ✓Lumen 审阅中某条引用显示为未找到的时候。
- ✓你需要每段引语都与文档逐字一致的时候。
技能链接
https://github.com/kortix-ai/suna/blob/dev/apps/white-label/lumen/agent-kit/skills/lumen-citations/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请回答我关于责任上限的问题,并引用其来源的确切条款。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会通过搜索找到相关段落,结合上下文阅读,复制它所依据的确切原文,并在完成前运行引用检查。任何不一致都会先被修正。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Citations
Lumen shows every citation to a lawyer next to the source passage, and checks it against the source before the lawyer sees it. A citation that fails the check is shown as "Citation not found". Get it right the first time.
The object
{ "doc_id": "<id from lumen docs>", "a": "p3.12", "quote": "verbatim text from that paragraph" }
ais the paragraph anchor:p<page>.<n>. Take it fromlumen readorlumen search. Never compute it.quoteis copied character for character from ONE paragraph: at most 300 characters, no "..." inside, no paraphrase, case kept.- Quote the words that prove the claim, not the whole paragraph. 8 to 40 words is right.
Get anchors
lumen search --matter <matter_dir> --query "limitation of liability capped" # hits: doc_id, a, snippet
lumen read --doc <doc_id> --anchor p3.12 --context 1 # the paragraph and its neighbours
lumen read --doc <doc_id> # the whole document
Check before you finish
echo '{"citations": [{"doc_id": "...", "a": "p3.12", "quote": "..."}]}' | lumen cite check
| Code | Meaning | Fix |
|---|---|---|
not_found |
The quote is not in the document | Copy the exact words from lumen read output |
wrong_anchor |
The quote is in another paragraph (fixed_anchor) |
Use fixed_anchor |
too_long |
Over 300 characters | Quote fewer words |
unknown_doc |
No such document | Use a doc_id from lumen docs |
lumen result write runs the same check on every citation in a result and refuses the file until each passes.
In chat answers
Write each citation as a Markdown link after the claim:
[1](/cite?d=<doc_id>&a=p3.12&q=<url-encoded quote>). lumen cite check prints this link as link for every citation that passes: paste it, do not encode a quote by hand. A bare [1] with no link is not a citation, and Lumen marks the answer as unchecked. Number them in order. Lumen shows each link as a numbered chip that opens the quoted paragraph. Outside the links, name a document by its filename, never by its doc_id.
Examples
Good:
{"doc_id": "k17", "a": "p2.9", "quote": "Neither party's liability under or in connection with this Agreement"}- exact words, one paragraph.{"doc_id": "k17", "a": "p1.4", "quote": "renews automatically for successive periods of one (1) year"}.{"doc_id": "k22", "a": "p1.6", "quote": "the Customer is entitled to service credits"}.
Bad:
"quote": "liability is unlimited"- a paraphrase. The document says "shall be limited or capped in amount"."quote": "shall not exceed ... twelve (12) months"- an ellipsis inside a quote."a": "3.12"- not an anchor. Anchors look likep3.12.
常见问题
什么会导致引用失败?
引语不在文档中,或者引语所在段落与其锚点不一致,都会导致检查失败。
引语应该多长?
只引用能证明论断的文字,通常约 8 到 40 个单词,且不超过 300 个字符。
AI 会编造段落编号吗?
不会。技能要求锚点只能取自读取或搜索的输出,绝不自行计算。
详情
作者的原始描述
How Lumen cites a document - the citation object, how to get anchors, quote rules and `lumen cite check`. Load before writing any claim about a document.
repo: kortix-ai/suna
热度
- GitHub 星标
- 20k
- 排名
- #10381
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
claude-code
20k帮你的智能体把编写代码、审查或规划任务交给 Anthropic 的 Claude Code CLI,并保存结果以便检查。
codex-cli
20k帮你的智能体把编写代码或审查任务交给 OpenAI 的 Codex CLI,并取回结果,让第二个模型检查工作。
commit-dis
20k帮你的智能体把本次对话中的修改保存为当前 Git 分支上的一次提交,不推送,也不创建新分支。
composio
20k帮你的智能体使用 Composio 连接 Gmail、Slack、GitHub 和 Notion 等应用,服务于你自己的智能体或你开发的产品。