<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Debiddo0506 Dev Notes]]></title><description><![CDATA[Debiddo0506 Dev Notes]]></description><link>https://debiddo0506.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b116e6d74b84d29c54cc34b/c6e1ee2d-6f18-47dc-9bb4-fdec23243451.png</url><title>Debiddo0506 Dev Notes</title><link>https://debiddo0506.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 19:31:28 GMT</lastBuildDate><atom:link href="https://debiddo0506.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Stopped Claude Code from Inventing DOIs and Misquoting PDFs]]></title><description><![CDATA[When you use AI coding agents (Claude Code, Cursor, Codex) heavily for technical literature surveys and debugging notes, two failure modes show up almost…]]></description><link>https://debiddo0506.hashnode.dev/how-i-stopped-claude-code-from-inventing-dois-and-misquoting-pdfs</link><guid isPermaLink="true">https://debiddo0506.hashnode.dev/how-i-stopped-claude-code-from-inventing-dois-and-misquoting-pdfs</guid><dc:creator><![CDATA[Debiddo0506]]></dc:creator><pubDate>Thu, 03 Dec 2026 13:33:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b116e6d74b84d29c54cc34b/ef6b4c06-dcb6-4968-889d-be77f1b092c8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you use AI coding agents (Claude Code, Cursor, Codex) heavily for technical literature surveys and debugging notes, two failure modes show up almost immediately:</p>
<ol>
<li><strong>Fabricated or mismatched DOIs</strong>: The model writes a clean summary table with plausible-looking DOIs that either don't exist (<code>404</code>) or point to a completely different paper.</li>
<li><strong>Subtle number &amp; quote drift</strong>: The original PDF says <code>"five datasets"</code>, and the summary becomes <code>"5 datasets"</code>. Or a component part number like <code>SM15T30A</code> gets misread as a current rating <code>"30 A"</code>. Worse, dumping multi-column raw PDFs into context burns tokens and scrambles reading order.</li>
</ol>
<p>So I built <a href="https://github.com/Debiddo0506/paper-library-kit"><strong>Paper Library Kit (</strong><code>plk</code><strong>)</strong></a> — an MIT-licensed, Git-native literature knowledge graph and deterministic verification CLI (with an optional stdio MCP server) designed for AI coding agents.</p>
<img src="https://raw.githubusercontent.com/Debiddo0506/paper-library-kit/main/assets/demo/demo.gif?v=2" alt="Demo: a fabricated quote is rejected, while the real verbatim quote passes" style="display:block;margin:0 auto" />

<hr />
<h2>Try It in 10 Seconds (Zero PDFs Needed)</h2>
<p>In <code>v0.2.0</code>, <code>plk</code> bundles a 15-paper real AI-Agent &amp; RAG demo library (<code>Attention Is All You Need</code>, <code>RAG</code>, <code>Chain-of-Thought</code>, <code>ReAct</code>, <code>Toolformer</code>, <code>Self-RAG</code>, <code>GraphRAG</code>, etc.) so you can test search and evolution graph traversal without preparing local PDFs:</p>
<pre><code class="language-bash">pip install paper-library-kit
plk --lang en demo
</code></pre>
<p>Or launch the stdio MCP server directly on the bundled demo library via <code>uvx</code>:</p>
<pre><code class="language-bash">uvx --from "paper-library-kit[mcp]" plk mcp --demo
</code></pre>
<ul>
<li><strong>GitHub</strong>: <a href="https://github.com/Debiddo0506/paper-library-kit">https://github.com/Debiddo0506/paper-library-kit</a></li>
<li><strong>Live 16-paper interactive evolution graph</strong>: <a href="https://debiddo0506.github.io/paper-library-kit/">https://debiddo0506.github.io/paper-library-kit/</a></li>
<li><strong>Glama MCP Listing &amp; Inspector</strong>: <a href="https://glama.ai/mcp/servers/Debiddo0506/paper-library-kit">https://glama.ai/mcp/servers/Debiddo0506/paper-library-kit</a></li>
</ul>
<hr />
<h2>1. Catching Fake DOIs Live (<code>plk verify</code>)</h2>
<p>Instead of trusting DOIs generated in Markdown research notes, <code>plk verify</code> extracts every DOI in a document, queries <strong>Crossref</strong>, and checks normalized title similarity between the claimed title in your note and Crossref's actual record:</p>
<pre><code class="language-text">| Verdict              | Sim  | DOI                        | Crossref Actual Title                     | In Lib |
|----------------------|------|----------------------------|-------------------------------------------|--------|
| OK                   | 1.00 | 10.48550/arxiv.2210.03629  | ReAct: Synergizing Reasoning and Acting   | M01    |
| MISMATCH (wrong ref) | 0.14 | 10.1109/jssc.2020.9999999  | Unrelated Journal Article                 | —      |
</code></pre>
<p>Even a single command against your survey Markdown catches swapped or hallucinated references before they enter your repo.</p>
<hr />
<h2>2. Deterministic Quote + Unit-Adjacency Gate (<code>plk cards</code> / <code>plk check</code>)</h2>
<p>Rather than using fuzzy matching (which silently accepts subtle number changes), <code>plk</code> enforces <strong>strict substring verification</strong> against the extracted Markdown (<code>=== p.N ===</code>) after normalizing deterministic PDF extraction artifacts:</p>
<ul>
<li><strong>Unicode NFKC normalization</strong> for ligatures (<code>ﬁ</code>/<code>ﬂ</code> → <code>fi</code>/<code>fl</code>) and full-width characters</li>
<li><strong>Soft hyphen / zero-width character stripping</strong> (<code>\u00ad</code>, <code>\u200b</code>, <code>\ufeff</code>)</li>
<li><strong>Line-break hyphen rejoining</strong> (<code>exam- ple</code> → <code>example</code>) only between lowercase letters</li>
<li><strong>Adjacency regex check</strong> ensuring the claimed number and unit appear next to each other inside the cited <code>«quote»</code></li>
</ul>
<p>If the paper says <code>"five datasets"</code> and an agent summarizes <code>"5 datasets"</code>, the entry is rejected immediately:</p>
<pre><code class="language-text">✗ [number not found]    M05: 5 datasets @ plug-and-play retrieval correction evaluation
✗ [value not in quote]  M05: 5 «Experiments on five datasets demonstrate that CRAG»
</code></pre>
<hr />
<h2>3. Low-Friction Importers &amp; Git-Native Architecture</h2>
<p>Everything lives in plain text (<code>triage.tsv</code>, <code>core_tags.tsv</code>, <code>cite_audit.tsv</code>, <code>meta.yaml</code>) while raw copyrighted PDFs remain in a local archive excluded from Git.</p>
<p>To make onboarding from existing workflows fast, <code>v0.2.0</code> ships with:</p>
<ul>
<li><code>plk import-bib refs.bib</code>: Pure-Python BibTeX parser that cleans LaTeX accents, maps arXiv <code>eprint</code> fields to DOIs, deduplicates against existing papers, and scaffolds <code>ingest_bib.tsv</code> + <code>meta.yaml</code>.</li>
<li><code>plk ingest --arxiv 2310.06770</code>: Fetches arXiv Atom metadata + PDF and converts multi-column pages into paged Markdown (<code>=== p.N ===</code>) + cropped figures.</li>
<li><code>plk graph build</code>: Compiles semantic relations (<code>builds_on</code>, <code>improves</code>, <code>tradeoff</code>) and 4-source citation audits into a single zero-backend interactive HTML timeline.</li>
<li><strong>Claude Code Hook + MCP Server</strong>: <code>.claude/hooks/paper_hint.py</code> proactively surfaces top relevant papers when recurring issues show up, while <code>plk mcp</code> (contributed in our first external PR by <code>@Boulea7</code>, now on PyPI &amp; Official MCP Registry <code>io.github.Debiddo0506/paper-library-kit</code>) exposes <code>search</code>, <code>show</code>, <code>neighbors</code>, and <code>path</code>.</li>
</ul>
<pre><code class="language-json">{
  "mcpServers": {
    "paper-library": {
      "command": "uvx",
      "args": [
        "--from",
        "paper-library-kit[mcp]",
        "plk",
        "mcp",
        "--demo"
      ]
    }
  }
}
</code></pre>
<hr />
<h2>What's Next &amp; Contributing</h2>
<p>Core CLI only requires <code>pyyaml</code> (PyMuPDF and <code>mcp</code> are optional extras), and CI runs on Linux, Windows, and macOS across Python 3.10–3.13.</p>
<p>If you build research workflows or agent tooling, we have open <code>good first issue</code> tickets (Marker/Docling backend, Obsidian Vault exporter, BM25 full-text ranking fallback, Cursor/Windsurf adapters, and domain presets). Check out the <a href="https://github.com/Debiddo0506/paper-library-kit">repo</a> and let me know what PDF/citation failure mode bites your workflow most!</p>
]]></content:encoded></item></channel></rss>