Fresh-food supplier claims: retrieval for document comparison

Review retrieval for document comparison in Fresh-food supplier claims. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

Fresh-food supplier claims pursue responsibility for quality at arrival. They do not handle natural in-store shrinkage or near-expiry markdown, which follow a different responsibility basis. The working materials are quality exception sheets, photo evidence, deduction notices and claim reconciliation statements. These come from the quality inspection system, WMS acceptance records, supplier contracts and finance reconciliation.

Each batch of acceptance produces a new quality exception sheet and photos. Monthly processing produces deduction notices and claim reconciliation statements. During retrieval, materials from the same supplier across different batches and different months can easily mix together. Recall results therefore need to distinguish by subject, batch and document type.

The materials consist mainly of short documents, identifiers, dates and amounts. Semantic retrieval works on natural-language descriptions. Full-text retrieval is more reliable for exact fields such as document numbers, batch numbers and supplier names. Hybrid retrieval combines both paths through RRF, and reranking performs a second ordering of candidate text.

The minimum relevance value takes effect only in semantic retrieval or when result reranking is used. It is a filtering threshold. It does not perform supplier isolation or permission isolation. A search node may associate one or more knowledge bases that use the same vector model. Knowledge bases with different vector models cannot be associated together. Retrieval itself does not constitute authorization, and it does not complete approval, deduction or reconciliation writes.

Constraints at the retrieval step

A hypothetical paper exercise sample is set out here for checking. A supplier contract attachment states: "Where arrival acceptance finds a rot rate exceeding the agreed proportion, the deduction is calculated on the amount corresponding to the nonconforming quantity of that batch, and the deduction is based on the quality exception sheet confirmed by quality inspection." The WMS acceptance record for the same batch states: "Arrived 12 March 2025, accepted and put into storage as conforming." The quality inspection system's quality exception sheet dated the same day states: "The rot rate of this batch exceeds the standard, judged nonconforming." A draft deduction notice states: "Based on the above contract and quality exception sheet, a deduction applies to this supplier's batch of 12 March 2025."

The items awaiting verification are whether the contract clause, acceptance record and quality exception sheet cited in the draft notice point to the same supplier, the same batch and the same date field, and whether the acceptance record's "accepted as conforming" and the quality exception sheet's "nonconforming" form mutually exclusive values in the same field. The two entries use different field scopes, so this remains a point to verify rather than a confirmed conflict.

Retrieval constraints follow from these material features. Identifier-type fields such as batch numbers and document numbers are better served by full-text retrieval. Clause text and narrative descriptions are better served by semantic retrieval. The minimum relevance value filters low-relevance results only. It does not exclude unrelated suppliers or unauthorized records, and it does not make an unrelated query return empty. Question optimization performs coreference resolution and question expansion before retrieval, and it adds one model call. Whether it is enabled is decided against the actual effect.

Configuration and implementation checks

Configuration or check itemHypothetical starting point and reason for this exerciseComparison and observation method
Associated knowledge basesAssociate only claim material bases that use the same vector modelCheck the vector model identifier of each base, exclude inconsistent ones, and do not run cross-model retrieval
Search modeRun the sample once with semantic retrieval and once with full-text retrievalCompare the hits of each path on the contract clause sentence and the batch number, then decide whether to use hybrid retrieval
Reference limitStarting point set to a token amount that can hold one complete contract clause sentenceCompare whether reference content is truncated using materials of different lengths, then adjust
Minimum relevanceAnnotate relevant and irrelevant fragments in the sample first, then set the thresholdObserve filtering results only under semantic retrieval or with reranking enabled; do not treat it as a subject filter
Question optimizationThe sample question already contains supplier, batch and dateCompare the original question with the optimized question, and check whether subject or period was altered
Result rerankingEnable when candidates are numerous and the question is completeObserve rerank scores and reference order; scores are used for filtering, not for permission judgment

Three common errors

  1. Treating a retrieval hit as authorization. Retrieval returning a contract clause and a quality exception sheet only shows that the material was recalled. Issuing the deduction notice, approving it and writing the reconciliation still require downstream implementation. The retrieval result does not constitute authorization.
  2. Treating "accepted and put into storage as conforming" and "quality exception, nonconforming" as directly contradictory. They form mutually exclusive values only when they share the same subject, the same batch, the same date and the same field. In the sample the two entries use different field scopes, so this is a point to verify and cannot be judged a conflict on this basis.
  3. Treating minimum relevance as a supplier or permission filter. The value filters low-relevance results only. It does not exclude unrelated suppliers or unauthorized records, and it does not make an unrelated query return empty.

How to verify the setup

  1. Input the contract clause sentence and the draft deduction notice from the hypothetical sample, and compare whether the recalled content covers the same supplier, the batch of 12 March 2025 and the quality exception sheet. The expected observation is that the reference content contains the subject, object and date fields needed for the judgment. If any is missing, record the evidence gap and do not supply a clause that was not provided.
  2. Input the batch number and the supplier name, and run semantic retrieval and full-text retrieval separately, then compare the hit differences between the two paths. The expected observation is that full-text retrieval is more stable for identifier-type fields. If one path returns no hit, record that path's result and do not assert that the other path must recall.
  3. Use an explicit paper input of an empty array to check the downstream handling design, and observe whether the chain still completes when the reference content length is zero. The expected observation is that an empty result can be recognized downstream. Do not claim that a fictional rule retrieval returns an empty array.

This page addresses only fresh-food supplier claims, contract and transaction material comparison, and knowledge base retrieval and recall. At operational handover, the authorization state of materials, operations and requests cannot be inferred from retrieval or from a form.