跳到主要内容

Literature Knowledge Mining Commands: lkm

bohr lkm searches literature knowledge graphs and retrieves claims, variables, reasoning paths, and paper graphs.

Commands​

CommandUsageDescription
claimbohr lkm claim [command]Retrieve reasoning for claims already ingested into LKM by global claim ID.
graphbohr lkm graph [flags]Retrieve the ingested paper-level knowledge graph (nodes and edges) for a paper already in LKM.
parsebohr lkm parse [command]Upload a local PDF and extract its research questions, conclusions, and reasoning steps.
reasoningbohr lkm reasoning [flags]Search scientific reasoning chains already ingested into LKM.
searchbohr lkm search <query> [flags]Search papers ….
variablesbohr lkm variables [command]Retrieve variables already ingested into LKM by global variable ID.

For subcommands inside a command group, run bohr lkm <group> --help.

Common parameters​

ParameterDescription
--top-k <number>Maximum number of results, default 10
--offset <number>Result offset, default 0
--mode <hybrid\|semantic\|lexical>Search mode, default hybrid
--sort <comprehensive\|relevance\|recent\|journal>Result sorting mode
--keywords <a,b>Filter by keywords
--scopes <a,b>Limit searched knowledge scopes

Examples​

bohr lkm search "catalysis mechanism" --mode semantic --top-k 20
bohr lkm reasoning --query "photosynthesis energy transfer" --top-k 5
bohr lkm variables batch gcn_abc gcn_def
bohr lkm graph --paper-id 812481689673531392

Extract knowledge from a local PDF​

lkm parse uploads a local PDF and extracts its research questions, conclusions, and reasoning steps; use it when the paper may not be in the LKM corpus yet. Other LKM subcommands only query papers already ingested. This is different from bohr pdf parse, which extracts document layout, text, tables, and formulas.

Extraction is asynchronous:

CommandDescriptionBilling
bohr lkm parse submit <file.pdf>Upload the PDF and return a task_id; add --wait to poll until it reaches a terminal stateFree
bohr lkm parse status <task-id>Query the current task status and completed stagesFree
bohr lkm parse wait <task-id>Wait until the task becomes succeeded, partial, or failedFree
bohr lkm parse result <task-id>Fetch the extracted local graph; add --format graph for the paper graph shapeCharged only on the first successful Result
bohr lkm parse submit paper.pdf
bohr lkm parse wait <task-id>
bohr lkm parse result <task-id>
bohr lkm parse result <task-id> --format graph -o json

LKM Parse Result billing​

  • submit, status, and wait do not incur a charge.
  • The first Result for a task_id that returns status=succeeded costs 1 CNY (or 100 Photons), or 0.1 CNY (or 10 Photons) when cache_hit=true.
  • A queued or running task returns LKM_PARSE_RESULT_NOT_READY (upstream code 290017) and is not charged. Partial, failed, missing-task, and other error responses are also not charged.
  • Fetching the same successful Result again does not incur another charge. The platform uses task_id as the idempotency key.

See the LKM Parse Result billing rules for the complete OpenAPI response matrix and examples.

LKM corpus queries have a monthly free quota and are charged by request after that quota is exhausted. LKM Parse Result follows the separate rule above. Claim, variable, and paper IDs should come from previous LKM results.