← The work// case study

Gemeente Medemblik: an AI HR assistant in Youforce, built from 245,000 emails

Years of HR email, turned into a reviewed knowledge base that the municipality's own Youforce assistant can search.

Gemeente Medemblik's HR team answered the same questions by email for years. I mined 245,000 messages with AI, with personal data stripped before any AI saw them and nothing used for model training. HR reviewed every answer, and the result became 127 Word documents with access per audience that now feed the Youforce HR assistant.

Government / HR

Microsoft Graph, Claude, Python, Google Sheets, Word, Visma Youforce

245k emails > 737 reviewed answers in 127 documents, live in Youforce

The problem

Every HR team has a second handbook, and it lives in the mailbox.

At Gemeente Medemblik that mailbox held years of questions from colleagues. Can I take a bridge day? How does travel reimbursement work? Who signs my employer's statement? HR answered them one by one, and often the answer was already sitting in a mail from two years ago.

The municipality uses Visma Youforce, and Youforce has an HR assistant: a chatbot inside the app employees already open. The chatbot already existed. The work was deciding what to feed it, so it gives the right answer, and only to the right people.

What I built

Privacy first: before any AI touches a single email

An HR mailbox is full of the most sensitive data a municipality has: health, salaries, personal situations. So the order of steps was fixed before I wrote a line of code.

1. Mining the mailbox. With that in place, I pulled roughly 245,000 messages from the HR mailboxes. Claude went through the anonymised threads looking for one thing: questions that keep coming back, with the answer HR gave. That produced 1,271 candidate question-and-answer pairs.

2. Letting HR be the judge. AI is good at finding patterns in a mailbox. It is not good at knowing which rule changed last year. So every answer went into a shared review sheet, and seven people from HR marked each one: correct, corrected, leave out, or park.

Of the answers HR judged, about 7 in 10 needed a correction or were outdated. A chatbot trained straight on the mailbox would have been confidently wrong most of the time.

I also looked at how often each question was asked. A long tail of one-off questions goes to a central HR address instead of the bot. That cut the remaining review work from more than 600 rows to around 135.

3. Writing for the assistant. The Youforce assistant searches per document, uses the file name as the topic, and pulls a few text fragments per context. So the answers had to be split into many small files.

A Python script builds one Word document per theme and per audience. 737 reviewed answers ended up in 127 documents: 80 for everyone, 20 for HR, 21 for HR and managers, 6 for administrators. A theme gets split when the audience differs, because access is set per file. Duplicates were merged, since every duplicate wastes a retrieval slot.

4. Two contexts. The CAO and the staff handbook sit in their own context, so the short themed documents don't push them out of the results. The assistant pulls fragments from the reviewed documents and from the CAO and handbook at the same time, six fragments instead of three. Answers got noticeably more complete. Ask about bridge days and you now also get the salary rule from the handbook.

5. A safe fallback. When the assistant doesn't know, it shows the central HR address as a clickable link instead of guessing.

I tested all of it in a separate test assistant in the Youforce sandbox, with debug output on and a small parser that shows exactly which fragments were retrieved for each question.

The result

What else this pattern can do

The pattern works well beyond a municipality, because your mailbox already knows your FAQ. Any team that answers the same questions by email can do this.

Most of the work is deciding what goes in, having people check it, and writing it so the assistant can find it.

Is it safe to use AI on an HR mailbox?

Only with the right order of steps. Raw mail stays in local storage, personal data (names, contact details, BSN numbers, IBANs) is stripped before any AI sees it, and the analysis runs through a commercial AI API where data is not used for model training. The output contains no personal data, and nothing goes live without human review.

Is our data used to train AI models?

No. The analysis used the commercial Claude API, where customer data is not used to train models. Consumer chat tools were not used at any point.

Can you connect your own knowledge to the Youforce HR assistant?

Yes. The Youforce assistant can search documents you upload, with access set per document. The quality of the answers depends almost entirely on how those documents are structured: one theme per document, a clear file name, and separate contexts for long sources like a CAO.

Why not train a chatbot straight on the mailbox?

Because mailboxes are full of outdated answers. At Medemblik about 7 in 10 answers needed a correction. Unreviewed AI would have repeated old rules with full confidence.

Who maintains the knowledge base?

HR does. Every answer lives in an editable Word document, so a change is an edit and an upload, not a developer ticket.

Recognise your own operation in this?

Book a call
© 2026 QuikCode · software for better operations