What the documents look like
Store count and loss control work compares contracts and transaction materials against four document types: count sheets, variance analyses, loss approval records, and surveillance review logs. A count sheet records book inventory and physically counted quantities. A variance analysis states which SKUs differ from the books and the amount involved. A loss approval record carries the handling decision for shrinkage. A surveillance review log records when a review happened and what range it covered. These materials are updated monthly or quarterly.
Comparison requires matching the same store, the same count period, and the same SKU across documents. Tool calls and plugins let the model decide, from document content, whether to invoke a count-sheet extraction tool, a variance calculation tool, or an approval status lookup tool, which reduces manual line-by-line checking. The category differs from supplier settlement because it addresses book-to-physical differences and shrinkage rather than supplier payables.
Constraints at the tool calls step
A tool description tells the model what the tool does and needs to state the input conditions and the situations where the tool should not be called. System module parameters are fixed; plugin parameters are configurable. Parameter descriptions and whether a parameter is required both affect the call decision. When a suitable required parameter is absent from context, the model may not call the tool; prompt guidance can lead the user to supply it, after which the actual request is checked. In advanced orchestration, available tools are connected to the tool call module, and the guidance is to tune a small number of tools before adding more.
The tool call termination node ends the current call: no further tools are invoked and the AI is not asked to summarize the tool result. Custom variables extend tool input for nodes that are not treated as tool parameters or cannot be called as tools. The same-vector-model requirement for retrieval libraries applies to knowledge base retrieval and does not extend to external systems.
Hypothetical paper exercise sample. The count sheet text reads: "Store A, count period March 2025, SKU-1001 book inventory 120 units, physical count 115 units, variance -5 units, variance cause pending investigation." The variance analysis text reads: "SKU-1001 variance -5 units, amount calculated at purchase price 12 yuan = 60 yuan, loss approval status is pending review." The surveillance review log reads: "28 March 2025, reviewed Store A fresh produce area surveillance, reviewer loss prevention department, review range 25 March to 27 March." The draft sentence under assessment reads: "The SKU-1001 variance at Store A has received loss approval and inventory adjustment may proceed."
Configuration and implementation checks
| Configuration item | Starting point for this hypothetical exercise | Reason and comparison method |
|---|---|---|
| Tool description | State the three purposes: count sheet extraction, variance calculation, approval status lookup | Check against the documented statement that the description tells the model the tool's purpose; confirm input conditions and non-call situations are present |
| Tool parameters | Plugin parameters set to store number, count period, SKU code | Check against the documented parameter description and required flag; confirm the actual request carries the required parameters |
| Required parameter | SKU code set as required | If SKU code is absent from context the model may not call; complete through interaction, then check the request |
| Tool connections | Connect only count sheet extraction and variance calculation | Follow the documented guidance to tune few tools first; observe the call log for mis-calls |
| Tool call termination | Place the termination node after variance calculation | Check against the documented behavior that termination stops the AI summary; confirm output returns the calculation result directly |
| Custom variable | Add an "approval status" variable description for the approval status lookup node | Check against the documented extension of tool variable input; confirm the variable is passed to the node |
Three common errors
- Treating pending review as approved. In the hypothetical sample the loss approval status is "pending review," while the draft sentence says approval was received. These are mutually exclusive values on the same field. The check inputs the sample source text and the draft sentence, compares the approval status field, and concludes the draft sentence is unsupported when the source says pending review and the draft says approved.
- Treating the surveillance review log as evidence of the variance cause. The sample log states only review time, reviewer, and review range; it does not state a variance cause. The check inputs the review log text and the variance analysis text, compares the variance cause field, and finds the cause remains pending verification when the log contains no cause.
- Treating a tool call result as business authorization. The tool call node returns a count sheet extraction result, which shows only that data was read; it does not show that loss approval passed or that inventory adjustment was authorized. The check inputs the tool call log and the approval status source text, compares the approval status field, and finds that when the log shows successful extraction while the status is pending review, the extraction result does not constitute approval.
How to verify the setup
- Input the hypothetical sample count sheet text, variance analysis text, and the draft sentence "The SKU-1001 variance at Store A has received loss approval and inventory adjustment may proceed." Compare the approval status in the draft sentence with "pending review" in the variance analysis. If the values differ, the draft sentence is unsupported and the evidence gap is recorded.
- Input the hypothetical sample surveillance review log text and variance analysis text. Compare whether the variance cause field appears in the review log. If the log states no variance cause, the cause remains pending verification and is not confirmed or denied.
- Input the tool call log and the approval status source text. Compare the tool return result in the log with the approval status field. If the log shows successful count sheet extraction while the status is pending review, the tool call result does not constitute approval, and inventory adjustment authorization still requires separate verification.