Territoria tracks elected officials across many elections. After every new vote, for most people in the database I need to update their mandate, merge duplicates, link them back to their previous record, and handle name changes: sometimes a completely new name, sometimes a new double surname when a woman marries. The official dataset is only published a month and a half after the election, so until then my clients have to update the database themselves from whatever they have: Facebook posts, PDFs, WhatsApp messages. How would you approach that?

One question decides the whole architecture: are you even allowed to send this data to AI APIs, given how sensitive political contact information is?

Yes, but privacy comes first. It has to run on European models, ideally Mistral.

Good: Mistral keeps the data in the EU, away from the big US providers. Build it as a pipeline with a human checkpoint at the end, never a direct write to the live database:

  • Extract. Send each source (Facebook post, PDF, WhatsApp export) to Mistral and get back a structured candidate record: name, role, mandate, dates, constituency. Messy data in, normalized data out.
  • Match. Fuzzy-match each candidate record against the existing people, using name, constituency, and previous mandate. Flag likely duplicates and name changes (especially the married-name and double-surname cases), and give every match a confidence score.
  • Validate. Nothing is written automatically. A review page proposes each change ("merge A into B", "update mandate", "rename"), shows the source snippet it came from, and a human confirms or corrects it before anything is saved.

The extraction handles the bulk of the work, the matching highlights the risky decisions, and the validation page keeps a human responsible for the sensitive data, exactly where you don't want an AI deciding alone.

That's exactly the structure I needed. The validation page is the part I was missing: the AI does most of the work, and my clients stay in control of what actually changes.

Send an email to Eliott

Eliott Baylot's curriculum vitae

Claude is an AI and can make does make mistakes. Please triple-check responses.