1. lkm-openapi
literature-sage
  • lkm-openapi
    • 搜索知识:对科学命题/研究问题等进行召回
      POST
    • 搜索推理链:对文献推理过程进行召回
      POST
    • 查询论文对应的完整知识图谱
      POST
    • 查询命题对应的推理链
      GET
    • 批量查询:按知识节点 ID 列表取详情
      POST
    • 问题反馈
      POST
  1. lkm-openapi

查询论文对应的完整知识图谱

POST
/papers/graph
给定一篇论文,返回 LKM 从该论文中抽取出的完整 graph。可以理解成:“打开一篇论文,查看这篇论文里被抽取出的研究问题、结论、推理步骤、亮点、弱点和关系边”。当前推荐把这个接口作为 paper-level graph 的主入口。
如果只想按主题搜索相关 claim / question,请用 POST /search。如果想按推理过程相似性搜索多篇论文,请用 POST /reasoning/search。如果已经有 claim ID,想看单条 claim 的推理链,请用 GET /claims/{id}/reasoning。

什么时候用这个接口#

论文详情页
展示某篇论文的结构化知识图谱。
展示论文中的核心 conclusions、reasoning steps、weak points、highlights。
图谱可视化
直接读取 graph.nodes 和 graph.edges。
按节点类型和边类型渲染 paper-level reasoning graph。
Agent 消费
让 agent 读取一篇论文的完整结构化内容。
适合后续做证据审计、图谱摘要、对比分析或 formalization。
不适合的场景
不适合做主题检索;主题检索用 /search 或 /reasoning/search。
不适合只查某个 claim 的支撑链;单 claim 推理链用 /claims/{id}/reasoning。

论文如何定位#

至少传一个论文标识。
可用标识包括 package_id、paper_id、doi、title。
如果同时传多个标识,生效优先级是:package_id > paper_id > doi > title。
package_id 和 paper_id 都是 LKM 内部定义的论文 ID,不是 DOI、PMID 或外部数据库 ID。
这两个 ID 通常从 LKM 其他搜索或查询接口返回的 paper metadata 中获取,例如 /search、/reasoning/search 的论文元数据。
package_id 必须形如 paper:<数字>,例如 paper:812481689673531392。
paper_id 必须是纯数字串,例如 812481689673531392。
doi 使用论文 DOI。
title 会走标题召回,可能返回多篇候选论文。
使用 title 时,可以通过 title_resolve.limit 控制最多返回多少候选,默认 5,最大 20。
使用 title 返回多篇时,每篇结果可能带 title_match_type,例如 exact 或 keyword。

响应怎么看#

顶层结构
HTTP 状态通常是 200,业务是否成功看响应体里的 code。
code = 0 表示成功。
data.papers 是论文结果列表。
非 title 路径通常返回 1 篇论文。
title 路径可能返回多篇候选论文。
单篇论文结构
每个 data.papers[] 通常包含 paper、graph、addressed_problems、open_questions。
paper 是论文元数据,例如标题、作者、DOI、期刊、发表时间等。
graph 是这篇论文的结构化知识图谱。
addressed_problems 是论文试图解决的核心问题。
open_questions 是论文留下的开放问题或未来工作。
graph.nodes
kind: "conclusion" 表示论文中的结论节点。
kind: "reasoning_steps" 表示推理步骤节点,通常包含 steps 数组。
kind: "highlight" 表示正向亮点、关键证据或支持性观察。
kind: "weak_point" 表示弱点、限制、风险或需要审慎看待的前提。
kind: "subproblem" 表示驱动某个结论的子问题或研究动机。
节点通常包含 id、type、kind、content、title、metadata、global_id 等字段;不同节点类型字段可能不完全一样。
graph.edges
type: "concludes" 通常表示 reasoning_steps 节点指向 conclusion。
type: "highlight_of" 表示某个 highlight 是某个 reasoning_steps 的正向亮点或支持性观察。
type: "weakpoint_of" 表示某个 weak point 指向它所约束或削弱的 reasoning_steps。
type: "subproblem_of" 表示某个 subproblem 指向它驱动的 conclusion。
type: "previous_conclusion_of" 表示前序结论与当前结论或推理单元之间的上下文/前置关系。
edge 上可能有 p1、p2 等数值字段;这些是模型/图谱内部参数,不要直接当作用户侧可信度展示。

推荐渲染方式#

前端可以直接用 graph.nodes 和 graph.edges 渲染 paper-level graph。
paper、addressed_problems、open_questions 更适合作为图的上下文信息,而不是主推理链的一部分。
reasoning_steps.steps 建议作为 reasoning_steps 节点的详情展示,不需要默认展开成多个主图节点。
渲染时注意区分正向信息和风险信息:highlight 是亮点,weak_point 是弱点或限制,subproblem 是问题背景。

注意事项#

不要把 graph 里的边都理解成“支持”。
highlight_of 和 weakpoint_of 语义相反:前者表示正向亮点或支持性观察,后者表示限制、弱点或风险。
不要把 highlight 当成最终结论;它通常是支撑推理单元的局部亮点。
不要把 weak_point 当成正向证据。
不要把 subproblem 当成支撑证据;它是研究动机或问题背景。
不要把 edge 上的 p1、p2 当成用户侧可信度直接展示。
如果图为空但论文存在,说明该论文在 KB 侧可能还没有抽取出有效 graph 内容。
include 和 hydrate_factor_refs 目前仍会被接口接受,但在新版 graph 响应中实测不改变返回结构。
新调用方不建议使用 include / hydrate_factor_refs 来控制返回内容;按默认 graph 响应消费即可。

常见错误#

290002 表示入参错误。
常见原因:四个标识都没传。
常见原因:package_id 不是 paper:<数字> 形式。
常见原因:title_resolve.limit 越界。
290011 表示论文不存在。
检查 paper_id、package_id、doi 或 title 是否正确。
290013 表示论文存在,但 KB 侧未抽出 graph 内容。
可以展示论文元数据,同时提示暂无结构化图谱。
290009 表示查询超时。
可以稍后重试,或改用更精确的 paper_id / package_id。
290001 表示其他查询错误。
可以重试一次;如果仍失败,建议简化请求。
2000 表示未授权,通常是请求头缺少有效 accessKey。

使用建议#

推荐优先用 paper_id 或 package_id 定位论文。
已知 DOI 时可以用 doi。
只有标题时再用 title,并设置合理的 title_resolve.limit。
前端图谱展示直接消费 graph.nodes 和 graph.edges。
Agent 或后处理流程优先读取 addressed_problems、graph、open_questions 三块。
include / hydrate_factor_refs 仅作为历史兼容字段看待;新版 graph 响应默认已经给出 paper-level graph。

请求参数

Header 参数

Body 参数application/json必填

示例
{
  "package_id": "paper:1020661015349559308",
  "paper_id": "1020661015349559308",
  "doi": "10.1038/s41586-021-03381-x",
  "title": "Thermal stability of FAPbI3",
  "title_resolve": {
    "limit": 5
  }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://open.bohrium.com/openapi/v1/lkm/papers/graph' \
--header 'accessKey;' \
--header 'Authorization: Bearer 5cc6462133d64251bf6ab64815c0e9xx' \
--header 'Content-Type: application/json' \
--data '{
  "package_id": "paper:1020661015349559308",
  "paper_id": "1020661015349559308",
  "doi": "10.1038/s41586-021-03381-x",
  "title": "Thermal stability of FAPbI3",
  "title_resolve": {
    "limit": 5
  }
}'

返回响应

🟢200
application/json
业务错误,按响应体 code / msg 分类
Bodyapplication/json

示例
{
    "code": 0,
    "data": {
        "papers": [
            {
                "paper": {
                    "package_id": "paper:1000399181526859777",
                    "id": "1000399181526859777",
                    "doi": "10.48550/arxiv.2405.12771",
                    "publication_id": "108545",
                    "publication_name": "Logic _ Mathematics.math.LO",
                    "zh_title": "域的全称-存在性理论",
                    "en_title": "Universal-existential theories of fields",
                    "authors": "Sylvy Anscombe | Arno Fehm",
                    "publication_date": "2024-05-21",
                    "available_online": "",
                    "cover_date_start": "2024-05-21",
                    "area": "arXiv-Mathematics",
                    "research_categories": "[\"Mathematical Sciences\", \"Pure Mathematics\"]",
                    "keywords": "",
                    "created_at": "2024-05-23T05:53:19+08:00"
                },
                "addressed_problems": [
                    {
                        "id": "paper:1000399181526859777::problem",
                        "global_id": "gcn_cc4a057cc82b4bc2",
                        "content": "The paper addresses the following pre-contribution problem-state. Model-theoretic and computability questions about fields, their rational function fields $k(t)$, function fields $k(X)$, and equicharacteristic henselian valued fields (in particular Laurent series fields $k((t))$) are only partially understood when attention is restricted to syntactic fragments between purely existential sentences and full first-order theories. Classical results (Ax–Kochen–Ershov) give transfer principles and decidability for full theories in characteristic zero valued fields, and several works established many-one reductions and decidability-lifting for pure existential fragments (e.g. $\\mathrm{Th}_{\\exists}(k)$ to $\\mathrm{Th}_{\\exists}(k((t)),v_t)$). However, for universal-existential fragments (sentences of the form $\\forall\\exists$ or variants with bounded numbers of universal quantifiers, or universal quantifiers restricted to the residue field), the following limitations remained in the literature and motivated this work:\n    \n    - Lack of systematic reductions: There was no systematic set of computable many-one reductions relating $\\mathrm{Th}_{\\forall\\exists}$ and the bounded-quantifier fragments $\\mathrm{Th}_{\\forall_n\\exists}$ (including $\\mathrm{Th}_{\\forall_k\\exists}$ where universals range only over the residue field) between a field $k$ (or its residue field) and the corresponding theories of $k(t)$, $k(X)$ or $k((t))$ with or without parameters (such as the constant symbol $t$). Existing existential reductions do not directly give such reductions for universal-existential fragments because universal quantifiers are harder to eliminate or reduce.\n    \n    - Positive characteristic obstructions: In characteristic $p>0$ the presence of purely inseparable extensions and feature of $p$-powers (e.g. $[K:K^p]=p^n$ and $p$-bases) creates the possibility of encoding several universal quantifiers by fewer universals plus existential data, but no uniform, computable formulation of this \"quantifier-coding\" using $p$-th powers had been provided for fragments like $\\forall\\exists$ or $\\forall_n\\exists$.\n    \n    - Valued-field fragments: For equicharacteristic henselian valued fields, although the existential theory of the residue field controls existential sentences in many cases, it was unclear to what extent $\\mathrm{Th}_{\\forall\\exists}$ (or residue-field-only universal quantifiers $\\forall_{\\mathfrak{k}}\\exists$) of the residue field determines the corresponding universal-existential fragments of the valued field, or whether computable many-one reductions could be given. The classical Ax–Kochen/Ershov principles address full theories in characteristic zero but do not directly yield reductions for these restricted fragments, and positive-characteristic analogues often rely on conditional geometric hypotheses (e.g. (R4)).\n    \n    - Decidability consequences and intermediate fragments: There was no comprehensive transfer of decidability (and many-one equivalences) between various fragments (e.g. $\\mathrm{Th}_{\\exists}(k(t),t)$, $\\mathrm{Th}_{\\forall_1\\exists}(k(t))$, $\\mathrm{Th}_{\\forall\\exists}(k(t))$, and their valued-field analogues) under general hypotheses on $k$ (such as being perfect, large, finite, or of specified characteristic). Consequentially, undecidability results for existential fragments were not systematically lifted to universal-existential fragments.\n    \n    - Concrete negative obstructions: It was not settled whether simple existential definability obstructions prevent certain naive many-one reductions (for instance, whether there is an $\\exists$-definable surjection $k((t))\\to k((t))\\times k((t))$ over perfect $k$).\n    \n    These gaps meant that for many natural fiel
修改于 2026-06-18 08:22:22
上一页
搜索推理链:对文献推理过程进行召回
下一页
查询命题对应的推理链
Built with