<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Quan Zhan</title>
    <description>The latest articles on DEV Community by Quan Zhan (@zhanquan2026).</description>
    <link>https://dev.to/zhanquan2026</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Quan Zhan</title>
      <link>https://dev.to/zhanquan2026</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zhanquan2026"/>
    <language>en</language>
    <item>
      <title>PaperLens: Read Research Papers with an Open-Weight Model Running on Your Own Machine</title>
      <dc:creator>Quan Zhan</dc:creator>
      <pubDate>Mon, 19 Oct 2026 07:22:08 +0000</pubDate>
      <link>https://dev.to/zhanquan2026/paperlens-read-research-papers-with-an-open-weight-model-running-on-your-own-machine-487j</link>
      <guid>https://dev.to/zhanquan2026/paperlens-read-research-papers-with-an-open-weight-model-running-on-your-own-machine-487j</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;I'm an undergraduate student, and I read a lot of papers — optimization algorithms, optics, whatever my coursework drags me into. The bottleneck isn't finding papers, it's &lt;em&gt;digesting&lt;/em&gt; them: a 12-page PDF takes me an evening, and half of that evening goes to re-reading the method section.&lt;/p&gt;

&lt;p&gt;Proprietary AI APIs would solve this, but they charge per token and — worse for a student — they'd see every unpublished manuscript or thesis draft I upload. I wanted a paper-reading assistant where the intelligence is free and the data never leaves my laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PaperLens&lt;/strong&gt;: a ~130-line Python CLI. Point it at a PDF, get back a structured Markdown report:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TL;DR&lt;/strong&gt; — problem + headline result in two sentences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key contributions&lt;/strong&gt; — bullet list&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Method&lt;/strong&gt; — explained in plain language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key results&lt;/strong&gt; — the numbers that matter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproduction notes&lt;/strong&gt; — what you'd need to reproduce it, with honest "unclear" flags instead of invented details
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# Fully local: data never leaves your machine&lt;/span&gt;
ollama pull qwen3:8b
python paperlens.py paper.pdf &lt;span class="nt"&gt;-o&lt;/span&gt; report.md

&lt;span class="c"&gt;# Or Groq Cloud free tier (open-weight Llama, no credit card needed)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_key_here
python paperlens.py paper.pdf &lt;span class="nt"&gt;--backend&lt;/span&gt; groq &lt;span class="nt"&gt;-o&lt;/span&gt; report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;The pipeline is deliberately boring:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PDF → text (pypdf) → structured prompt → open-weight model → Markdown report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extract&lt;/strong&gt; — &lt;code&gt;pypdf&lt;/code&gt; pulls raw text from the PDF (&lt;code&gt;.txt&lt;/code&gt; also works, handy for testing).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constrain&lt;/strong&gt; — long papers are truncated to 12,000 characters so they fit the context window; the user is told when this happens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt&lt;/strong&gt; — one fixed template demands exactly the five sections above and instructs the model to say "unclear" rather than hallucinate when text is missing. This is the whole "prompt engineering": narrow the job, forbid invention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; — three backends, all stdlib HTTP, no SDK needed:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ollama&lt;/code&gt; (default): local server, zero cost, zero data egress&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;groq&lt;/code&gt;: free-tier cloud inference of open-weight models, OpenAI-compatible&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo&lt;/code&gt;: dry-run that prints the prompt — lets anyone verify the pipeline without a GPU or API key&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;p&gt;Python stdlib + &lt;code&gt;pypdf&lt;/code&gt;. That's it — one dependency. I wanted something a first-year student could read end to end in one sitting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open matters here
&lt;/h2&gt;

&lt;p&gt;Three reasons, all practical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost.&lt;/strong&gt; Reading 100 papers through a proprietary API is a student-budget problem. A local 8B model or a free-tier endpoint makes it $0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy.&lt;/strong&gt; Students and researchers routinely work with unpublished manuscripts. With the Ollama backend, the paper never leaves the device — there is no trust decision to make.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auditability.&lt;/strong&gt; The entire pipeline fits in one short file. If the summary looks wrong, you can read the prompt and see exactly what the model was asked. Try that with a black-box reading app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My agent session
&lt;/h2&gt;

&lt;p&gt;I built PaperLens with an AI coding agent: I described the pipeline I wanted, it drafted the code, and I directed the testing — including a real PDF-extraction test with a generated PDF and an end-to-end dry run. The agent wrote fast; I kept the design boring on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/yniantongtian-oss/paperlens" rel="noopener noreferrer"&gt;https://github.com/yniantongtian-oss/paperlens&lt;/a&gt; — MIT licensed, PRs welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prize categories:&lt;/strong&gt; submitted for the Hacktoberfest Open-Source AI Challenge: Week 3.&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>hacktoberfest</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
