GrepBoard/매뉴얼
47 편 ·

AI 가 준 참고문헌을 Crossref 와 PubMed 로 검증하기

·Claude Code 2.1.302 · claude-sonnet-5-5 · curl · Python 3 (2026-10-19)·6 단계

AI 답에 붙은 DOI 를 Crossref 로 조회해 존재·제목·저자·연도를 맞춰 보고, PubMed 초록으로 그 논문이 정말 그 주장을 하는지 확인하는 절차입니다.

AI 답에 붙은 참고문헌을 인용하기 전에 세 가지를 확인합니다. 존재하는가, 서지 정보가 맞는가, 그 논문이 그 주장을 하는가.

[1] 출처와 DOI 를 요구하는 질문을 던지고, 답에서 DOI 만 뽑습니다.

console
$ claude -p "Does intermittent fasting improve weight loss compared with continuous calorie restriction? Answer in 4 sentences, and cite 5 peer-reviewed sources with authors, year, title, journal and DOI." > answer.txt$ grep -o 'DOI: [^ ]*' answer.txt | sed 's/DOI: //' > dois.txt$ cat dois.txt10.1001/jamainternmed.2017.093610.1001/jamainternmed.2020.415310.1056/NEJMoa211483310.1186/s12967-018-1748-410.1001/jamanetworkopen.2021.39558

[2] DOI 마다 Crossref 에 조회합니다. 없는 DOI 는 HTTP 404 와 Resource not found. 가 나옵니다. 200 이면 등록된 DOI 입니다.

console
$ curl -s -w ' [HTTP %{http_code}]\n' -o body.json "https://api.crossref.org/works/10.1056/NEJMoa2114833" [HTTP 200]

[3] 응답에서 DOI · 제목 · 첫 저자 · 연도 · 저널만 뽑아 답의 인용과 맞춰 봅니다. q.py 는 아래와 같습니다.

q.py
import sys,jsond=json.load(sys.stdin)["message"]print(d["DOI"]," | ",d["title"][0][:90]," | ",d["author"][0]["family"]," | ",d["issued"]["date-parts"][0][0]," | ",d["container-title"][0])
console
$ for d in $(cat dois.txt); do curl -s "https://api.crossref.org/works/$d" | python3 -I q.py; done10.1001/jamainternmed.2017.0936  |  Effect of Alternate-Day Fasting on Weight Loss, Weight Maintenance, and Cardioprotection A  |  Trepanowski  |  2017  |  JAMA Internal Medicine10.1001/jamainternmed.2020.4153  |  Effects of Time-Restricted Eating on Weight Loss and Other Metabolic Parameters in Women a  |  Lowe  |  2020  |  JAMA Internal Medicine10.1056/nejmoa2114833  |  Calorie Restriction with or without Time-Restricted Eating in Weight Loss  |  Liu  |  2022  |  New England Journal of Medicine10.1186/s12967-018-1748-4  |  Intermittent versus continuous energy restriction on weight loss and cardiometabolic outco  |  Cioffi  |  2018  |  Journal of Translational Medicine10.1001/jamanetworkopen.2021.39558  |  Intermittent Fasting and Obesity-Related Health Outcomes  |  Patikorn  |  2021  |  JAMA Network Open

5건 모두 존재했고 제목·첫 저자·연도·저널이 답과 일치했습니다. 이번에 가짜가 없었다는 뜻일 뿐입니다.

[4] 의심스러운 DOI 는 https://doi.org/<doi> 로도 열어 봅니다. 아래 두 번째 DOI 는 마지막 숫자를 일부러 바꾼 시험용입니다(AI 가 준 것이 아닙니다).

console
$ curl -s -o /dev/null -w "%{http_code}\n" https://doi.org/10.1056/NEJMoa2114833302$ curl -s -w ' [HTTP %{http_code}]\n' https://api.crossref.org/works/10.1056/NEJMoa2114834Resource not found. [HTTP 404]$ curl -s -o /dev/null -w "%{http_code}\n" https://doi.org/10.1056/NEJMoa2114834404

[5] 마지막으로 그 논문이 정말 그 주장을 하는지 초록과 대조합니다. Crossref 는 초록을 거의 주지 않으니(시험한 두 건은 abstract 칸 없음) PubMed 로 DOI 에서 PMID 를 찾아 초록을 받습니다.

console
$ curl -s "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=10.1056/NEJMoa2114833%5Baid%5D&retmode=json" | python3 -I -c 'import sys,json;print(json.load(sys.stdin)["esearchresult"]["idlist"])'['35443107']$ curl -s "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=35443107&rettype=abstract&retmode=text" | grep -A4 '^RESULTS'RESULTS: Of the total 139 participants who underwent randomization, 118 (84.9%) completed the 12-month follow-up visit. The mean weight loss from baseline at 12 months was -8.0 kg (95% confidence interval [CI], -9.6 to -6.4) in the time-restriction group and -6.3 kg (95% CI, -7.8 to -4.7) in the 

초록은 12개월 체중 변화 차이가 −1.8 kg(95% CI −4.0~0.4, P = 0.11)로 유의하지 않았다고 적습니다. AI 답의 「두 방식의 차이는 대개 1~2 kg 안쪽이고 임상적으로 큰 의미가 없다」와 방향이 같습니다.

[6] 결과를 인용마다 한 줄로 남깁니다: DOI · 존재(200/404) · 서지 일치 · 주장 일치(초록 확인/미확인). 미확인이 하나라도 있으면 그 인용은 글에 싣지 않거나 「미확인」으로 표시합니다.

참고: Crossref REST API · DOI Handbook · NCBI E-utilities

#research#citations#doi#verification