proposal: source string in eu_journal CSVs

Open
#5,654 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
python

Research direction

Start by reviewing the eu_journal extraction script and the linked eu-journal-check-values-in-source comparison. The proposal discusses storing raw source strings in CSV cells and adding deterministic and LLM-assisted validation, but does not identify files or settle the desired implementation; confirm scope and acceptance criteria before coding.

Written by the indexing model from the issue text.

Description

zavod

It's a bit painful to review the eu_journal agent PRs.

it could be cool to try requiring the eu journal extraction script to include the raw string used to extract any given entity in a csv cell.

That chunks the validation to a size that's more manageable for a human. It also enables some fairly nice automated validation:

  • python script checks if source string exists verbatim in the source as a whole (does this get broken by consolidation edits?)
  • python script checks if each value in the csv is contained in that string, llm explains any differences, e.g. paragraph breaks dropped from reason string
  • llm checks if each value in the source is extracted to some column in the csv.

Much simpler implementation of the "is everything in the CSV also in the source" direction is in https://github.com/opensanctions/opensanctions/compare/eu-journal-check-values-in-source?expand=1 - the LLM could explain the discrepancies very nicely. We could instruct the crawler to run it on any modified files and comment on discrepancies in the PR.

It was a bit slow at then looking at the source and checking whether everything's been captured in the CSV.

The suggestion of capturing source string is just to try and do the deterministic stuff deterministically, and keep keep llm jobs small.

Is this something we want?

Dominant language
Python
Stars
810
Forks
187
Avg merge
1d 7h
Merged PRs (30d)
133

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from opensanctions/opensanctions

All issues in opensanctions/opensanctions

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.