p43H
This commit is contained in:
@@ -260,50 +260,8 @@ parameters:
|
|||||||
- '/\b\d+\s+(?:[a-z0-9+\-]+\s+){0,3}(?:produkte|artikel|geräte|geraete|messgeräte|messgeraete)\b/u'
|
- '/\b\d+\s+(?:[a-z0-9+\-]+\s+){0,3}(?:produkte|artikel|geräte|geraete|messgeräte|messgeraete)\b/u'
|
||||||
- '/\b(?:insgesamt|gesamt|total)\b.{0,80}\b\d+\b/u'
|
- '/\b(?:insgesamt|gesamt|total)\b.{0,80}\b\d+\b/u'
|
||||||
- '/\b(?:sortiment|portfolio|lieferprogramm)\b.{0,120}\b(?:umfasst|enthält|enthaelt|besteht\s+aus|beinhaltet)\b.{0,80}\b\d+\b/u'
|
- '/\b(?:sortiment|portfolio|lieferprogramm)\b.{0,120}\b(?:umfasst|enthält|enthaelt|besteht\s+aus|beinhaltet)\b.{0,80}\b\d+\b/u'
|
||||||
synonyms:
|
vocabulary_maps:
|
||||||
salinität:
|
synonyms: agent.rag_evidence_guard.synonyms
|
||||||
- salinität
|
|
||||||
- salinitaet
|
|
||||||
- salinity
|
|
||||||
- salzgehalt
|
|
||||||
- tds
|
|
||||||
- leitfähigkeit
|
|
||||||
- leitfaehigkeit
|
|
||||||
salinitaet:
|
|
||||||
- salinität
|
|
||||||
- salinitaet
|
|
||||||
- salinity
|
|
||||||
- salzgehalt
|
|
||||||
- tds
|
|
||||||
- leitfähigkeit
|
|
||||||
- leitfaehigkeit
|
|
||||||
salinity:
|
|
||||||
- salinität
|
|
||||||
- salinitaet
|
|
||||||
- salinity
|
|
||||||
- salzgehalt
|
|
||||||
- tds
|
|
||||||
- leitfähigkeit
|
|
||||||
- leitfaehigkeit
|
|
||||||
redox:
|
|
||||||
- redox
|
|
||||||
- orp
|
|
||||||
- oxidations-reduktionspotential
|
|
||||||
- oxidations reduktionspotential
|
|
||||||
orp:
|
|
||||||
- redox
|
|
||||||
- orp
|
|
||||||
- oxidations-reduktionspotential
|
|
||||||
- oxidations reduktionspotential
|
|
||||||
ph:
|
|
||||||
- ph
|
|
||||||
- ph-wert
|
|
||||||
- ph wert
|
|
||||||
chlor:
|
|
||||||
- chlor
|
|
||||||
- freies chlor
|
|
||||||
- gesamtchlor
|
|
||||||
- chlorine
|
|
||||||
|
|
||||||
no_llm_fallback:
|
no_llm_fallback:
|
||||||
max_shop_results: 5
|
max_shop_results: 5
|
||||||
|
|||||||
@@ -667,6 +667,52 @@ parameters:
|
|||||||
- ph-indikatoren
|
- ph-indikatoren
|
||||||
- ph indikatoren
|
- ph indikatoren
|
||||||
maps:
|
maps:
|
||||||
|
agent:
|
||||||
|
rag_evidence_guard:
|
||||||
|
synonyms:
|
||||||
|
salinität:
|
||||||
|
- salinität
|
||||||
|
- salinitaet
|
||||||
|
- salinity
|
||||||
|
- salzgehalt
|
||||||
|
- tds
|
||||||
|
- leitfähigkeit
|
||||||
|
- leitfaehigkeit
|
||||||
|
salinitaet:
|
||||||
|
- salinität
|
||||||
|
- salinitaet
|
||||||
|
- salinity
|
||||||
|
- salzgehalt
|
||||||
|
- tds
|
||||||
|
- leitfähigkeit
|
||||||
|
- leitfaehigkeit
|
||||||
|
salinity:
|
||||||
|
- salinität
|
||||||
|
- salinitaet
|
||||||
|
- salinity
|
||||||
|
- salzgehalt
|
||||||
|
- tds
|
||||||
|
- leitfähigkeit
|
||||||
|
- leitfaehigkeit
|
||||||
|
redox:
|
||||||
|
- redox
|
||||||
|
- orp
|
||||||
|
- oxidations-reduktionspotential
|
||||||
|
- oxidations reduktionspotential
|
||||||
|
orp:
|
||||||
|
- redox
|
||||||
|
- orp
|
||||||
|
- oxidations-reduktionspotential
|
||||||
|
- oxidations reduktionspotential
|
||||||
|
ph:
|
||||||
|
- ph
|
||||||
|
- ph-wert
|
||||||
|
- ph wert
|
||||||
|
chlor:
|
||||||
|
- chlor
|
||||||
|
- freies chlor
|
||||||
|
- gesamtchlor
|
||||||
|
- chlorine
|
||||||
shop:
|
shop:
|
||||||
accessory_focus_variants:
|
accessory_focus_variants:
|
||||||
indikator:
|
indikator:
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# RetrieX Patch p43H - RAG Evidence Synonym Vocabulary Map
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
p43H reduziert weitere lokale Config-Duplikate, ohne fachliche Runtime-Logik, Prompt-Regeln, Retrieval oder Scoring zu ändern.
|
||||||
|
|
||||||
|
Der Patch verschiebt die Synonym-Map für `rag_evidence_guard` aus `agent.yaml` in die zentrale `vocabulary.yaml` und referenziert sie über einen konfigurierbaren Vocabulary-Map-Pfad.
|
||||||
|
|
||||||
|
## Änderungen
|
||||||
|
|
||||||
|
- `config/retriex/agent.yaml`
|
||||||
|
- lokale `rag_evidence_guard.synonyms` entfernt
|
||||||
|
- neue Referenz `rag_evidence_guard.vocabulary_maps.synonyms: agent.rag_evidence_guard.synonyms` ergänzt
|
||||||
|
|
||||||
|
- `config/retriex/vocabulary.yaml`
|
||||||
|
- neue zentrale Map `maps.agent.rag_evidence_guard.synonyms` ergänzt
|
||||||
|
- Werte entsprechen 1:1 der vorherigen lokalen Agent-Konfiguration
|
||||||
|
|
||||||
|
- `src/Config/AgentRunnerConfig.php`
|
||||||
|
- `getRagEvidenceSynonyms()` löst weiterhin lokale Overrides auf, falls `rag_evidence_guard.synonyms` vorhanden ist
|
||||||
|
- fehlt der lokale Override, wird die konfigurierte Vocabulary-Map verwendet
|
||||||
|
- neuer Helper `getConfiguredStringListMapOrVocabularyMap()` analog zu bestehenden Vocabulary-View-Fallbacks
|
||||||
|
|
||||||
|
## Nicht geändert
|
||||||
|
|
||||||
|
- keine neue Fachlogik
|
||||||
|
- keine Prompt-Regeländerung
|
||||||
|
- keine Retrievaländerung
|
||||||
|
- keine Scoringänderung
|
||||||
|
- keine Admin-UI
|
||||||
|
- keine neuen harten Listen im PHP-Core
|
||||||
|
|
||||||
|
## Kompatibilität
|
||||||
|
|
||||||
|
Lokale Overrides bleiben möglich: Wird `rag_evidence_guard.synonyms` in `agent.yaml` oder einer Tenant-/Override-Konfiguration gesetzt, bevorzugt `AgentRunnerConfig` weiterhin diese lokale Map.
|
||||||
|
|
||||||
|
## Effektive Werte
|
||||||
|
|
||||||
|
Die effektive Synonym-Map ist gegenüber p43G identisch geblieben:
|
||||||
|
|
||||||
|
- `salinität`
|
||||||
|
- `salinitaet`
|
||||||
|
- `salinity`
|
||||||
|
- `redox`
|
||||||
|
- `orp`
|
||||||
|
- `ph`
|
||||||
|
- `chlor`
|
||||||
|
|
||||||
|
Alle zugehörigen Synonymlisten wurden 1:1 übernommen.
|
||||||
|
|
||||||
|
## Lokal ausgeführte Checks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php -l src/Config/AgentRunnerConfig.php
|
||||||
|
php -l src/Config/SearchRepairConfig.php
|
||||||
|
php -l src/Config/PromptBuilderConfig.php
|
||||||
|
python3 YAML parse check for config/retriex/agent.yaml and config/retriex/vocabulary.yaml
|
||||||
|
python3 effective rag_evidence_guard.synonyms p43G vs p43H comparison
|
||||||
|
```
|
||||||
|
|
||||||
|
Ergebnis: grün.
|
||||||
|
|
||||||
|
## Nicht lokal ausführbare Checks
|
||||||
|
|
||||||
|
Die folgenden Checks konnten in dieser Umgebung nicht ausgeführt werden, weil der ZIP-Stand kein `vendor/` enthält und `bin/console` mit `Dependencies are missing. Try running "composer install".` abbricht:
|
||||||
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
|
||||||
|
Bitte nach Einspielen des Patch-ZIPs in der vollständigen Projektumgebung ausführen.
|
||||||
@@ -450,6 +450,35 @@ final class AgentRunnerConfig
|
|||||||
return $terms;
|
return $terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, string[]>
|
||||||
|
*/
|
||||||
|
private function getConfiguredStringListMapOrVocabularyMap(string $configPath, string $mapPathConfigPath): array
|
||||||
|
{
|
||||||
|
if ($this->optionalValue($configPath) !== null) {
|
||||||
|
return $this->getRequiredStringListMap($configPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->vocabulary === null) {
|
||||||
|
throw new \InvalidArgumentException(sprintf(
|
||||||
|
'RetrieX agent config path "%s" is missing and no vocabulary resolver is available.',
|
||||||
|
$configPath
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
$mapPath = $this->getRequiredString($mapPathConfigPath);
|
||||||
|
$terms = $this->vocabulary->map($mapPath, []);
|
||||||
|
|
||||||
|
if ($terms === []) {
|
||||||
|
throw new \InvalidArgumentException(sprintf(
|
||||||
|
'RetrieX agent vocabulary map "%s" resolved to an empty map.',
|
||||||
|
$mapPath
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $terms;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<int, array{label:string, prompt:string}>
|
* @return array<int, array{label:string, prompt:string}>
|
||||||
*/
|
*/
|
||||||
@@ -672,7 +701,10 @@ final class AgentRunnerConfig
|
|||||||
*/
|
*/
|
||||||
public function getRagEvidenceSynonyms(): array
|
public function getRagEvidenceSynonyms(): array
|
||||||
{
|
{
|
||||||
return $this->getRequiredStringListMap('rag_evidence_guard.synonyms');
|
return $this->getConfiguredStringListMapOrVocabularyMap(
|
||||||
|
'rag_evidence_guard.synonyms',
|
||||||
|
'rag_evidence_guard.vocabulary_maps.synonyms'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user