1.7 KiB
RetrieX Measurement Evidence Guard Fix
This patch tightens technical product-selection answers for measurement-parameter questions.
Problem
The LLM could still merge similar water-treatment terms, for example treating p-Wert as pH-Wert, and then generate unsupported measurement ranges, application areas or recommendations.
Change
The patch adds a generated MEASUREMENT PARAMETER EVIDENCE CHECK block to the final prompt when the user asks for configured measurement parameters such as pH, Redox/ORP or free chlorine.
For each relevant question, the PromptBuilder now:
- detects the requested measurement parameter from configurable YAML terms,
- scans RAG/URL context and each shop product record for explicit positive evidence,
- marks every shop record with a same-record evidence line,
- tells the model not to recommend a product when no explicit evidence exists,
- explicitly treats similar but non-equivalent terms such as
p-Wert,m-Wert,minus m-Wert,mmol/land alkalinity as insufficient for pH suitability.
Files changed
src/Agent/PromptBuilder.phpsrc/Config/PromptBuilderConfig.phpconfig/retriex/prompt.yaml
Intended behavior
For suche einen testomat der ph messen kann, if the provided RAG/shop records only contain p-Wert or related alkalinity values but no explicit pH / pH-Wert evidence in the same record, the answer should start with uncertainty, for example:
Ich finde in den bereitgestellten Quellen keinen sicher belegten Testomat fuer pH-Messung.
It may still list shop hits as commercial/search hits, but not as verified pH-suitable devices.
Scope
This patch does not touch retrieval, scoring, shop search, AgentRunner, SSE or LLM settings.