AEM 6991

MPS Capstone Project I

Prof. Ariel Ortiz-Bobea

5 · Using AI in research

Wednesday, September 23, 2026

Cornell University

Motivation

  • So far we’ve focused on coming up with questions and data.
  • This week we turn to tools, and specifically to using AI for research:
    1. Understanding the existing literature.
    2. Writing up your findings.
    3. Coding your analysis.

Outline

  1. How these tools work
  2. Different AI tool modalities
  3. AI for literature reviews
  4. AI for writing
  5. AI for coding
  6. Disclosure

1. How these tools work

It predicts the next token

  • The model predicts the next piece of text, then the next.
  • Token: the unit it predicts. A word, part of a word, or a symbol.
  • Nothing is looked up along the way.

A model on its own can only write text

  • Context window: everything the model can see at once.
  • Long threads push early instructions out of the window.
  • Harness: the program around the model, which controls what it sees and does.
  • Tools: what the harness connects, such as search, files and code.
  • Without tools, the model is a brain with no eyes or hands.
  • It can only write from memory, which is where most invented citations come from.

It guesses when it does not know

  • Asked something it cannot answer, it often guesses.
  • The guess reads exactly like a correct answer.
  • Training and scoring reward a guess over “I don’t know.”
  • OpenAI researchers: “Like students facing hard exam questions, large language models sometimes guess when uncertain, producing plausible yet incorrect statements instead of admitting uncertainty.”

A theory paper. Its examples use DeepSeek-V3, GPT-4o and Llama.

Kalai, Nachum, Vempala and Zhang (arXiv, 2025), Why language models hallucinate

2. Different AI tool modalities

Three ways to reach the same model

What it can do A good use
Chat
claude.ai
Sees only what you paste or attach.
Cannot run your code or touch your machine.
With Code execution on, runs its own Python on an attached file, on Anthropic’s servers.
“What are the top journals in environmental economics?”

“Is this idea a good fit for JAERE, JEEM or AJAE?”
Cowork
desktop app, Pro plan
Reads and edits the files in a folder you connect.
In Manual mode, asks before each change.
Can write code, but runs it only in its own sandbox. Not built for coding.
“Here are some PDFs. Search them for tables, to see if this is worth exploring as a project.”
Claude Code
terminal
The most powerful modality.
Edits files and runs commands on your machine, asking first by default.
Setting up a full research project that is reproducible, with every change to the code and the paper tracked.

More access means more risk

  • Chat cannot change your files. You copy out what you use.
  • Cowork and Claude Code can overwrite a week of work.
  • Use the least access the job needs.
  • Before connecting a folder, know how to get it back.

What you may put into these tools

  • Nothing at moderate risk or above in a public AI tool. Licensed data counts.
  • If you cannot upload your file, write the code on an invented sample with the same columns, then run it yourself.
  • ChatGPT free: three file uploads a day.
  • Claude: switch on Code execution and file creation under Settings → Capabilities.
  • Cornell: “You are accountable for your work, regardless of the tools you use to produce it.”

IT@Cornell, AI guidelines · Claude Help Center, code execution

A record of what changed

  • Git: a saved history of every change to your project.
  • GitHub: a website that keeps that history online, so a team shares one copy.
  • With git you can see what a tool changed, and undo it.
  • Commit your folder before connecting it to an assistant.
  • A chat transcript is not a record. The same prompt can give different answers.
  • Step by step, in AEM 6850: version control with git.

3. AI for literature reviews

Why review the literature?

  • Your proposal has to say why the study is new and why it matters.
  • Saying that clearly is framing.
  • You can only frame a question well if you know the literature.
  • The review explains and justifies the existence of your study.
  • A tool cannot tell you what it failed to find.

References from memory are often wrong

  • 8 free chatbots (February 2025): 26.5% of references fully correct.
  • Economics: over 30% of GPT-3.5’s citations did not exist. GPT-4 was barely better.
  • Korinek (JEL, 2023) asked GPT-4 for his own paper: real title, invented journal.
  • Elicit, Perplexity, Ai2 ScholarQA and Consensus cited 5 to 18 of 21 retracted papers without saying so.

The 8 chatbots, free versions: GPT-4o-mini, Claude 3.5 Sonnet, Copilot (GPT-4), DeepSeek-V3, Gemini 2.0 Flash, Grok-3, Mistral Large (Le Chat), Perplexity Sonar.

Cabezas-Clavijo and Sidorenko-Bautista (JDIS, 2026) · Buchanan, Hill and Shapoval (American Economist, 2024) · Korinek (JEL, 2023) · MIT Technology Review, 2025

What an anchor paper is

  • Anchor paper: a published paper close to your question that you have read.
  • It asks your question in another setting, or a close question in yours.
  • Or it uses the data or the method you plan to use.
  • Start with two or three, from your advisor, a recent review or a first search.
  • Anchors change as you find closer papers.

How to find the papers

1. Anchor papers two or three papers you have read 2. Related leads their references and citations, plus AI suggestions 3. Check each lead find it in a database, open it, keep or drop 4. Update the anchors a closer paper becomes an anchor repeat stop when a round adds nothing new Write the section
  • Keep a log: one row per paper, where it came from, and whether you opened it.

Follow the citations of your anchors

  • Go back through each anchor’s reference list.
  • Go forward to the papers that cite it.
  • On 250 computer-science papers, a search that followed citation chains recovered over 80% of each paper’s references.
  • Keyword search alone recovered under 20%.
  • Tools: Google Scholar Cited by, Semantic Scholar, Connected Papers.

Pipeline built on GPT-OSS-120B, with Qwen3-Embedding-8B for ranking. Not yet peer reviewed.

Sahu, Charlin and Pal (arXiv, 2026)

Use memory for leads

  • Give it your anchors. Ask for related papers, authors, search terms and journals.
  • Treat every answer as a lead to look up.
  • GPT-4 is “often able to provide standard references that are frequently cited in the literature.”
  • ChatGPT got less reliable as questions got more specific.

Korinek (JEL, 2023) · Buchanan, Hill and Shapoval (American Economist, 2024)

Search a database and let the tool screen

  • Look up each lead yourself, in EconLit or Google Scholar.
  • Give the tool the results to sort and screen.
  • Screening a known set, Elicit kept 91% of the relevant papers.
  • Across 19 studies, AI screeners wrongly dropped a median 28%.
  • Check what it drops.

Mazzali tested Elicit’s systematic-review workflow; no model version is named. Clark’s 19 studies tested mostly ChatGPT (GPT-3.5, GPT-4, GPT-4o), with some on Claude 2, Bing AI and Perplexity.

Mazzali et al. (BMC Med Res Methodol, 2026) · Clark et al. (Res Synth Methods, 2025)

Write your own framing

  • Framing: what you ask, why it matters, and what is new compared with your anchors.
  • Tools are still weak at this. They produce the framing of an average paper.
  • Write yours first, in two or three sentences.
  • Then have the tool test it against your anchor papers:

Here is my framing and the introductions of my anchor papers. Quote each paper’s statement of its own contribution. Then list where my framing overlaps with theirs, and what a referee would say is not new.

  • Revise it yourself. Do not ask for a new version.

Avoiding hallucinated references

  • Paste the DOI after doi.org/. Not found is a strong warning sign.
  • If it resolves, check the authors, year and title.
  • No DOI: search the exact title in Google Scholar.
  • Real papers get miscited too: 43% of GPT-3.5’s real citations had errors.
  • Open the paper and find the passage you are citing.
  • Cornell Library: “do check whether the references are real by looking up the source material.”

Walters and Wilder tested ChatGPT with GPT-3.5 and GPT-4, in 2023.

Walters and Wilder (Sci Rep, 2023) · Cornell University Library

4. AI for writing

What a tool cannot be responsible for

  • The rules start when a document goes out under your name.
  • A tool cannot be an author: “they cannot take responsibility for the submitted work.”
  • Nature: polishing language is fine. Extensive writing help must be disclosed.
  • Generating your reasoning without saying so is not allowed.
  • “Human accountability is non-transferable.”

COPE, Authorship and AI tools · Nature Portfolio, AI policy

You write the outline

  • The structure carries the argument. You write it.
  • One bullet per paragraph, in two parts:
    • the topic sentence, in full
    • what the paragraph discusses
  • Do not ask a tool to propose the structure.
  • You would not know why it picked that one.

Ask it to audit your plan

  • Give it your outline. Ask what is wrong with it.
  • Which paragraph makes two claims?
  • Which bullet does not follow from the one before?
  • Which claim has no evidence named?
  • Where does the order bury the point?
  • Ask for a list of problems, not a rewrite.

Outlining a published paper

  • This is where these tools are strongest.
  • Give it a paper in your area.
  • Ask what each paragraph of the introduction claims, and what job it does.
  • You get the paper’s outline, in the same form as yours.
  • Three papers in your field give you a model.
  • The paper sits beside the answer, so checking is easy.

It makes the claim bigger than the result

  • DeepSeek, ChatGPT-4o and LLaMA 3.3 70B overgeneralised in 26–73% of summaries.
  • Claude models were the most faithful to the original papers.
  • Across all ten models, about 5 times as often as expert summaries.
  • Three moves to look for in your draft:
    • a sample becomes people in general
    • past tense becomes present tense
    • a result becomes a recommendation
  • Asking for accuracy made it about twice as likely.

The ten models: GPT-3.5 Turbo, GPT-4 Turbo, ChatGPT-4o, ChatGPT-4.5, LLaMA 2 70B, LLaMA 3.3 70B, Claude 2, Claude 3.5 Sonnet, Claude 3.7 Sonnet, DeepSeek. 4,900 summaries.

Peters and Chin-Yee (R Soc Open Sci, 2025)

Write the paragraphs yourself

  • Step two: turn each bullet of your outline into a paragraph.
  • The question, what is new and the design are yours to write.
  • Then ask the tool what is wrong with each paragraph.
  • One job is safe to hand over: the link between two of your paragraphs.

Write one sentence that links these two paragraphs. Add no new claim.

Loose text and the time it costs

  • Leaning on the tool gives long, smooth text that says little.
  • Cutting it back takes longer than writing it.
  • You lose the practice. Editing is how writing is learned.
  • Readers learn its habits and stop trusting the text.

Numbers come from your table

  • While drafting, leave placeholders for results, such as [Table 2, row 3].
  • No number goes in from memory, yours or the tool’s.
  • When the analysis is done, fill each placeholder from the table.
  • Then have the tool audit every number against the table:

List every number in this section. For each one, quote the table cell it came from. Mark any number you cannot find as “NOT IN TABLE”. Do not rewrite anything.

  • Fix what it flags yourself.

Anthropic, Reduce hallucinations: verify with citations

5. AI for coding

Plan first and work in small steps

  • Decide the question, the sample and the method yourself.
  • Ask for a plan before any code, and read it.
  • One task per conversation. Start a new one for the next task.
  • A task is small enough when you can predict one number of its answer.

Adapted from AEM 6850, meetings 8 and 9

Commit before each task

  • Commit your work before you ask the tool to change anything.
  • Afterwards, look at what changed, line by line.
  • Trust the changes you can see over the tool’s summary of them.
  • Undo anything you did not ask for.

Step by step: AEM 6850, meeting 7 on version control with git

How to acquire data

  • Download if you can. It is boring and usually fastest.
  • An API: a key, a rate limit, stable fields, a record of your request.
  • Scrape last. Pages change, rows vanish silently, terms often forbid it.
  • Every route has a wait, from days to months. Register now.
  • The full list, with waiting times, is on the data sources page.

Where to get data

Explore the data before you analyze it

  • Spend time with the file before any analysis.
  • What is one row? What are the units? How is a missing value written?
  • Plot it: maps for spatial data, line plots for time series.
  • The plot shows the structure and the patterns in the data.
  • It is also a check. A bad merge shows up as a hole or a jump.
  • You cannot spot a wrong answer about a file you never looked at.

The worst errors raise no warning

  • Code that fails is easy to fix. Code that runs and is wrong is the danger.
  • The usual shapes: a merge that drops or duplicates rows, missing values handled silently, a unit mismatch.
  • Reinhart and Rogoff (AER P&P, 2010)
    • Reported slower growth once public debt passes 90% of GDP.
    • A spreadsheet formula left out 5 of their 20 countries.
  • Public Health England (October 2020)
    • Moved COVID-19 test results through an old Excel format capped at 65,536 rows.
    • 15,841 positive cases went unreported for a week, with no error.

Reinhart and Rogoff (AER P&P, 2010) · Herndon, Ash and Pollin (CJE, 2014) · PHE statement, 4 October 2020

Build checks into every step

  • Ask for code you can rerun, not just an answer.
  • Before you run it, write down the number you expect.
  • A confident “no problems” is not a check. Ask for the code and the count.
  • Check big claims in a fresh conversation.
  • When a check fails, fix that one thing.

Adapted from AEM 6850, meetings 8 and 9 · Ferman and Finamor (arXiv, 2025)

Five checks you run on any file

  1. Row counts across a join. More rows: a duplicate key. Fewer: dropped rows.
  2. Totals against a published figure.
  3. Check a few raw records by eye.
  4. Orders of magnitude. Is it 58 or 58,000?
  5. Obtain the same result using an independent route.

6. Disclosure

Disclosure is required

  • Every deliverable in this course carries a disclosure block.
  • Leaving it out is an academic integrity violation.
  • Cornell’s Code counts AI help “not explicitly permitted by the instructor” as unauthorized assistance.
  • The AER: AI use “must be briefly described during the submission process”.

Syllabus, AI policy · Cornell Code of Academic Integrity, 2026 · American Economic Review, editorial policy

What you write down about what you used

Three lines on every deliverable:

Tools. Claude Sonnet 5 (claude.ai) and ChatGPT 5.
Used for. Drafting the cleaning script. Auditing the outline of section 2.
Checked. Row counts before and after the join. Every reference opened.

  • Too vague: AI, help with the code, it worked.
  • Naming a mistake the tool made counts in your favour.