What the documents look like
Near-expiry markdown handling works on shelf-stock batches. As shelf age advances, a batch moves toward markdown, isolation, or shrink write-off. The working papers are near-expiry lists, markdown approvals, shrink write-off forms, and promotional price tags. Their data comes from POS shelf-age records, store inspections, ERP inventory, and quality inspection records. For order fulfilment and after-sales answering, the questions are: what state a batch is currently in, whether a markdown has been authorized, and which basis applies to after-sales handling once the batch has been sold. Retrieval has to map a batch identifier, a state field, and an approval stage onto specific papers. A retrieval hit means the text is similar; it does not mean the batch has markdown authorization or is cleared for sale.
Constraints at the retrieval step
The same batch may appear as awaiting inspection, awaiting approval, markdown approved, or written off across different papers. Retrieval must compare the same subject, the same period, and the same field. Only mutually exclusive values in one field constitute a contradiction; an unstated value can only be recorded as pending verification. The knowledge base search node can associate one or more knowledge bases that use the same vector model. Knowledge bases with different vector models cannot be associated together; check the identifiers first and exclude those that do not match. Reference content is output as an array, and its length can be 0, meaning the downstream chain still runs when nothing is found. Minimum relevance takes effect only in semantic retrieval or when result reranking is used; it is a filter threshold and does not perform permission or entity isolation. A similar record being recalled does not mean access was authorized. Hybrid retrieval merges multiple result paths through RRF; RRF is a fusion process, not a switch.
Hypothetical paper exercise sample: the following are paper materials used to check retrieval and judgment. They do not represent any real store or record.
Material A (near-expiry list excerpt): "Batch B-0917, leafy vegetables, shelf age day 3, status is awaiting inspection, inspection conclusion not filled in."
Material B (markdown approval excerpt): "Batch B-0917, markdown application 20%, approval status is awaiting review, approver has not signed."
Draft sentence to be judged: "Batch B-0917 has completed markdown approval and can be sold at a markdown."
Configuration and implementation checks
| Configuration or check item | Hypothetical starting point for this exercise | Reason for the choice and comparison method |
|---|---|---|
| Associated knowledge bases | Associate only near-expiry material bases that use the same vector model | Check the vector model identifier first, exclude bases with different models, and do not associate across models |
| Search mode | Start from hybrid retrieval | Batch numbers need keyword hits and state descriptions need semantic hits; compare semantic, full-text, and hybrid results per test question |
| Reference limit | Hypothetical starting point set to the token amount covering one complete list entry | The unit is tokens; compare whether content is truncated using actual materials of different lengths, then adjust |
| Minimum relevance | Hypothetical starting point at a middle value, effective only in semantic retrieval or reranking | Label relevant and irrelevant samples first, compare what remains after filtering, then adjust step by step |
| Question optimization | Enable for multi-turn follow-ups and short questions | Compare the original question with the optimized question and check whether the subject was altered |
| Result reranking | Use when a rerank model is available and enabled under the settings | Compare how rerank scores and vector scores order the candidates differently |
Three common errors
- Treating a retrieval hit as authorization. Material B has approval status awaiting review. Retrieving that entry only means the text is related. If the draft sentence says approval is complete, the inputs are Material A and Material B, the fields compared are approval status and signature state, and the observed result is awaiting review with no signature, so the draft sentence is inconsistent with the materials.
- Associating knowledge bases across vector models. The input is two bases whose vector model identifiers differ. Compare whether the identifiers match. The observed result is that different identifiers require exclusion. Do not run a cross-model retrieval to compare missed recalls.
- Treating minimum relevance as a permission filter. The input is a semantically similar record that falls in an unauthorized scope. Compare whether it is still recalled before and after filtering. The observed result is that the similarity threshold does not exclude that record, and permissions require a separate system implementation.
How to verify the setup
- For the draft sentence "Batch B-0917 has completed markdown approval and can be sold at a markdown," input Material A and Material B, compare the approval status field and the signature field, and observe awaiting review with no signature. Judge the sentence unsupported and record the evidence gap.
- For the state check of the same batch, input "awaiting inspection" from Material A and "awaiting review" from Material B. Compare whether the values in one field are mutually exclusive. The observed result is that the two entries record different stages in different fields, which does not constitute a contradiction and can only be recorded as coexisting stages.
- For empty-result handling, input the paper retrieval result []. Compare whether the downstream design accepts a reference array of length 0 and continues the chain. The observed result is that the downstream handles it as an empty reference. Do not claim that retrieval under invented rules necessarily returns [].
All of the above are paper checks. No actual retrieval, approval, deployment, or refund was executed.