This commit is contained in:
team 1
2026-05-06 08:53:49 +02:00
parent 931af8b098
commit 130738e63b
8 changed files with 504 additions and 145 deletions

View File

@@ -0,0 +1,86 @@
# RetrieX Patch 43O - Prompt Measurement Evidence Vocabulary Maps
## Goal
Continue the p43 YAML/list/map consolidation with a larger but still behavior-preserving config-structure patch.
This patch centralizes prompt measurement-evidence term lists in `vocabulary.yaml` while keeping prompt rules, labels, answer templates and parameter definitions in `prompt.yaml`.
## Scope
Changed files:
- `config/retriex/prompt.yaml`
- `config/retriex/vocabulary.yaml`
- `src/Config/PromptBuilderConfig.php`
- `patch_history/RETRIEX_PATCH_43O_PROMPT_MEASUREMENT_EVIDENCE_VOCABULARY_MAPS_README.md`
## Changes
- Moved `measurement_evidence_guard.accessory_lookup_guard_terms` from `prompt.yaml` into vocabulary view:
- `prompt.measurement_evidence_guard.accessory_lookup_guard_terms`
- Moved `measurement_evidence_guard.accessory_lookup_passthrough_terms` from `prompt.yaml` into vocabulary view:
- `prompt.measurement_evidence_guard.accessory_lookup_passthrough_terms`
- Moved per-parameter `request_terms`, `positive_terms`, and `non_equivalent_terms` from `prompt.yaml` into vocabulary maps:
- `prompt.measurement_evidence_guard.request_terms`
- `prompt.measurement_evidence_guard.positive_terms`
- `prompt.measurement_evidence_guard.non_equivalent_terms`
- Added `measurement_evidence_guard.vocabulary_views` and `measurement_evidence_guard.vocabulary_maps` references in `prompt.yaml`.
- Added `PromptBuilderConfig` vocabulary-map resolving for measurement-evidence parameters.
- Kept local per-parameter list overrides supported: if a parameter defines `request_terms`, `positive_terms`, or `non_equivalent_terms` locally, that local list still wins.
## Non-goals
This patch intentionally does not change:
- Fachlogik / runtime product-selection behavior
- Scoring
- Retrieval
- Prompt rules
- Prompt wording
- Admin UI
- PHP-core hardcoded fachliche Listen
## Effective-value validation
The effective measurement-evidence output was compared against the p43N base and remained identical:
- accessory lookup guard terms: 7 / identical
- accessory lookup passthrough terms: 9 / identical
- measurement evidence parameters: 3 / identical
- `ph`: request 5, positive 4, non-equivalent 7
- `redox`: request 4, positive 4, non-equivalent 0
- `free_chlorine`: request 4, positive 4, non-equivalent 3
## Local checks run
```bash
php -l src/Config/PromptBuilderConfig.php
php -l src/Config/DomainVocabularyConfig.php
php -l src/Config/AgentRunnerConfig.php
php -l src/Config/SearchRepairConfig.php
php -l src/Config/GovernanceConfig.php
php -l src/Config/LanguageCleanupConfig.php
python3 YAML parse check for config/retriex/*.yaml
python3 effective p43N-vs-p43O prompt measurement evidence comparison
php PromptBuilderConfig vocabulary resolver check
```
All checks above passed.
## Console checks
The Symfony console checks could not be executed in this artifact environment because the uploaded ZIP does not contain `vendor/`:
```text
PHP Fatal error: Uncaught LogicException: Dependencies are missing. Try running "composer install".
```
Please run in the project environment:
```bash
bin/console mto:agent:config:validate
bin/console mto:agent:regression:test
bin/console mto:agent:config:audit-source --details
bin/console mto:agent:config:audit-patterns --details
```

View File

@@ -0,0 +1,65 @@
# RetrieX Patch 43P - Prompt Measurement Evidence Duplicate Warning Cleanup
## Ziel
Beseitigt die drei Config-Validation-Warnings aus p43O, ohne fachliche Runtime-Logik, Scoring, Retrieval oder Prompt-Regeln zu ändern.
## Hintergrund
p43O hat Measurement-Evidence-Terme aus `prompt.yaml` nach `vocabulary.yaml` verschoben. Dabei wurden bestehende, normalisiert doppelte pH-Schreibweisen bewusst 1:1 mitgenommen. Die Config-Validation meldet diese Duplikate nun an den zentralen Vocabulary-Maps:
- `vocabulary.maps.prompt.measurement_evidence_guard.request_terms.ph` enthält doppelt normalisiert `pH`
- `vocabulary.maps.prompt.measurement_evidence_guard.request_terms.ph` enthält doppelt normalisiert `ph-wert`
- `vocabulary.maps.prompt.measurement_evidence_guard.positive_terms.ph` enthält doppelt normalisiert `ph-wert`
## Änderungen
Geändert wurde nur `config/retriex/vocabulary.yaml`:
- `request_terms.ph`
- entfernt: `pH`
- entfernt: `pH-Wert`
- behalten: `ph`, `ph-wert`, `ph wert`
- `positive_terms.ph`
- entfernt: `ph-wert`
- behalten: `pH`, `pH-Wert`, `ph wert`
## Nicht geändert
- keine PHP-Codeänderung
- keine neue Fachlogik
- keine Scoringänderung
- keine Retrievaländerung
- keine Prompt-Regeländerung
- keine Admin-UI
- keine neuen harten Listen im PHP-Core
## Erwartetes Verhalten
Die pH-Erkennung bleibt durch normalisierte, case-insensitive Matching-Logik erhalten. Entfernt wurden nur normalisiert redundante Schreibweisen.
## Lokale Prüfungen
In der Artefakt-Umgebung geprüft:
```bash
php -l src/Config/PromptBuilderConfig.php
php -l src/Config/DomainVocabularyConfig.php
php -l src/Config/AgentRunnerConfig.php
php -l src/Config/SearchRepairConfig.php
php -l src/Config/GovernanceConfig.php
php -l src/Config/LanguageCleanupConfig.php
python3 YAML parse check for config/retriex/*.yaml
python3 duplicate check for prompt.measurement_evidence_guard pH term maps
zip -T retriex_p43p_prompt_measurement_evidence_duplicate_warning_cleanup_patch_only.zip
```
Die Symfony-Console-Checks konnten lokal nicht ausgeführt werden, weil der ZIP-Stand kein `vendor/` enthält und `bin/console` mit fehlenden Dependencies abbricht. Bitte wie üblich im Projekt ausführen:
```bash
bin/console c:cl
bin/console mto:agent:config:validate
bin/console mto:agent:regression:test
bin/console mto:agent:config:audit-source --details
bin/console mto:agent:config:audit-patterns --details
```

View File

@@ -0,0 +1,100 @@
# RetrieX Patch 43Q - Agent Term Vocabulary View Consolidation
## Ziel
p43Q reduziert weitere lokale Agent-Termlisten und verschiebt sie in zentrale Vocabulary-Views, ohne fachliche Runtime-Logik, Scoring, Retrieval oder Prompt-Regeln zu ändern.
Der Patch setzt auf dem grünen p43P-Stand auf.
## Änderungen
### `config/retriex/agent.yaml`
Folgende lokale Listen wurden entfernt und durch `vocabulary_views` ersetzt:
- `follow_up_context.commercial_table_follow_up.table_terms`
- `no_llm_fallback.product_roles.main_device_request_keywords`
- `no_llm_fallback.product_roles.accessory_product_keywords`
- `shop_prompt.current_input_preservation.terms`
- `shop_prompt.context_anchor_enrichment.trigger_terms`
Lokale Overrides bleiben möglich: Wird die ursprüngliche lokale Liste wieder gesetzt, bevorzugt der Config-Accessor diese Liste vor der Vocabulary-View.
### `config/retriex/vocabulary.yaml`
Neue zentrale Klassen:
- `agent_follow_up_commercial_table_terms`
- `agent_no_llm_main_device_request_keywords`
- `agent_no_llm_accessory_product_keywords`
- `agent_shop_current_input_preservation_terms`
- `agent_shop_context_anchor_trigger_terms`
Neue Views:
- `agent.follow_up_context.commercial_table_follow_up.table_terms`
- `agent.no_llm_fallback.product_roles.main_device_request_keywords`
- `agent.no_llm_fallback.product_roles.accessory_product_keywords`
- `agent.shop_prompt.current_input_preservation_terms`
- `agent.shop_prompt.context_anchor_enrichment.trigger_terms`
### `src/Config/AgentRunnerConfig.php`
Die betroffenen Accessors nutzen nun `getConfiguredStringListOrVocabularyView()`:
- `getCommercialTableFollowUpTableTerms()`
- `getNoLlmMainDeviceRequestRoleKeywords()`
- `getNoLlmAccessoryProductRoleKeywords()`
- `getShopQueryCurrentInputPreservationTerms()`
- `getShopQueryContextAnchorEnrichmentTriggerTerms()`
## Effektive Werte
Die effektiven Listen bleiben gegenüber p43P identisch:
- `commercial_table_terms`: 6 / 6
- `no_llm_main_device_request_keywords`: 16 / 16
- `no_llm_accessory_product_keywords`: 28 / 28
- `current_input_preservation_terms`: 7 / 7
- `context_anchor_trigger_terms`: 9 / 9
## Nicht geändert
- keine neue Fachlogik
- keine Scoringänderung
- keine Retrievaländerung
- keine Prompt-Regeländerung
- keine Admin-UI
- keine neuen harten fachlichen Listen im PHP-Core
## Lokale Prüfungen
Ausgeführt:
```bash
php -l src/Config/AgentRunnerConfig.php
php -l src/Config/DomainVocabularyConfig.php
php -l src/Config/SearchRepairConfig.php
php -l src/Config/PromptBuilderConfig.php
php -l src/Config/GovernanceConfig.php
php -l src/Config/LanguageCleanupConfig.php
python3 YAML parse check for config/retriex/*.yaml
python3 effective p43P-vs-p43Q agent list comparison
zip -T retriex_p43q_agent_term_vocabulary_view_consolidation_patch_only.zip
```
Ergebnis: grün.
## Nicht lokal ausführbar
Die Symfony-Console-Checks konnten in der lokalen Artefaktumgebung nicht ausgeführt werden, weil der ZIP-Stand kein `vendor/` enthält und `bin/console` mit fehlenden Dependencies abbricht.
Bitte nach Einspielen wie gewohnt prüfen:
```bash
bin/console c:cl
bin/console mto:agent:config:validate
bin/console mto:agent:regression:test
bin/console mto:agent:config:audit-source --details
bin/console mto:agent:config:audit-patterns --details
```