Near-expiry markdowns: retrieval for product questions

Review retrieval for product questions in Near-expiry markdowns. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

Near-expiry markdown handling follows the shelf-stock lifecycle. It differs from per-order weighing and sorting, which operate on individual order lines. The main data sources are POS stock age, store inspection, ERP inventory, and quality inspection records. Daily documents include near-expiry lists, markdown approvals, damage write-off forms, and promotional price tags. These materials update by day or by shift, and they feed directly into knowledge-base retrieval and recall: the retrieval object is the batch, stock age, markdown status, and sellable scope, and the returned content supports product information and selection questions for store managers, shrinkage administrators, and finance auditors. Identifying near-expiry batches, approving markdowns, and isolating unsellable goods are the three most time-consuming steps. The retrieval step must return the corresponding document fragments while preserving approval status and the authorization boundary.

Constraints at the retrieval step

The knowledge-base search node can associate one or more knowledge bases that use the same vector model. The output is an array of cited content, and its length can be 0, so the output path still runs when nothing is found. Before retrieval, question optimization can perform coreference resolution and question expansion. Semantic retrieval, full-text retrieval, or hybrid retrieval recalls candidates. Hybrid retrieval merges multiple result paths through RRF. Result reranking uses a ReRank model for a second ordering pass and produces a score from 0 to 1. The minimum relevance value takes effect only under semantic retrieval or when result reranking is used. The citation limit is measured in tokens. These parameters act on recall and ordering; they do not perform permission or entity isolation. Knowledge bases built on different vector models cannot be associated together, so the model identifier must be checked first and non-matching bases excluded.

Hypothetical drill sample: a store inspection record dated 10 June 2025 for one shift states: "Cold cabinet A, batch 20250608, yogurt, 12 boxes, shelf life to 12 June 2025, status pending markdown approval." A markdown approval form of the same date states: "Markdown application for this batch has been submitted; approver has not signed." The draft sentence to be judged is: "This batch has completed markdown approval and can be sold at a markdown." The check compares the subject, batch, date, and approval-status fields. Both the inspection record and the approval form show that approval is not complete, while the draft sentence states it is complete. This is a mutually exclusive value on the same field, so the draft sentence is unsupported.

Configuration and implementation checks

Configuration itemStarting point for this hypothetical trialReason and comparison method
Associated knowledge baseAssociate only one base that uses the same vector modelCheck the vector model identifier against the document requirement, exclude bases with a different model, then associate
Search modeStart with semantic retrievalUse the sample question to compare recalled content across semantic, full-text, and hybrid retrieval; do not assume one mode suits all materials
Citation limitSet 2000 tokens for this trialTest whether content stays complete with near-expiry lists and approval forms of different lengths, then compare against a smaller value
Minimum relevanceSet 0.5 for this trialLabel relevant and irrelevant samples first, then compare filtering results at different thresholds
Question optimizationStart enabledCompare the original question with the optimized question and check whether subject or batch was altered incorrectly
Result rerankingNot enabled for this trialConfirm whether a ReRank model is available and enable it per settings, then compare ordering before and after

Three common errors

  1. Treating a pending markdown approval as a completed approval. The input is the inspection record and the approval form text. The comparison is the approval-status field. The draft sentence states completion while the source text shows no signature, so the statement is unsupported.
  2. Treating a retrieval result as an authorization to act. The input is the markdown approval fragment returned by the knowledge base. The comparison is the approval status inside the fragment against the actual authorization boundary. A retrieval hit does not mean the approval has taken effect.
  3. Associating knowledge bases that use different vector models. The input is the vector model identifiers of the two bases. The comparison is whether the identifiers match. When they do not match, association is excluded; no cross-model retrieval is run to compare missed recall.

How to verify the setup

  1. Input the hypothetical inspection record and approval form text together with the draft sentence. Compare the approval-status field. If both source texts show no signature while the draft sentence states completion, the sentence is unsupported, and the evidence gap is recorded as it stands.
  2. Input the same batch question and compare the cited content returned by semantic retrieval against full-text retrieval. Observe whether the batch, stock age, and status fields are covered. No guarantee is made that the first hit is correct or that all relevant items are recalled.
  3. Input an empty-reference case using the paper input []. Check the downstream design against this input and observe whether the output path still runs. No claim is made that a rule-based search must return [] in this situation.