harden history find tokens and shops earch

This commit is contained in:
team 1
2026-04-26 19:59:31 +02:00
parent ff273ff9a0
commit 308e980b4a
11 changed files with 1230 additions and 75 deletions

View File

@@ -0,0 +1,34 @@
# RetrieX Shop Query Context Fallback Hotfix
Patch-only hotfix for meta shop follow-ups such as `suche im shop`.
## Problem
After several shop meta follow-ups, the previous non-meta product/advisory question could fall outside the small context fallback window. The guard then correctly rejected `shop` as a query, but failed to derive a compact query from the last real topic.
## Fix
- Keep the language-preservation and meta-query guard behavior.
- Increase the configurable fallback question window.
- Add a separate configurable extended history budget for meta shop fallbacks.
- If the normal commerce history does not provide a concrete query, scan a larger recent history window for the last non-meta user question.
- Still compact the question into product/search tokens before sending it to Shopware.
## Expected example
`mit welchem testomat kann ich freies chlor messen` followed by `suche im shop` should resolve to a compact query such as:
```text
testomat freies chlor
```
It must not send:
```text
shop
mit welchem testomat kann ich freies chlor messen
```
## Scope
No retrieval, vector, scoring, prompt-answering, product-family special case, Testomat-specific hardcoding or Shopware API changes.