From 26fc9f7ad1973965b15f5f40002159d6ad3af077 Mon Sep 17 00:00:00 2001 From: team 1 Date: Thu, 30 Apr 2026 14:12:38 +0200 Subject: [PATCH] patch 6.1 --- RETRIEX_PATCH_6_1_AUDIT_GAP_CLEANUP_README.md | 31 ++++ config/retriex/agent.yaml | 1 + config/retriex/prompt.yaml | 65 +++++++++ config/retriex/retrieval.yaml | 133 ++++++++++++++++++ 4 files changed, 230 insertions(+) create mode 100644 RETRIEX_PATCH_6_1_AUDIT_GAP_CLEANUP_README.md diff --git a/RETRIEX_PATCH_6_1_AUDIT_GAP_CLEANUP_README.md b/RETRIEX_PATCH_6_1_AUDIT_GAP_CLEANUP_README.md new file mode 100644 index 0000000..9cbf281 --- /dev/null +++ b/RETRIEX_PATCH_6_1_AUDIT_GAP_CLEANUP_README.md @@ -0,0 +1,31 @@ +# RetrieX Patch 6.1 - Audit Gap Cleanup + +Scope: close the remaining config-source audit gaps that still reported `fallback_accessors_missing_yaml` after Patch 6. + +This patch intentionally does not remove PHP fallbacks yet and does not change runtime logic. It only adds the missing YAML keys with values copied 1:1 from the current PHP defaults so the following accessors have an explicit YAML source: + +- `AgentRunnerConfig::getOptimizedShopQueryTrimCharacters()` +- `NdjsonHybridRetrieverConfig` retrieval vocabulary lists +- `PromptBuilderConfig::getTechnicalProductKeywords()` +- `PromptBuilderConfig::getAccessoryRequestKeywords()` + +Changed files: + +- `config/retriex/agent.yaml` +- `config/retriex/retrieval.yaml` +- `config/retriex/prompt.yaml` + +Recommended checks after applying: + +```bash +php bin/console cache:clear +php bin/console mto:agent:config:validate +php bin/console mto:agent:config:audit-source --details +php bin/console mto:agent:regression:test +``` + +Expected audit improvement: + +- `fallback_accessors_missing_yaml` should drop from `12` to `0`. + +`constructor_defaults_without_yaml_mapping` may still remain and should be handled separately before strict validation is enabled. diff --git a/config/retriex/agent.yaml b/config/retriex/agent.yaml index 5ace0d5..82bb7f5 100644 --- a/config/retriex/agent.yaml +++ b/config/retriex/agent.yaml @@ -6,6 +6,7 @@ parameters: product_search_knowledge_chunk_limit: 6 advisory_product_search_knowledge_chunk_limit: 9 optimized_shop_query_prefix_pattern: '/^(?:keywords?|suchquery|search\s*query|query)\s*:\s*/iu' + optimized_shop_query_trim_characters: " \t\n\r\0\x0B\"'`" messages: empty_prompt: '❌ Empty prompt.' diff --git a/config/retriex/prompt.yaml b/config/retriex/prompt.yaml index d6e9f53..cbb2963 100644 --- a/config/retriex/prompt.yaml +++ b/config/retriex/prompt.yaml @@ -53,6 +53,71 @@ parameters: role_compatibility_label: Role compatibility with request role_incompatible_commercial_suppression_note: 'Commercial fields suppressed: this shop record is not a matching main-device result for the requested product role.' technical_product_keyword_match_threshold: 2 + technical_product_keywords: + - technisch + - technical + - produkt + - product + - gerät + - device + - modell + - model + - messprinzip + - measurement principle + - schnittstelle + - interface + - relais + - relay + - indikator + - indicator + - grenzwert + - threshold + - messbereich + - measurement range + - gemessen + - measured + - minimaler + - minimum + - resthärte + - resthaerte + - °dh + - dh + - spannung + - voltage + - strom + - current + - druck + - pressure + - temperatur + - temperature + - schutzart + - ip + - fehlercode + - error code + - wasserhärte + - hardness + - testomat + - chlor + - chlormessung + accessory_request_keywords: + - passend + - passende + - passendes + - zubehör + - zubehor + - dazu + - indikator + - indikatoren + - ph-indikator + - ph indikator + - ph-indikatoren + - ph indikatoren + - reagenz + - kit + - set + - zusatz + - ergänzung + - ergaenzung sections: system_label: SYSTEM user_question_label: USER QUESTION diff --git a/config/retriex/retrieval.yaml b/config/retriex/retrieval.yaml index 35c56c6..f50d5e3 100644 --- a/config/retriex/retrieval.yaml +++ b/config/retriex/retrieval.yaml @@ -26,6 +26,139 @@ parameters: focused_product_min_score: 10.0 focused_product_min_gap: 4.0 focused_product_max_chunks: 4 + generic_product_tokens: + - produkt + - produkte + - produktkarte + - titel + - geraet + - gerät + - messgeraet + - messgerät + - wasser + - haerte + - härte + - resthaerte + - resthärte + - analyse + - analysator + - automat + - online + - messung + - messen + - preis + - preise + - kosten + - info + - infos + - passend + - richtige + - richtiges + - geeignet + - geeignete + - welche + - welcher + - welches + - brauche + - suche + important_short_model_tokens: + - th + - tc + - tp + - tm + - ph + - rx + family_descriptor_tokens: + - evo + - eco + - self + - clean + - mini + - pro + - plus + - basic + - lab + - inline + - compact + - panel + - sc + looks_like_reagent_tokens: + - indikator + - reagenz + - reagens + - laborchemikalie + - chemikalie + - sicherheitsdatenblatt + - sdb + - msds + - ufi + - gebinde + - flasche + - ersatzteil + - zubehoer + - zubehör + - service set + - filtereinsatz + - kerzenfilter + - druckregler + looks_like_safety_docs: + - sicherheitsdatenblatt + - sdb + - msds + - gefahrenbewertung + - gefahrenpiktogramm + - signalwort + - lagerung + - transport + - clp + - kennzeichnung + - h290 + - pbt + - vpvb + looks_like_reagent_words: + - indikator + - reagenz + - reagens + - chemie + - chemikalie + - sdb + - sicherheitsdatenblatt + - msds + - flasche + - gebinde + looks_like_document_words: + - datenblatt + - dokument + - pdf + - handbuch + - manual + - beschreibung + - sdb + - sicherheitsdatenblatt + - msds + looks_like_safety_words: + - gefahr + - gefahrgut + - clp + - h290 + - sicherheit + - kennzeichnung + - transport + - lagerung + - piktogramm + looks_like_device_words: + - geraet + - gerät + - messgeraet + - messgerät + - analysator + - automat + - messung + - messen + - ueberwachung + - überwachung + - online + - monitor # Vocabulary-backed retrieval token lists live in config/retriex/vocabulary.yaml. # The old per-key entries may still be added here to override a specific view.