Home/Blog/How to Clean BibTeX without Inventing DOIs
Blog

How to Clean BibTeX without Inventing DOIs

P
promptstudio
How to Clean BibTeX without Inventing DOIs

BibTeX cleaners fail when they "complete" the record. They mint a DOI, a page range, and a journal ISSN the file never had. You compile. A reviewer looks up the DOI. It belongs to a different paper, or to nothing. The job is a cleanup that normalizes what is in the file, leaves missing fields missing, and refuses to invent identifiers.

The matching generator is the BibTeX Cleaner that Refuses Invented DOIs prompt. Browse related cards in the PromptDig library (Browse more prompts). When a cleaned file survives a DOI lookup on only the DOIs you already had, share the version you actually use (Share a prompt).

Paste the .bib. Do not let the model search its memory.

Question is the cleanup: braces, encoding, duplicate keys, consistent entry types. Sources you may use: the .bib, a house style note, a CSL note if you pasted one. Pastes: the entries. Source policy: file only. No Crossref backfill, no Google Scholar, no "this is a famous paper." Output shape: cleaned entries plus a refuse list. Off-limits: invented DOIs, invented pages, invented volumes.

If an entry has title and author and no DOI, the cleaned entry still has no DOI. The refuse list should say DOI missing, not filled. If an entry has a DOI, keep it as typed unless you also pasted a correction. Do not "fix" a DOI checksum from memory.

Page ranges: only if pages is in the entry. Do not add 1-18 because that is a common length. Do not add article numbers. Do not add a URL if none was present.

Normalize without completing

Safe cleanup: consistent quote vs brace rules you named, ASCII vs UTF-8 as in the file, month macros vs strings as you specified, duplicate key detection, and entry-type checks (article vs inproceedings) only when the fields in the entry already imply the type. If the type is wrong and the fields are mixed, flag it. Do not silently convert.

Author names: keep the order in the file. Do not expand J. to Jane. Do not add an ORCID. Do not add a second author you "remember."

Titles: keep capitalization unless you named a title-case rule and it can be applied without guessing proper nouns. Do not translate a title. Do not add a subtitle from memory.

Years: keep as typed. Do not "correct" 2023 to 2024. If year is missing, it stays missing. A missing year is a gap, not a chance to look it up.

If you named a BibTeX tool or biber version, lock it. If you did not, write unknown. Do not emit biblatex fields in a BibTeX-only file unless you asked.

Refuse list, method, and a file a compiler can run

The refuse list is the point: missing DOI, missing pages, missing publisher, missing editor for collections, missing URL for @misc. Print it as a table of keys. Do not hide it in a comment at the bottom of one entry.

Method notes: what was changed (whitespace, braces, encoding) and what was not (identifiers). If the model added even one DOI, the run failed. Delete the output and rerun with Off-limits restated.

Gaps: missing house style, missing whether you use biblatex, missing whether arXiv IDs may be kept, missing whether you allow ISBN backfill (you should not, unless the ISBN is in the file). Print those.

If the .bib includes unpublished or legal memos, add not-advice and do not mint a journal. Strip emails from eprint fields if they appeared.

Banned words: best, guaranteed, #1. "Complete record" is a banned idea here. Completeness is how invented DOIs arrive.

A worked pass: messy file, Friday compile

Say Pastes has twenty entries, some without DOI, a Friday deadline, and no publisher lookup budget. The cleaner can brace titles, flag duplicate keys, and list missing DOIs. It cannot add 10.1000/xyz. It cannot add page numbers from a remembered PDF.

If two entries look like duplicates, report the keys and the fields that differ. Do not merge them if years or titles differ. A false merge deletes a real paper.

When you later look up a DOI on the publisher page, paste that DOI next to the key and rerun as a supervised fill. That is a paste, not a model memory. The source policy echo should still refuse unsupervised backfill.

Watch @misc and preprint entries. The model likes to promote them to @article and invent a journal. Keep the type unless the existing fields already match a type change you approved.

Fill the card, then run

Paste the .bib and your house rules. Leave Off-limits explicit: no minted DOIs or pages.

Question: [Question]
Sources I may use: [Sources]
Pastes / files: [Pastes]
Source policy: [Policy]
Output shape: [Shape]
Off-limits: [OffLimits]

A bibliography is a set of claims. When a run leaves DOI empty because the file did, share that filled card.