← Back to library

Attach literature search so a coding agent can try published methods

u/kalpitdixit on r/artificial ran the same optimization with two Claude Code agents: one on built-in knowledge and one with search across millions of CS papers. The paper-aware run found post-cutoff methods and fixed a batch-size idea using a 2022 rule the other missed.

  • OutcomeAttach a paper-search tool to a coding agent so it can try techniques from literature — including work after its training cutoff — before it invents an approach.
  • SetupUnder an hour
  • LevelAdvanced
  • Creditu/kalpitdixit on r/artificial
View original
Works with
Claude CodeChatGPTCustom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

When should you use it?

  • You are optimizing models or systems where papers matter
  • The agent keeps rediscovering textbook tricks
  • You have or can add a paper search MCP or API

Not for: Skipping your own evaluation harness; Treating a single paper as proven for your stack

What do you need, and what do you get?

You need

  • A coding agent with tool use
  • A paper search tool over a real corpus
  • A measurable task and eval

You get

  • Techniques tried with paper citations
  • Eval results before/after
  • Notes on ideas that failed

How does it work, step by step?

  1. Define the metricWrite the eval the agent must beat before claiming improvement.
  2. Attach paper searchGive the agent a corpus search tool, not a random web crawl alone.
  3. Require citationsEvery new technique must name the paper and the rule it took.
  4. Keep a control runRetain one attempt without papers so you see what search actually added.

The prompt

Our own prompt, inspired by u/kalpitdixit on r/artificial and written to work in Claude Code, ChatGPT and Custom agent. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt5 variables
Task: {task}. Eval command: {eval_cmd}. Baseline score: {baseline}.
You may search papers via {paper_tool}. Before each attempt, search for relevant methods. For every technique you try, record title, year, the rule you applied, and the eval score.
Prefer methods published after {cutoff} when they fit. If a paper idea fails, note why. Do not claim improvement without the eval output.

Inspired by u/kalpitdixit on r/artificial: I tested what happens when you give an AI coding agent access to 2 million research papers. It found techniques it couldn't have known about.. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Paper ideas can still fail on your data. Keep the eval honest.
  • Do not paste paywalled PDFs you are not allowed to use.

Our take

The comparison design is what makes this credible: same task, with and without papers. We care about the citation rule and the eval, not the marketing around the tool. In our dry run on a toy optimization task with a fake paper index, the paper-aware agent proposed two cited methods, skipped one that conflicted with the eval, and beat the no-paper baseline on the sample metric. Log every paper citation beside the eval score so you can audit later. Discard techniques that need data you do not have. Keep the no-paper baseline so you know search helped. Respect publisher terms for full text. The win is better attempts, not a higher story about autonomy. Log every paper citation beside the eval score so you can audit later. Discard techniques that need data you do not have. Keep the no-paper baseline so you know search helped. Respect publisher terms for full text. The win is better attempts, not a higher story about autonomy.

Where the time goes back: The agent spends cycles on published methods instead of rediscovering them from memory alone.

FAQ

Do I need their exact product?
No. Any searchable paper corpus the agent can query works. The experiment matters more than the brand.
How is this different from a literature-review playbook?
That one writes a review from sources you supply. This one lets a coding agent pull techniques mid-task.

Source and credit

Inspired by u/kalpitdixit on r/artificial. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
I tested what happens when you give an AI coding agent access to 2 million research papers. It found techniques it couldn't have known about.
Creator
u/kalpitdixit on r/artificial
Published on
Reddit
Original date
Mar 28, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Citations and eval required.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecuritySkill✓ AI dry run

Make your coding agent write the behavior before the code

Add a short standing rule to your coding agent's project file so every user-facing change starts as plain-language scenarios, becomes a failing test and only then gets the smallest code change that makes it pass.

Credit: u/cannyshammy on r/ClaudeCode

Minutes
IT & SecurityPrompt✓ AI dry run

Question an agent's pull request instead of skimming reviews

Have a fresh agent list every concrete change in an agent-written pull request (schema, scheduled jobs, features, new services, settings, endpoints and removals) without judging it, then press it on each item you cannot explain, give it the product context it lacks, and cut whatever nobody can justify before you merge.

Credit: u/EstablishmentGood414 on r/codex

Minutes
IT & SecurityWorkflow✓ AI dry run

Build one pull request dashboard across two DevOps servers

Have a coding agent build a small internal web page that gathers every open pull request from several repositories and highlights the ones needing action.

Credit: cmpalmer52 on Hacker News

An afternoon+
IT & SecurityWorkflow✓ AI dry run

Have the agent port your hooks when you switch tools

When moving from one coding agent to another, point the new agent at your old hooks folder and have it rebuild them as extensions.

Credit: esperent on Hacker News

Minutes
IT & SecurityWorkflow✓ AI dry run

Keep agent-built features in small, testable pull requests

Get reliable results from a coding agent by agreeing a plan, then having it deliver a feature as a series of small pull requests with tests, instead of one big autonomous run.

Credit: Christos Athanasiadis (@ckathanasiadis)

Minutes