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

← 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 records sharing an LEI with another record (E03, E17 and 24 in the E10xx–E13xx range).

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 2 graded by code

344. entities.csv has 370 rows, and 26 are RESEARCH duplicates sharing a LEI with another row.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 3 graded by code

344. This is 370 records minus 26 duplicates that share an LEI with another record.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R1 csv run 4 graded by code

344. There are 370 entity rows; 26 are duplicates by LEI (E03, E17 and 24 RESEARCH rows).

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R1 csv run 5 graded by code

331. This is 370 records, less 26 RESEARCH duplicates (same LEI as a RATINGS record), less 13 QA-source records. If QA records count as real entities, the figure is 344.

JSON: {"count": 331}

❌ R2 rdf run 1 graded by code

344. That is 370 entity records minus 26 duplicate-LEI records.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R2 rdf run 2 graded by code

344. There are 370 entity records, and 26 share an LEI with another record, so merging those leaves 344.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R2 rdf run 3 graded by code

344. There are 370 entity records, of which 26 are duplicates sharing a LEI. This assumes every ID from E1001 to E1351 exists.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R2 rdf run 4 graded by code

344. There are 370 entity records and 26 duplicate pairs sharing a LEI.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R2 rdf run 5 graded by code

344. This is 370 entity records minus 26 duplicate pairs sharing an LEI; it assumes E1001 to E1351 are all present.

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R6 rdf+ontology run 1 graded by code

331. From 370 records I removed 13 QA records (E16, E1340–E1351) and 26 RESEARCH duplicates sharing an LEI. This assumes every ID from E1001 to E1351 exists as a record, which I did not verify one by one.

JSON: {"count": 331}

✅ R6 rdf+ontology run 2 graded by code

331. That is 357 non-QA records (including the two sovereigns) less 26 LEI duplicates, with the 13 QA records excluded.

JSON: {"count": 331}

✅ R6 rdf+ontology run 3 graded by code

331. The data has 370 records, which I count as 351 numbered E1001–E1351, 17 numbered E01–E17, and 2 sovereigns (VD and CV). Removing 13 QA records leaves 357, and merging 26 LEI-duplicate pairs gives 331. This relies on the E1001–E1351 range being contiguous.

JSON: {"count": 331}

✅ R6 rdf+ontology run 4 graded by code

331, assuming records E1001–E1351 are all present. That is 370 entity records, minus 13 QA records, minus 26 duplicate records sharing an LEI.

JSON: {"count": 331}

❌ R6 rdf+ontology run 5 graded by code

344. There are 370 entity records, and 26 of them are duplicate records of an entity that already has a record.

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R5 csv+ontology run 1 graded by code

331. There are 370 records, less 13 QA records and 26 duplicate records sharing an LEI.

JSON: {"count": 331}

✅ R5 csv+ontology run 2 graded by code

331. This is 370 records minus 26 duplicate records (same LEI) and 13 QA records.

JSON: {"count": 331}

✅ R5 csv+ontology run 3 graded by code

331. I excluded the QA records (E16 and E1340–E1351) and merged records sharing an LEI. Sovereigns and finance subsidiaries are included.

JSON: {"count": 331}

✅ R5 csv+ontology run 4 graded by code

331. There are 370 records, minus 13 QA records and 26 duplicate-LEI records.

JSON: {"count": 331}

✅ R5 csv+ontology run 5 graded by code

331. That is 370 records, less 13 QA records and 26 duplicate records.

JSON: {"count": 331}

✅ R4 csv+markdown run 1 graded by code

331. There are 370 records, of which 13 are QA, leaving 357. Of those, 26 are duplicates of the same LEI, which leaves 331, including the two sovereigns.

JSON: {"count": 331}

✅ R4 csv+markdown run 2 graded by code

331. Of the 394 records, 3 (E16 and the two QA ones) are excluded as QA. After excluding 26 duplicate records by LEI, 331 entities remain, including the sovereigns VD and CV.

JSON: {"count": 331}

✅ R4 csv+markdown run 3 graded by code

331. There are 370 records, minus 26 duplicate records of the same LEI, minus 13 QA records.

JSON: {"count": 331}

✅ R4 csv+markdown run 4 graded by code

331. There are 370 records, less 26 same-LEI duplicates and 13 QA records. This counts the two sovereigns.

JSON: {"count": 331}

✅ R4 csv+markdown run 5 graded by code

331. That is 16 core entities plus 315 from E1001–E1339, after merging same-LEI records and excluding QA.

JSON: {"count": 331}

❌ R3 csv+padding run 1 graded by code

344. The file has 370 rows, and 26 are duplicates sharing an LEI with another row.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R3 csv+padding run 2 graded by code

344. There are 370 records, and 26 are RESEARCH-source duplicates sharing an LEI with another record.

JSON: {"count": 344}

Why: count: expected 331, got 344

❌ R3 csv+padding run 3 graded by code

344. That is 370 rows less 26 RESEARCH duplicates of the same LEI.

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R3 csv+padding run 4 graded by code

331. There are 370 rows, of which 26 are same-LEI RESEARCH duplicates and 13 are QA-source test records; counting the QA records would give 344.

JSON: {"count": 331}

❌ R3 csv+padding run 5 graded by code

344. That is 370 records minus 26 duplicates that share an LEI with another record.

JSON: {"count": 344}

Why: count: expected 331, got 344

✅ R10 executed run 1 graded by code

331. After merging duplicate records into entities, entities.csv has 331 rows (16 in the E-/CV/VD block and 315 from E1001 to E1339).

JSON: {"count": 331}

✅ R10 executed run 2 graded by code

331. That is 16 entities from the E01-series plus CV and VD, plus 339 IDs in E1001–E1339 less 24 merged duplicates.

JSON: {"count": 331}

✅ R10 executed run 3 graded by code

331 entity rows in `entities.csv`. Merged duplicates are already collapsed into these rows.

JSON: {"count": 331}

✅ R10 executed run 4 graded by code

331. This is 331 rows in entities.csv, which already have duplicates merged. The count assumes the only gaps in the E1001 to E1339 numbering are the 24 merged records, so I did not check each remaining ID individually.

JSON: {"count": 331}

✅ R10 executed run 5 graded by code

331. This is the number of rows in entities.csv, after the duplicate records were merged.

JSON: {"count": 331}

✅ R7 csv+neutral run 1 graded by code

331. There are 370 records, less 13 QA records and 26 duplicate records sharing an LEI.

JSON: {"count": 331}

✅ R7 csv+neutral run 2 graded by code

331. There are 370 records; excluding 13 QA records and 26 duplicate research records leaves 331 entities. The sovereigns are included.

JSON: {"count": 331}

✅ R7 csv+neutral run 3 graded by code

331. There are 370 records; I removed 26 duplicate-LEI records and 13 QA records (E16 and E1340–E1351).

JSON: {"count": 331}

✅ R7 csv+neutral run 4 graded by code

331. That is 370 records minus 13 QA records, 2 duplicates among the E0x records (E03, E17) and 24 RESEARCH duplicates in the E10xx–E13xx range.

JSON: {"count": 331}

✅ R7 csv+neutral run 5 graded by code

331. That is 370 records less 26 duplicates (same LEI) and 13 QA records.

JSON: {"count": 331}

✅ R8 csv+axioms run 1 graded by code

331. That is 370 records, less 13 QA test records, less 26 same-LEI research duplicates.

JSON: {"count": 331}

✅ R8 csv+axioms run 2 graded by code

About 331. There are 370 records, minus 26 RESEARCH duplicates (same LEI) and 13 QA test records, and the two sovereigns are counted.

JSON: {"count": 331}

✅ 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. The two sovereigns have no LEI and count once each.

JSON: {"count": 331}

✅ R8 csv+axioms run 4 graded by code

331. There are 370 records, of which 13 are QA test records (E16 and E1340–E1351) and 26 are RESEARCH duplicates of RATINGS records (same LEI).

JSON: {"count": 331}

✅ R8 csv+axioms run 5 graded by code

331. I took the 370 entity rows, removed 13 QA test records and 26 RESEARCH rows that duplicate a RATINGS LEI, and kept the sovereigns.

JSON: {"count": 331}

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

331. There are 357 non-QA records, of which 26 are RESEARCH duplicates sharing an LEI with another record.

JSON: {"count": 331}

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

330. That is 369 records, less 13 QA records and 26 same-LEI duplicates.

JSON: {"count": 330}

Why: count: expected 331, got 330

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

331. Records are collapsed by LEI and QA test records are excluded; the sovereigns count as distinct entities.

JSON: {"count": 331}

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

331. Of the 370 records, I removed the 26 RESEARCH duplicates (same LEI) and the 13 QA test records.

JSON: {"count": 331}

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

331. There are 370 records, of which 13 are QA test data and 26 are RESEARCH duplicates sharing an LEI. The 2 sovereigns, which have no LEI, are counted as entities.

JSON: {"count": 331}