Get literature excerpts
knowledge_get_excerptsSearch the library and return abstracts with matching passages. Three modes: (1) query only → discover documents AND return each one's abstract + relevant chunk excerpts in one call; (2) document_refs only → abstract + first chunks per doc as a table-of-contents glimpse; (3) both → re-rank chunks against the query, scoped to those refs. At least one of query or document_refs is required. In query-discovery mode you may also scope by journal / year_from / year_to (ignored when document_refs is given).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max documents (only applies when document_refs is omitted, default: 10). | |
| query | No | Search text. Required when no documents are selected (discovery mode) — finds matching documents. Optional once document_refs are given: include it to rank those documents' chunks by relevance, or omit it to pull each document's abstract + opening chunks. The library is English-language: technical terms and scientific names match best. | |
| journal | No | Optional. Restrict the search to ONE journal, by its full name (e.g. "Journal of Cleaner Production"). A distinctive fragment also works ("Cleaner Production"), but a fragment matching several journals is rejected with the candidates listed — never guessed at — so prefer the full name. To compare journals, run one search per journal. Omit to search every document this session can reach — including the user's own uploads and anything else with no journal recorded, which a journal filter would exclude. | |
| year_to | No | Optional inclusive upper bound on publication year. Omit for no upper bound. | |
| year_from | No | Optional inclusive lower bound on publication year (e.g. 2020 for "recent"). Omit for no lower bound. | |
| document_refs | No | Specific documents to pull from, as knowledge refs from a recent knowledge_search (e.g. ["k1", "k7"]). Provide these to fetch those exact documents (abstract + chunks) instead of discovering by query — the metadata filters (Scope / years) then no longer apply. Required if query is omitted. | |
| top_k_chunks_per_doc | No | Max chunks to return per document (default: 3). |