Store counts and loss control: retrieval for copy drafting

Review retrieval for copy drafting in Store counts and loss control. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

Store count and loss control work in the supermarket and convenience store category deals with book-to-physical variance and shrinkage. It does not handle supplier settlement or accounts payable. The materials that matter for copy drafting are count sheets, variance analyses, loss-report approvals and surveillance review records. A count sheet records book quantity, physical quantity and variance by SKU. A variance analysis explains how the difference was classified. A loss-report approval records the application and its approval status. A surveillance review record supplies a time and a picture source.

These materials are updated monthly or quarterly. That update frequency does not make retrieval a real-time synchronization mechanism, and it does not justify treating a monthly count as current stock truth. Retrieval only returns candidate content. Permission isolation, approval execution and database writes belong to business systems implemented separately.

A draft sentence about shrinkage or loss can only be supported when the retrieved material carries the same subject, the same period and the same field. A count variance figure does not by itself support a statement about approval status. A surveillance record does not by itself support a statement about a completed write-off.

Constraints at the retrieval step

The knowledge base search node can associate one or more knowledge bases that use the same vector model. Knowledge bases built on different vector models cannot be associated together. The vector model identifier should be checked first, and any knowledge base that does not match should be excluded. The smallest search unit is the knowledge base; a collection inside it only classifies data and does not change search behavior.

Semantic retrieval computes distance between vectors and returns similarity. Full-text retrieval depends on keyword hits and suits identifiers, model numbers, proper nouns and error codes. Hybrid retrieval uses both paths and merges them through RRF. RRF is a fusion step in the pipeline, not a standalone toggle. The minimum relevance value is a filter that takes effect only under semantic retrieval or when result reranking is used. It removes low-relevance results. It does not act as an entity filter or a permission filter, and it does not exclude unrelated businesses or unauthorized records. The citation limit controls how many tokens of content are cited per search; it is measured in tokens, not in a count of items, and it does not restrict which knowledge bases or records can be searched.

Reranking uses a ReRank model to reorder candidates and produces a score from 0 to 1. Question optimization performs coreference resolution and question expansion before retrieval; it adds a model call and therefore adds latency. Image retrieval requires image input and matching model capability, and it also depends on whether an image index was created at ingestion time. The overall retrieval pipeline lists several optional paths. Not every path runs on every request.

Hypothetical paper exercise sample. A store loss-prevention unit produced a variance analysis after a March 2025 count. The source text reads: "The March count shows category A SKU-1042 with a book quantity of 120 units and a physical count of 96 units, a variance of 24 units. The variance cause is three unregistered loss reports for this SKU between March 12 and March 18. Loss report approval form BX-2025-0317 has status pending approval." A draft sentence under review reads: "The store's March category A loss has been approved and the loss report has been completed." The retrieval input is "category A SKU-1042 March variance loss report approval." The comparison is between the draft sentence and the approval status field in the source text. The source text states pending approval only. The draft sentence states approval was granted and processing completed. The two differ on the approval status field, and the draft sentence is not supported.

Configuration and implementation checks

Configuration itemHypothetical starting value for this exerciseReason for the choice and comparison method
Associated knowledge basesCount sheet base, variance analysis base, loss-report approval baseThe three use the same vector model; check the model identifier first and exclude any base that does not match
Search modeHybrid retrievalIdentifier queries need keyword hits and semantic descriptions need vector recall; compare recalled content against semantic retrieval alone
Citation limit2000 tokensHypothetical starting value for this exercise; compare with 1000 tokens and observe whether all three source sentences enter the cited content
Minimum relevance0.3Hypothetical starting value for this exercise; label relevant and irrelevant samples first, then compare filtering against 0.5
Question optimizationEnabledUsed for coreference resolution and question expansion; compare the subject in the original question with the subject in the optimized question
Result rerankingReRank enabledSecond ordering when candidates are numerous; compare the position of the same content before and after reranking

These values are hypothetical starting points for this exercise. They are not official defaults. The table lists only settings relevant to the retrieval task on this page. Database internals are not a required configuration item on every page.

Three common errors

  1. Treating pending approval as granted approval. In the hypothetical sample, the source text states that loss report approval form BX-2025-0317 has status pending approval, while the draft sentence states that approval was granted and processing completed. The input is the approval status field, the comparison is between the two values, and the observable result is a status mismatch. Pending approval does not demonstrate that approval was granted, and it does not demonstrate that operating permission is absent.
  2. Treating the citation limit as a search scope limit. The citation limit controls the length of cited content in tokens and does not restrict which knowledge bases or records can be searched. The input is the citation limit value, the comparison is whether recalled content stays complete, and the observable result is content either truncated or preserved in full.
  3. Treating minimum relevance as a permission filter. Minimum relevance takes effect only under semantic retrieval or result reranking and filters low-relevance results. It does not exclude unrelated businesses or unauthorized records. The input is the relevance threshold, the comparison is the returned content, and the observable result is that low-scoring content is filtered while permission decisions still require a downstream system.

How to verify the setup

  1. Input the three source sentences from the hypothetical sample together with the draft sentence "The store's March category A loss has been approved and the loss report has been completed," using the retrieval terms "category A SKU-1042 March variance loss report approval." Compare the draft sentence with the approval status field in the source text. The source text states pending approval and the draft sentence states approval was granted. The two are inconsistent, and the sentence is not supported. This result satisfies the verification condition.
  2. Input an empty citation array [] and check whether the downstream design continues execution on an empty result. The knowledge base search node outputs cited content as an array whose length can be 0, which means the output path still runs when nothing is found. Observe whether the downstream node handles an empty array. Do not claim that a hypothetical rule lookup necessarily returns [].
  3. Input the same retrieval terms and associate, in one run, knowledge bases that share the same vector model, and in another run a knowledge base with a different vector model. Compare whether each association is permitted. Knowledge bases with the same vector model can be associated together; a knowledge base with a different vector model cannot be associated. Exclude the non-matching base and record the actual observation. Do not run a cross-model search to compare missed recall.