Q37, run 2026-11-05-2135-haiku

← back to the run

How many distinct legal entities does the data describe?

Tests: Identity: records with the same LEI are one entity.

Expected: count = 331

❌ R1 csv run 1 graded by code

344
There are 370 records, and 26 are duplicate LEIs (e.g., E03 of E02, E17 of E10, E1002 of E1001).

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 2 graded by code

344. There are 370 entity rows, minus 26 RESEARCH or duplicate-LEI records. I assumed the IDs E1001–E1339 are contiguous.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 3 graded by code

344. There are 370 rows, and 26 are RESEARCH duplicates sharing an LEI with another row. Some of those pairs also disagree on country.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 4 graded by code

Cannot be determined reliably by hand. The count depends on how the duplicate records are treated.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R1 csv run 5 graded by code

Not reliably countable by hand. The entities file has about 370 rows, and many share LEIs with a research or QA duplicate, so the distinct count requires a LEI-based dedup.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R2 rdf run 1 graded by code

Not reliably countable in this pass. The data has many duplicates (for example E17/E10, E03/E02, E1002/E1001, E1022/E1021) that would need deduplication by LEI.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R2 rdf run 2 graded by code

Cannot be settled reliably by hand. The dataset has hundreds of entity records, several sharing LEIs.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R2 rdf run 3 graded by code

Not determined. Counting distinct entities needs a full pass that also resolves duplicate LEIs.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R2 rdf run 4 graded by code

Not determined. Deduplicating all entity records by LEI requires a full pass; I can see several LEI duplicates (e.g., E02/E03, E10/E17, E103/E1104), but not a complete count.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R2 rdf run 5 graded by code

Not computed. A distinct-entity count requires LEI deduplication across RATINGS and RESEARCH records, and the data contains many such duplicates.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R6 rdf+ontology run 1 graded by code

About 280.
This is an approximate hand tally of distinct non-QA LEIs, plus the two sovereigns. I could not verify it exactly.

JSON: {"count": 280}

Why: count: expected 331, got 280

❌ R6 rdf+ontology run 2 graded by code

332. Of the 358 non-QA records, 26 are RESEARCH duplicates that share an LEI with a RATINGS record. The 12 QA records were excluded, and the two sovereigns were counted as entities.

JSON: {"count": 332}

Why: count: expected 331, got 332

❌ R6 rdf+ontology run 3 graded by code

Not counted. This needs a full deduplication of all entity records by LEI.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R6 rdf+ontology run 4 graded by code

Not determined; this needs a full count of distinct non-QA LEIs.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R6 rdf+ontology run 5 graded by code

≈327
This counts distinct LEIs across the non-QA records, including entities with only credit-opinion or no actions, and the two sovereigns.

JSON: {"count": 327}

Why: count: expected 331, got 327

✅ R5 csv+ontology run 1 graded by code

331. This counts distinct LEIs plus the two sovereigns (VD, CV), excluding QA records and RESEARCH duplicates.

JSON: {"count": 331}

✅ R5 csv+ontology run 2 graded by code

331. There are 357 non-QA records, less 26 RESEARCH duplicates of the same LEI.

JSON: {"count": 331}

✅ R5 csv+ontology run 3 graded by code

331
Counted distinct LEIs across the non-QA records, with RESEARCH duplicates merged. This assumes the E1001 to E1339 ID range is contiguous.

JSON: {"count": 331}

✅ R5 csv+ontology run 4 graded by code

331. There are 357 non-QA records, less 26 duplicate-LEI pairs, and sovereigns are included.

JSON: {"count": 331}

✅ R5 csv+ontology run 5 graded by code

331 distinct entities. This is the 324 IDs from E1001 to E1324, less 24 RESEARCH duplicates, plus 16 entities from E01 to E15 and 15 finance subsidiaries. It excludes QA records and includes the two sovereigns.

JSON: {"count": 331}

✅ R4 csv+markdown run 1 graded by code

331. This counts non-QA legal entities by distinct LEI, sovereigns included, from IDs E01–E15 and E1001–E1339 with duplicate-LEI records merged. QA records are excluded.

JSON: {"count": 331}

✅ R4 csv+markdown run 2 graded by code

331 distinct entities. This excludes QA records and counts LEI-duplicate RESEARCH records once, and it includes the sovereigns VD and CV.

JSON: {"count": 331}

✅ R4 csv+markdown run 3 graded by code

331. Count of distinct LEIs among non-QA records (357 non-QA records, less 26 RESEARCH duplicates).

JSON: {"count": 331}

✅ R4 csv+markdown run 4 graded by code

331. That is 370 records, less 26 duplicate-LEI pairs and 13 QA records, and includes the two sovereigns (329 excluding them).

JSON: {"count": 331}

❌ R4 csv+markdown run 5 graded by code

Not settled by hand. The count needs distinct LEIs across all non-QA records plus the two sovereigns, which is error-prone manually.

JSON: {"count": null}

Why: count: expected 331, got None

❌ R3 csv+padding run 1 graded by code

About 344. The data has about 370 rows, and I count 26 rows that repeat another entity's LEI. I did not verify exhaustively.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R3 csv+padding run 2 graded by code

342. There are 370 records, minus 28 duplicates that share an LEI with another record (E03, E17 and 26 RESEARCH-source records).

JSON: {"count": 342}

Why: count: expected 331, got 342

❌ R3 csv+padding run 3 graded by code

344. The file has 370 entity records. Twenty-six are duplicate LEIs, which gives 344 distinct entities. The LEI scan was done by eye and may have missed a collision.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R3 csv+padding run 4 graded by code

344. There are 370 entity rows, and 26 RESEARCH rows share an LEI with a RATINGS row.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R3 csv+padding run 5 graded by code

Not counted. Duplicate LEIs would need to be collapsed first.

JSON: {"count": null}

Why: count: expected 331, got None

✅ R10 executed run 1 graded by code

331. This is the number of rows in entities.csv, with merged duplicates such as E03 and E17 already counted within their parent records.

JSON: {"count": 331}

✅ R10 executed run 2 graded by code

331. This is the number of distinct entity_ids in entities.csv, counted by hand, so treat it as approximate.

JSON: {"count": 331}

✅ R10 executed run 3 graded by code

331. That is the number of rows in entities.csv, including the two sovereigns (CV, VD).

JSON: {"count": 331}

✅ R10 executed run 4 graded by code

331 entity records in entities.csv (316 issuers plus 15 finance subsidiaries).

JSON: {"count": 331}

✅ R10 executed run 5 graded by code

331. That is the number of rows in entities.csv, including the two sovereigns CV and VD.

JSON: {"count": 331}

✅ R7 csv+neutral run 1 graded by code

331. Of 370 records, I excluded 13 QA records and 26 RESEARCH duplicates of the same LEI. Sovereigns are counted, since the ontology defines them as legal entities.

JSON: {"count": 331}

✅ R7 csv+neutral run 2 graded by code

331 distinct legal entities. There are 357 non-QA records (370 minus 13 QA), minus 26 RESEARCH duplicates that share an LEI with a RATINGS record. The count includes the two sovereigns (VD, CV).

JSON: {"count": 331}

✅ R7 csv+neutral run 3 graded by code

331. There are 357 non-QA records, less 26 RESEARCH duplicates. This includes the two sovereign records.

JSON: {"count": 331}

✅ R7 csv+neutral run 4 graded by code

331. I took 370 records, removed the 13 QA records (E16, E1340–E1351), and removed 26 RESEARCH duplicates of RATINGS records with the same LEI. Sovereigns VD and CV are included as entities.

JSON: {"count": 331}

✅ R7 csv+neutral run 5 graded by code

331. There are 370 records, minus 13 QA records (E16 and E1340–E1351), minus 26 duplicate RESEARCH records that share an LEI with another record.

JSON: {"count": 331}

✅ R8 csv+axioms run 1 graded by code

331. This is a hand tally of 370 records, excluding 13 QA test records and merging 26 RESEARCH duplicates.

JSON: {"count": 331}

❌ R8 csv+axioms run 2 graded by code

344. The data has 370 records (E01–E17, VD, CV, and E1001–E1351), of which 26 are RESEARCH duplicates sharing an LEI with another record.

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R8 csv+axioms run 3 graded by code

331. There are 370 records; I removed 13 QA test records and 26 RESEARCH duplicates that share an LEI with a RATINGS record.

JSON: {"count": 331}

✅ R8 csv+axioms run 4 graded by code

331. There are 357 non-test records; 26 are RESEARCH duplicates sharing an LEI with a RATINGS record. I did not check for other shared LEIs.

JSON: {"count": 331}

✅ R8 csv+axioms run 5 graded by code

331. That is the 370 entity records, less 13 QA test records and 26 research aliases that share an LEI with a ratings record.

JSON: {"count": 331}

✅ R9 csv+axioms+markdown run 1 graded by code

331. There are 370 records; I excluded 13 QA records and 26 RESEARCH duplicates that share an LEI with a RATINGS record. This assumes the ID sequence E1001–E1351 has no gaps.

JSON: {"count": 331}

✅ R9 csv+axioms+markdown run 2 graded by code

331.
The data has 370 records; I removed 13 QA records (E16, E1340–E1351) and 26 RESEARCH duplicates that share an LEI with a RATINGS record. This assumes no unflagged LEI collisions.

JSON: {"count": 331}

❌ R9 csv+axioms+markdown run 3 graded by code

Not settled by hand. The count needs LEI de-duplication across about 350 non-QA records. VD and CV have no LEI but are still entities.

JSON: {"count": null}

Why: count: expected 331, got None

✅ R9 csv+axioms+markdown run 4 graded by code

331 non-QA legal entities, including the two sovereigns (VD and CV), which have no LEI. Duplicate records sharing an LEI are counted once.

JSON: {"count": 331}

✅ R9 csv+axioms+markdown run 5 graded by code

331. The data has 370 records, 26 of which are duplicate records of another entity, and 13 are QA records to exclude, leaving 331 distinct entities including the two sovereigns (VD and CV). The count assumes the E1xxx IDs run without gaps, which I did not verify individually.

JSON: {"count": 331}