2026
Sole developer · Prototype · public repository · 2026
Bilingual HR Policy Retrieval Agent
An English and French HR policy prototype that cites the passage behind each answer and hands conflicting or unclear cases to a person.

Background
HR questions can touch company policy and Quebec labour law, in English or French. An answer with no source can mislead, so the agent shows its evidence or stops.
A question in English or French
Route the question
→ person if sensitive · out of scope: refused
Search the policies
Check the sources
→ person if sources disagree
Draft and audit
→ person if not compliant after 3 tries
Translate back
tags dropped: cited draft, untranslated
Confidence check
→ person below 0.72–0.95, highest if sensitive
✓Answer with sources
When sources disagree, a person decides
When the retrieved sources contradict each other, the agent doesn’t pick one. It names both and sends the question to a person.
Search finds both exact terms and passages with a similar meaning.
Python · Streamlit · BM25 · Vector Search · Reciprocal-Rank Fusion · Gemini · pytest
Where it stands
Each answer shows its sources or the reason it went to a person; the code checks that a draft cites a source, not that every statement does. On the 36 test cases I wrote, every question ended the way the test expected.
Built as a prototype, not deployed HR software. The 36 cases ran once against Google’s model APIs and aren’t an independent evaluation. If translating an answer back to French drops its citations, the agent returns the cited English draft and skips the confidence check.
36 test cases I wrote · one run · March 19, 2026
36 test cases · one run · March 19, 2026
| Expected outcome | Base | Paraphrased | Reasoning | Ended as expected |
|---|---|---|---|---|
| Answer with sources | 6 | 6 | 4 | 16 of 16 |
| Hand to a person | 5 | 5 | 2 | 12 of 12 |
| Sources disagree: hand to a person | 2 | 2 | – | 4 of 4 |
| Refuse: outside HR policy | 2 | 2 | – | 4 of 4 |
- Answer with sources16 of 16
- Hand to a person12 of 12
- Sources disagree: hand to a person4 of 4
- Refuse: outside HR policy4 of 4
Intent was routed correctly in all 36, and every answer that needed a citation had one. The only failed check was about wording: a French probation question was correctly sent to a person, but the message lacked a phrase the test looked for, in both the base and paraphrased sets.
The one failed check was wording: a French hand-off message lacked a phrase the test looked for.