{
  "id": 12026503,
  "title": "300-question workbook automatically generated by AI! API error at question 250, 75 minutes down the drain. How we implemented \"resume where you left off\" with a checkpoint mechanism.",
  "url": "https://urgent.news/2026/10/04/300-ai-250-api-75",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-04T23:30:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/masaoshimadaopen/300wen-nowen-ti-ji-woaidezi-dong-sheng-cheng-250wen-mu-deapiera-75fen-gashui-nopao-ni-tietukupointoji-gou-detu-zhong-zai-kai-woshi-zhuang-sitahua-4cpb"
  },
  "original_language": "ja",
  "account": "A Japanese writer attempted to create 300 questions for a qualification exam using GenAI, but their script encountered a ConnectionError, resulting in the loss of nearly 250 generated questions and a significant amount of time and API tokens. The issue arose from a naive implementation that didn't account for potential interruptions, causing all progress to be lost if an error occurred. To fix this, the writer implemented a checkpoint mechanism that saves progress to a file, allowing the script to resume from where it left off in case of an interruption. This approach ensures the script's reliability and robustness, and can be applied to various scenarios, including large-scale data processing and web scraping.",
  "summary": "最近、ある資格試験の勉強をしてて、公式の問題集だけじゃ足りないなと思ってた。じゃあ作るか、と。GenAIを使えば、類題なんていくらでも作れる時代だし。 早速、試験のシラバスを食わせて、章ごとに問題と解説を300問分生成するスクリプトを書いた。 python generate_questions.py を叩いて、あとは待つだけ。プログレスバーがぐんぐん伸びていくのを見ながら、「いやー、便利な時代になったもんだ」なんて思ってた。 実行開始から75分後。プログレスバーは8割を超えたあたり。そろそろ終わるかな、とコンソールを覗き込んだら、見たくない赤い文字が表示されてた。 requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}