Files
MtoRagSystem/RETRIEX_PATCH_4_QUERY_SEARCHREPAIR_YAML_ONLY_README.md
2026-04-29 22:22:57 +02:00

2.5 KiB

RetrieX Patch 4: Query Enrichment and Search Repair YAML-only

This patch continues the YAML-as-source-of-truth migration.

Scope

Changed areas only:

  • src/Config/QueryEnricherConfig.php
  • src/Config/SearchRepairConfig.php
  • config/retriex/query_enrichment.yaml
  • config/retriex/search_repair.yaml
  • config/retriex/vocabulary.yaml
  • config/services.yaml

No retrieval scoring, PromptBuilder, ShopService matching, AgentRunner, SSE, or answer-generation behavior was intentionally changed.

QueryEnricherConfig

Removed the PHP fallback mapping DEFAULT_ENRICH_QUERY_LIST.

The existing values are now required in:

config/retriex/query_enrichment.yaml
parameters:
  retriex.query_enrichment.config:
    max_expansions: 4
    rules: ...

Missing, invalid, or empty YAML now fails closed via InvalidArgumentException instead of silently falling back to PHP defaults.

SearchRepairConfig

Removed PHP fallback constants and hardcoded fallback values for:

  • generic candidate tokens
  • accessory candidate terms
  • accessory/bundle terms
  • specificity boost terms
  • requested accessory-code behavior
  • model-candidate patterns
  • search-repair scoring values
  • normalization patterns
  • trim character set
  • product-key separator
  • top-product log limit

The active search-repair settings now live in:

config/retriex/search_repair.yaml

Vocabulary-backed search-repair term views remain in:

config/retriex/vocabulary.yaml
parameters:
  retriex.vocabulary.config:
    views:
      search_repair: ...

SearchRepairConfig now resolves term lists from explicit per-service YAML keys first, otherwise from the configured vocabulary view. If neither exists, it fails closed.

Validation performed in the artifact workspace

PHP syntax checks passed for:

php -l src/Config/QueryEnricherConfig.php
php -l src/Config/SearchRepairConfig.php
php -l src/Config/RetriexEffectiveConfigProvider.php

Full Symfony commands were not executed in this ZIP workspace because vendor/ is not included.

Recommended runtime checks after applying the patch:

php bin/console mto:agent:config:validate
php bin/console mto:agent:config:dump-effective --json
php bin/console mto:agent:config:audit-source --details
php bin/console mto:agent:regression:test

Regression focus:

  • Testomat 808 / 0,02 °dH
  • Indikatortyp 300 follow-up
  • Indikator price follow-up
  • welcher pockettester ist für Redox messung gutsuche im shop
  • product-selection shop fallback for free chlorine
  • SSE completion watchdog behavior