feat(rag): language-aware EUR-Lex source links on regulation citations (#424 phase 1)#429
Merged
Merged
Conversation
#424 p1) dora regulation citations now carry the official EUR-Lex source URL, in the user's language (the regulation is published verbatim in all EU languages), so a french user gets a french answer plus a link to the official french dora text — without us translating the regulation ourselves. - complianceKbRetriever: build the eur-lex CELEX url per regulation, language-aware (DORA -> 32022R2554; DORA-RTS spans several acts -> no link, better than a wrong one) - thread the UI locale through the rag request (controller -> executor -> service -> retriever); frontend sends i18n.language on /rag/stream - the frontend SourceCitations already renders source.url as an external link - unit tests for the url builder + updated the call-args assertion phase 2 (full french KB text for same-language snippets) needs the official EUR-Lex french content (data task, to be provided).
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 de #424. Résout « sources listées » + le FR pragmatique, sans traduire le règlement nous-mêmes.
Ce qui change
Les citations réglementaires portent maintenant l'URL source officielle EUR-Lex, dans la langue de l'utilisateur :
https://eur-lex.europa.eu/legal-content/{FR|EN}/TXT/?uri=CELEX:32022R2554→ un utilisateur FR a une réponse en français (déjà le cas) + un lien vers le DORA officiel en français.
Implémentation
complianceKbRetriever: construit l'URL EUR-Lex par régulation, langue-aware. DORA → CELEX 32022R2554 ; DORA-RTS → pas de lien (plusieurs actes délégués, pas de CELEX unique fiable — mieux que de mentir)./rag/streambody → controller → executor → service → retriever. Le front envoiei18n.language.SourceCitationsaffiche déjàsource.urlen lien externe → rien à changer côté affichage.Validation
next build✓ · lint clean.Reste — Phase 2 (#424)
Le vrai KB français (texte verbatim → extraits de sources en français + récupération same-language) nécessite le contenu officiel EUR-Lex FR — que tu fourniras. L'infra (threading locale, lien langue-aware) est posée ici.