1.5 KiB
1.5 KiB
RetrieX Shop Query Context Anchor Fix
Patch-only fix for referential shop follow-up questions such as:
was kostet der indikatorwas kostet das reagenzsuche im shopafter a prior product/parameter question
Problem
The shop query optimizer could reduce a referential price follow-up to a too generic query, for example:
indikator
Even when the previous RAG answer contained a precise anchor such as:
Indikatortyp 300
The shop result could still be correct by chance, but the query was less robust than the previously confirmed stable behavior.
Fix
The optimized query is now enriched generically from recent conversation context when all conditions match:
- the optimized shop query is short/generic,
- the current prompt/query contains a configured accessory/reagent trigger term,
- the recent context contains a configured type/code anchor such as
Indikatortyp 300.
Expected example:
indikator + history anchor Indikatortyp 300
=> indikatortyp 300 indikator
Design constraints
- No Retriever changes.
- No vector/scoring changes.
- No Testomat-808/Testomat-2000/Tritromat special case.
- Product/type/code detection is configurable in
config/retriex/agent.yaml. - PHP defaults remain as fallback.
Files
config/retriex/agent.yamlsrc/Agent/AgentRunner.phpsrc/Config/AgentRunnerConfig.phpsrc/Config/RetriexEffectiveConfigProvider.php
After applying
Run:
php bin/console cache:clear
php bin/console mto:agent:config:validate
php bin/console mto:agent:regression:test