[midPoint-git] [Evolveum/midpoint] 24412c: Smart Integration: Add useAiService flag to contro...
Michal Zelenčík
noreply at github.com
Wed Feb 4 18:02:00 CET 2026
Branch: refs/heads/feature/heuristic-mappings
Home: https://github.com/Evolveum/midpoint
Commit: 24412c022fe8f0e10ce109ba90b401163df2dfd0
https://github.com/Evolveum/midpoint/commit/24412c022fe8f0e10ce109ba90b401163df2dfd0
Author: Michal Zelencik <michal.zelencik at evolveum.com>
Date: 2026-02-03 (Tue, 03 Feb 2026)
Changed paths:
M model/smart-api/src/main/java/com/evolveum/midpoint/smart/api/SmartIntegrationService.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingSuggestionOperationFactory.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingsSuggestionOperation.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/SmartIntegrationServiceImpl.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/activities/MappingsSuggestionRemoteServiceCallActivityRun.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestMappingsSuggestionOperation.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestSmartIntegrationServiceImpl.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestSystemMappingsSuggestion.java
Log Message:
-----------
Smart Integration: Add useAiService flag to control LLM mapping suggestion calls
This commit introduces a new `useAiService` parameter to the mapping
suggestion workflow, allowing callers to control whether AI/LLM services
should be invoked when suggesting attribute mappings.
- Enable selective use of AI services for mapping suggestions
- When useAiService=false, the system skips LLM calls and generates
asIs mappings based on quality assessment
- All existing callers updated to pass useAiService=true to maintain
current behavior
- Simplified MappingsSuggestionOperation.init() signature by
introducing TypeOperationContext parameter object
- Reduced parameter count from 11 to 6 for better maintainability
- Aligned with CorrelationSuggestionOperation pattern for consistency
- Updated all test cases to use new TypeOperationContext pattern
Signed-off-by: Michal Zelencik <michal.zelencik at evolveum.com>
Commit: 73a8f98a4073942c6ead57ac9b7562ee805c87cf
https://github.com/Evolveum/midpoint/commit/73a8f98a4073942c6ead57ac9b7562ee805c87cf
Author: Michal Zelencik <michal.zelencik at evolveum.com>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingSuggestionOperationFactory.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingsSuggestionOperation.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/AbstractHeuristicMapping.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/FirstWordHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/HeuristicMapping.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/HeuristicMappingManager.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/HeuristicResult.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/LastWordHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/RemoveWhitespaceHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/StripDiacriticsHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/ToLowerCaseHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/ToUpperCaseHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/TrimAndLowerCaseHeuristic.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/heuristics/TrimHeuristic.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestMappingsSuggestionOperation.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestSystemMappingsSuggestion.java
Log Message:
-----------
Smart Integration: Add heuristic-based mapping suggestions for attribute transformations
Implement a heuristic system that suggests mappings based on common
transformation patterns, serving as a fallback when AI is unavailable
or produces lower quality results.
Key changes:
- Add HeuristicMappingManager to coordinate heuristic evaluation
- Implement 8 common transformation heuristics (trim, case conversion,
word extraction, whitespace removal, combinations)
- Integrate heuristics into MappingsSuggestionOperation with quality
comparison logic
- Add comprehensive test coverage for heuristic selection and
preference over AI when quality is better
The system evaluates sample data against each heuristic and selects
the one with perfect accuracy if available, providing reliable
suggestions even without AI connectivity.
Signed-off-by: Michal Zelencik <michal.zelencik at evolveum.com>
Commit: 21c814b6b8c149332b9ee4e6f881a21c0b43688d
https://github.com/Evolveum/midpoint/commit/21c814b6b8c149332b9ee4e6f881a21c0b43688d
Author: Michal Zelencik <michal.zelencik at evolveum.com>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingsSuggestionOperation.java
Log Message:
-----------
Smart Integration: Refactor mapping evaluation logic into smaller methods
Extract complex mapping evaluation logic from monolithic method into
focused, single-responsibility methods:
- evaluateMappingStrategy(): orchestrates overall evaluation strategy
- findBestMappingExpression(): compares as-is, heuristic, and AI options
- evaluateAiMappingWithRetry(): handles AI mapping with retry logic
- validateQualityThreshold(): validates quality against threshold
Introduce MappingEvaluationResult record to encapsulate evaluation
results (expression, quality, provenance).
Simplify provenance marking logic using ternary operator instead of
if-else blocks.
Signed-off-by: Michal Zelencik <michal.zelencik at evolveum.com>
Compare: https://github.com/Evolveum/midpoint/compare/24412c022fe8%5E...21c814b6b8c1
To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/midpoint/settings/notifications
More information about the midPoint-svn
mailing list