Skip to content

Drop countries and camps filed as organizations; add scripts/audit_entities.py - #65

Merged
strickvl merged 4 commits into
mainfrom
claude/project-thread-y154bo
Nov 3, 2026
Merged

strickvl merged 4 commits into
mainfrom
claude/project-thread-y154bo

Conversation

@strickvl

@strickvl strickvl commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Requested by Alex · project thread

What this does

1. Countries and camps stop turning into organizations. In the 1 Nov 74-article Qwen run, 60 names showed up in two tables. Two patterns stood out:

  • Countries. One article has Mattis listing the countries that should take back their ISIS fighters. Afghanistan, Belgium, France, India, Malaysia, Tunisia, Turkey and about 20 more each came back as a "government" organization, with a one-article profile. Each one was also a proper country location from that same article.
  • Camps and bases. Camp 7, Camp 8, Camp Echo, Camp Justice, Camp Lejeune, "Guantanamo Bay Navy Base" and "Guantánamo detention center" came back as "military" organizations, as well as locations.

drop_misfiled_organizations() now drops two kinds of organization:

  • An organization whose name is a country location from the same article. "France" goes; "French government" stays. "Israel" with no country location in that article stays.
  • An organization named like a facility, typed military, government or other. That means it starts with "Camp", ends in "base" or "prison", or contains "detention center", "detention facility" or "naval station". "Joint Task Force-GTMO" and "U.S. Southern Command" stay, and so does a media or legal org such as "Prison Legal News".

Dropped names are recorded in phase_outcomes["misfiled_organizations"] with reason country or facility, next to the existing person reason.

2. scripts/audit_entities.py checks a finished run without calling any model:

  • cited sentences lost between profile versions, and whether the lost sentence's article is still cited anywhere,
  • updates that shrink a profile by more than 20%,
  • sentences that repeat an earlier one,
  • "sources disagree" sentences,
  • citations that don't point at a linked article (garbled ids),
  • name-variant duplicates, names found in two tables, and misfiled types.

--replay runs the same history checks on just eval-replay snapshots. It produced the numbers in the spot-check report.

Not covered here

  • Organizations filed as building locations (universities, courts, the Senate, the White House) are left alone. Some of them are buildings too.
  • Repeated sentences, invented disputes and passing-mention bloat are not fixed here. The fact-list updater work in the profile-updating thread covers those.

Checks

ruff check, ruff format --check, the file-length check and pytest -m "not asyncio" all pass (566 passed). New tests are in tests/test_misfiled_locations.py and tests/test_audit_entities.py. CLAUDE.md is updated.


Generated by Claude Code

…facts, bad citations and duplicates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FomNXbLBy4aAuCUi4jKM93
…dit_entities.py`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FomNXbLBy4aAuCUi4jKM93
…nizations()`; test `scripts/audit_entities.py`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FomNXbLBy4aAuCUi4jKM93
@strickvl strickvl self-assigned this Nov 3, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T07:32:20.127144Z 84c7fc3 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc85019cd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/misfiled_locations.py Resolved
@strickvl
strickvl merged commit 983e80c into main Nov 3, 2026
2 checks passed
@strickvl
strickvl deleted the claude/project-thread-y154bo branch November 3, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants