I gave an AI assistant a memory of PubMed - and learned why "forgetting" is the hard part
说明与用途
作者为 cognee 构建了 PubMed 连接器,以自动获取和更新 KRAS G12C 抗药性相关文献,解决了记忆新论文的难题。
问题
A frozen LLM cannot keep up with rapidly evolving cancer research literature, such as resistance mechanisms to KRAS G12C inhibitors.
结果
The connector ingests 155 records in 7 s, performs zero re‑fetch on the second sync, and correctly handles 10,000‑result limits, time‑zone offsets, and retractions.
工作流
- 1. Define PubMed query string
- 2. Call cognee.remember with pubmed_source(term, mindate)
- 3. Cognee ingests XML, parses to Markdown, extracts entities
- 4. Run cognee.search with GRAPH_COMPLETION query
- 5. Agent answers using updated memory
证据
The query matches 253 PubMed records in total. Limiting it to records added since 2024 left 155.
The first sync stored all 155 in about 7 seconds, using just two EFetch batches.
The second sync made zero EFetch calls and finished in about 2.4 seconds. Nothing had changed, so nothing was downloaded or sent to the LLM again.
ESearch never returns more than 10,000 PMIDs for a query.
NCBI assigns those dates in US Eastern time, though, so a run just after midnight UTC can miss records added late on the previous Eastern day.
- 记录日期: 2026-10-15T04:41:18.385Z