2  Small Subset: GPT-5 Vs Rule-Based

We analyze LLM scraping results for three randomly selected PDFs, comparing them against our current rule-based scraper and the original PDF files.

Key Takeaway

Results show promise for significant value add via improved and flexible scraping via LLM intelligence. While the LLM outperforms the rule-based scraper, it produces one singular, systematic error type: tabular gap-filling errors where the model interpolates values in blank PDF table cells rather than preserving null states. These errors appear predictable and easily identifiable, making them likely fixable through post-processing. In addition to automatic value corrections made the LLM, based on our testing we see examples when rule-based scraper misses large amounts of records, it’s not yet clear how common this is, but it is corrected by the LLM.

2.1 Comparisons

2.1.1 2025 Week 28

Total Records:

  • The LLM (GPT-5) extracts the same number of records as the rule-based scraper
  • This matches the correct count as verified against the PDF

Value Discrepancies:

  • 9 discrepancies exist between the two datasets
  • In 7 cases, the rule-based scraper is actually WRONG due to errors in the PDF table itself. The LLM corrects these by leveraging contextual narrative text and identifying misplaced commas
  • In the remaining 2 cases, the LLM is wrong while the rule-based scraper is correct. This represents the tabular gap-filling error pattern
    • Errors occur when blank cells lack placeholders (0, “-”, etc.)
    • Pattern is consistent but not universal
    • Aggressive prompt engineering has not resolved this issue
Country Event Parameter LLM Baseline Verification pdf
0 Angola Cholera TotalCases 27160.0 2716.0 Week_28__7_-_13_July_2025.pdf
5 Burundi Mpox TotalCases 4010.0 401.0 Week_28__7_-_13_July_2025.pdf
6 Burundi Mpox CasesConfirmed 4010.0 401.0 Week_28__7_-_13_July_2025.pdf
10 Democratic Republic of the Congo Measles TotalCases 30690.0 3069.0 Week_28__7_-_13_July_2025.pdf
15 Madagascar Malnutrition crisis TotalCases 357900.0 3579.0 Week_28__7_-_13_July_2025.pdf
20 South Sudan Cholera TotalCases 82890.0 8289.0 Week_28__7_-_13_July_2025.pdf
21 South Sudan Cholera CasesConfirmed 82890.0 8289.0 Week_28__7_-_13_July_2025.pdf
26 Tanzania, United Republic of Cholera CasesConfirmed 159.0 0.0 Week_28__7_-_13_July_2025.pdf
27 Tanzania, United Republic of Cholera Deaths 0.0 159.0 Week_28__7_-_13_July_2025.pdf

2.1.2 2025 Week 4

Total Records:

  • The LLM extracts 110 records (correct per PDF)
  • The rule-based scraper only extracts 34 (significant undercount)

Value Discrepancies:

Country Event Parameter LLM Baseline Verification pdf
1 Burundi Cholera CasesConfirmed 12.0 0.0 Week_4__20_-_26_January_2025.pdf
2 Burundi Cholera Deaths 0.0 12.0 Week_4__20_-_26_January_2025.pdf
6 Central African Republic Measles CasesConfirmed 1.0 0.0 Week_4__20_-_26_January_2025.pdf
7 Central African Republic Measles Deaths 0.0 1.0 Week_4__20_-_26_January_2025.pdf
11 Chad Measles CasesConfirmed 20.0 0.0 Week_4__20_-_26_January_2025.pdf
12 Chad Measles Deaths 0.0 20.0 Week_4__20_-_26_January_2025.pdf
16 Comoros Cholera CasesConfirmed 152.0 0.0 Week_4__20_-_26_January_2025.pdf
17 Comoros Cholera Deaths 0.0 152.0 Week_4__20_-_26_January_2025.pdf
21 Comoros Cyclone Chido CasesConfirmed 5.0 0.0 Week_4__20_-_26_January_2025.pdf
22 Comoros Cyclone Chido Deaths 0.0 5.0 Week_4__20_-_26_January_2025.pdf

2.1.3 2020 Week 49

Total Records:

  • LLM extracts 117 records vs rule-based scraper’s 119
  • The 2 missing LLM records are “closed events” - likely a solvable via prompting, but need to decide how to properly deal with these

Value Discrepancies:

  • Common records show the same tabular gap-filling error pattern
Country Event Parameter LLM Baseline Verification pdf
1 Nigeria Measles CasesConfirmed 14.0 0.0 OEW49-291106122020.pdf
2 Nigeria Measles Deaths 0.0 14.0 OEW49-291106122020.pdf