-
Notifications
You must be signed in to change notification settings - Fork 4
Development: Add action buttons in popover for recommendation system
#2520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ge94zec
wants to merge
44
commits into
main
Choose a base branch
from
feat/2348-add-action-buttons-in-popover-for-recommendation-system
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
76c5d6e
feat(ai): map translated compliance issues instead of re-analyzing ta…
ge94zec 9adc3e9
updated openapi
ge94zec 7946480
refactor: code
ge94zec 941bd88
feat: add interactive compliance suggestions
ge94zec 7433eeb
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 5579180
updates:
ge94zec 97f4653
Merge remote-tracking branch 'origin/chore/2346-enhance-performance-f…
ge94zec bd80f96
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 2d02039
updates:
ge94zec 23549fd
Merge remote-tracking branch 'origin/chore/2346-enhance-performance-f…
ge94zec 102ac7b
chore: update OpenAPI spec and generated client
github-actions[bot] b0c19fb
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 8d001be
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec ee463f7
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec b7e0862
change requests
ge94zec 11e553a
chore: update OpenAPI spec and generated client
github-actions[bot] 26f3cbd
updated client
ge94zec 702dd6c
added AiServiceTest for analyze and map
ge94zec 3aa2f39
Merge remote-tracking branch 'origin/main' into chore/2346-enhance-pe…
ge94zec b76eb11
Merge remote-tracking branch 'origin/main' into feat/2348-add-action-…
ge94zec dced024
\`Bugfix\`: Restore full entity graph on findByIdWithCompliance
az108 9f21677
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 630a36f
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec fedcb06
feat(compliance): apply AI suggestions to job description editor
ge94zec f09b600
Merge remote-tracking branch 'origin/main' into feat/2348-add-action-…
ge94zec 01a92c8
fix tests
ge94zec 589edd1
- make prompt robuster to find all issues at once
ge94zec 643223b
Merge branch 'main' into feat/2348-add-action-buttons-in-popover-for-…
ge94zec afe6710
prettier
ge94zec 8950a33
Merge remote-tracking branch 'origin' into feat/2348-add-action-butto…
ge94zec 0c89ea9
Merge branch 'main' into feat/2348-add-action-buttons-in-popover-for-…
ge94zec e25c8d8
Merge branch 'main' into feat/2348-add-action-buttons-in-popover-for-…
ge94zec ba210c9
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 37077aa
Fix compliance popover styling and scroll behavior
ge94zec bfd1434
fix merge conflict
ge94zec c47b7b7
Merge remote-tracking branch 'origin/main' into feat/2348-add-action-…
ge94zec a035c0d
Merge branch 'main' into chore/2346-enhance-performance-for-compliance
ge94zec 71a0b76
feat: replace second compliance analysis with snippet mapping for tra…
ge94zec 8820354
ffix server test
ge94zec e683867
Merge remote-tracking branch 'origin/chore/2346-enhance-performance-f…
ge94zec e9d0069
fix(compliance): preserve bilingual issue mapping across repeated ana…
ge94zec 39d10d0
lint fix
ge94zec 3c44084
prettier
ge94zec 00bb4ea
Merge branch 'main' into feat/2348-add-action-buttons-in-popover-for-…
ge94zec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
13 changes: 13 additions & 0 deletions
13
...ces/config/liquibase/changelog/00000000000042_add_suggestion_field_to_complianceIssue.xml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <databaseChangeLog | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
| xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"> | ||
|
|
||
| <changeSet id="042_add_suggestion_field_to_complianceIssue" author="melissa"> | ||
| <addColumn tableName="job_compliance_issues"> | ||
| <column name="suggestion" type="text"/> | ||
| </addColumn> | ||
| </changeSet> | ||
|
|
||
| </databaseChangeLog> |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,66 @@ | ||
| You are the TUMApply ComplianceReader, an advanced AI legal and compliance expert for academic job postings at a prestigious university. | ||
| Your core capability is "Contextual Compliance Detection" based on German and EU law. | ||
| You analyze the semantic intent and the exclusionary effect of sentences, not just keywords. | ||
| Your core capability is "Contextual Compliance Detection" based on German and EU law. You ignore typos and spelling errors. | ||
| you ONLY act on legal compliance violations. | ||
|
|
||
| TASK: | ||
| Deeply analyze the job posting for legal risks (AGG, DSGVO, WissZeitVG) based on German and EU law. | ||
| The input description language is: {descriptionLanguage}. | ||
| The explanation must be written in: {userLang}. | ||
| EXPLANATIONS must be written in: {userLang}. | ||
| SUGGESTIONS must be written in: {descriptionLanguage}. | ||
|
|
||
| STRICT ANALYSIS RULES: | ||
|
|
||
| 1. NO SUMMARIES: Every single violation must be a separate JSON object. | ||
| 2. ALWAYS deeply analyze for CONTEXTUAL and IMPLICIT Discrimination in context of a recruitment system. | ||
| If a text implies SUBTEXT and EXCLUSIONARY EFFECT, it is a violation | ||
| If a text implies SUBTEXT and EXCLUSIONARY EFFECT, even if they sound positive it is a violation. | ||
| If a phrase implies that a certain protected group (age, origin, disability or gender) would not "fit" the subtext of the description, it is a CRITICAL_AGG violation. | ||
| 3. MINIMAL SNIPPETS (NO OVERLAPS): Extract the ABSOLUTE MINIMUM amount of words needed to identify the violation. Never extract whole sentences if a phrase suffices. Two issues MUST NEVER have overlapping text snippets. | ||
| 4. SEAMLESS GRAMMAR: Suggestions must perfectly match the capitalization, punctuation, and grammatical case of the original text. Inserting the suggestion must not break the surrounding sentence. | ||
| ---------------------- | ||
| 3. CATEGORY CRITICAL_AGG: | ||
| CATEGORIES & ACTIONS: | ||
| 1. CRITICAL_AGG (action: REPLACE): | ||
| - Detect discrimination by protected characteristics under section 1 AGG. | ||
| - Detect exclusion based on disability, age, origin, or gender. | ||
| - JOB TITLE CHECK: If title "{title}" is not gender-neutral with "(m/f/d)" or "(m/w/d)", flag it. | ||
| - action: REPLACE | ||
| ---------------------- | ||
| 4. CATEGORY DSGVO_MINIMIZATION: | ||
| 2. DSGVO_MINIMIZATION (action: REMOVE): | ||
| - Scan for violations of Data Minimization (Art. 5 DSGVO). | ||
| - Detect for keyword that specifically ask for personal DATA (e.g., photos, ID copies, criminal records, marital status, religion) | ||
| - Detect for keyword that specifically ask for DATA (e.g., photos, ID copies, criminal records, marital status, religion) | ||
| - EXTERNAL LINK CHECK: Detect for external application forms or websites and flag them | ||
| - action: REMOVE | ||
| ---------------------- | ||
| 5. CATEGORY TRANSPARENCY: | ||
| 3. TRANSPARENCY (action: ADD): | ||
| - Detect mentions of THIRD PARTIES/TOOLS (Workday, Headhunter, Partner Uni, consortia) without stating that data is shared with them. | ||
| - If entire jobDescription does NOT contain a sentence clarifying that applicant data is shared with external recipients, flag detected mention | ||
| - NOT triggered by: When explicit DATA is requested from the applicant. | ||
| - action: Suggest to ADD a message that clarifies whether applicant data is shared with external recipients (Art. 13 DSGVO) | ||
| ---------------------- | ||
| 6. CATEGORY PUBLIC_SECTOR: (WissZeitVG) | ||
| - PhD Specific QUALIFICATION PURPOSE: For PhD/Academic positions, the text MUST semantically imply that the position serves scientific qualification (Wissenschaftliche Qualifizierung/Promotion). | ||
| - If the intent of individual research/promotion is missing, it is a violation. | ||
| - action: ADD | ||
| ---------------------- | ||
| - TRANSPARENCY SUGGESTION: suggestion must be a consent-based sentence like: By applying, you consent to your data being shared with "third party" for the purpose of the application process (Art. 13 DSGVO) | ||
| 4. PUBLIC_SECTOR (action: ADD): | ||
| - PhD Specific QUALIFICATION PURPOSE (WissZeitVG): For PhD/Academic positions, the text MUST semantically imply that the position serves scientific qualification (Wissenschaftliche Qualifizierung/Promotion). | ||
| - If the intent of individual research/promotion is missing, you must use an anchor text to attach your suggestion. Use the heading "Description" or "Beschreibung" as anchor. | ||
| ----------- | ||
| ----------- | ||
| INPUT TEXT: | ||
| {title} | ||
| {jobDescription} | ||
| ---------------------- | ||
|
|
||
| COMPLETENESS REQUIREMENT: | ||
| Before returning the JSON array, complete all five checks internally: | ||
| 1. Explicit discrimination | ||
| 2. Implicit AGG patterns | ||
| 3. DSGVO minimization violations | ||
| 4. Third-party transparency issues | ||
| 5. PhD/scientific qualification context | ||
| The final JSON array must reflect the result of all five checks. | ||
| Do not output the checklist, reasoning, summaries, or any field named completeness_requirement. | ||
|
|
||
| OUTPUT: | ||
| - Return ONLY a valid JSON array. No markdown. No prose. | ||
| - One object per issue | ||
| - Object fields must be exactly: | ||
| id, text, category, article, explanation, action | ||
| Return ONLY a valid JSON array. No markdown. No prose. | ||
| Object fields must be exactly: | ||
| id, text, category, article, explanation, action, suggestion | ||
| - category must be exactly CRITICAL_AGG, TRANSPARENCY, DSGVO_MINIMIZATION or PUBLIC_SECTOR | ||
| - article: the relevant legal article | ||
| - text: The exact, shortest possible substring from the input triggering the violation (plain text). | ||
| - explanation: A single, formal SHORT sentence stating the legal violation directly. Do not include subordinate clauses. Write for a very small UI popover. | ||
| - action must be exactly REPLACE or ADD or REMOVE. | ||
| - text: MAXIMUM 2-4 WORDS. Extract exact snippet from input text that uniquely identifies the violation (plain text, no HTML tags). | ||
| - explanation must be a single SHORT sentence stating the legal violation directly. Sound like a formal legal notice. | ||
| - If no issues exist, return exactly []. | ||
| - suggestion: The exact string to fix the issue | ||
| - For action is ADD: Return one concise sentence to append the text snippet as an grammatical continuation that starts exactly where the "text" snippet ends. | ||
| - For action is REPLACE: The exact safe alternative. Preserve the original meaning as far as legally possible. Match original capitalization exactly. | ||
| - For action is REMOVE: return an empty string "" | ||
| If no issues exist, return exactly []. |
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
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
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
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
14 changes: 11 additions & 3 deletions
14
...pp/shared/components/molecules/ai-compliance-popover/ai-compliance-popover.component.html
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| @if (issue()) { | ||
| <div | ||
| class="fixed z-50 w-72 rounded-md bg-background-default shadow-lg p-3 text-sm pointer-events-none text-xs" | ||
| class="fixed z-[1001] w-72" | ||
|
ge94zec marked this conversation as resolved.
Outdated
ge94zec marked this conversation as resolved.
Outdated
|
||
| [style.left.px]="x()" | ||
| [style.top.px]="y()" | ||
| (mouseenter)="hovered.emit(true)" | ||
| (mouseleave)="hovered.emit(false)" | ||
| > | ||
| <p class="m-0 font-semibold mb-1 text-text-tertiary">{{ issue()?.article }}</p> | ||
| <p class="m-0 text-text-secondary leading-relaxed">{{ issue()?.explanation }}</p> | ||
| <jhi-suggestion-system | ||
| [article]="issue()?.article" | ||
| [suggestion]="issue()?.suggestion" | ||
| [explanation]="issue()?.explanation" | ||
| [actionLabel]="actionButtonLabel()" | ||
| (accepted)="onAccept()" | ||
| (dismissed)="onDismiss()" | ||
| /> | ||
| </div> | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.