Fruit-store procurement: citation tracing for document comparison

Review citation tracing for document comparison in Fruit-store procurement. Check sources, input boundaries, error handling and repeatable test evidence.

What the documents look like

Fresh fruit store procurement runs on four recurring documents: purchase orders, acceptance records, pesticide-residue test reports, and loss records. The data sources behind these documents include wholesale market quotations, supplier quotes, store sales, and test reports, with updates occurring daily or per batch. Purchasing decisions lean on wholesale market conditions and grade-based acceptance, and there is no fixed head-office standard meal baseline, so the same batch of fruit may be described with different grades, quantities, or prices across documents. The citation tracing step has to map fields in the purchase order, acceptance record, test report, and loss record one by one, and confirm whether the subject, object, status, and effective scope agree across materials.

The knowledge base search node selects one or more knowledge bases that share the same vector model, and outputs cited content as an array whose length may be zero. When nothing is retrieved, the output path still completes. The citation limit controls the maximum amount of content cited per search in tokens. The minimum relevance score is a 0–1 filter threshold that applies only under semantic retrieval or when result reranking is used. Hybrid retrieval merges multiple recall paths through RRF. Reranking requires a model and must be enabled by configuration. Image retrieval requires a corresponding image input and model capability. Retrieval is the process of obtaining cited content and does not perform authorization decisions. Forms collect values; business verification, approval, database writes, and external synchronization each need their own downstream implementation.

Hypothetical paper exercise sample: On 10 March 2025, a store fresh-produce supervisor submits a purchase order stating "Supplier A, apples, 200 boxes, unit price 80 yuan, delivery required before 12 March." On the same day, an acceptance record states "actually received 195 boxes, of which 5 boxes crushed, grade two." A pesticide-residue test report states "this batch of apples passed testing, report date 11 March." A loss record states "13 March, loss 3 boxes." A draft sentence reads: "This batch of apples: purchase quantity 200 boxes, accepted and put into storage 200 boxes, loss 0 boxes." The task is to determine whether this draft sentence agrees with the three source materials.

Constraints at the citation tracing step

The search node returns an array of citations, and a zero-length array is a valid output rather than a workflow failure. The citation limit is measured in tokens, not in a fixed number of items, because chunk lengths in mixed knowledge bases vary widely. The minimum relevance score is a filter threshold, not a final ordering rule; after question optimization, hybrid retrieval, image retrieval, or reranking, results may be merged from several recall paths and need not follow a single vector similarity order. Reranking produces a 0–1 score representing relevance between the retrieved content and the question, and that score can be used for filtering. Question optimization runs an extra model call before retrieval and can improve multi-turn retrieval while adding latency. Image retrieval depends on whether a vision model or an image-capable vector model is configured, and on whether image indexes were generated when the data was ingested.

Retrieval does not decide authorization. A retrieved purchase order does not show that the purchase was approved. A form that collects values does not perform business verification, approval, database writes, or external synchronization. Those actions require their own downstream implementation. The same vector model requirement applies only to the knowledge bases that may be jointly associated in the search node; it does not extend to any external system.

Configuration and implementation checks

Configuration itemHypothetical starting point for this exerciseReason and comparison method
Associated knowledge basesSelect knowledge bases containing purchase orders, acceptance records, test reports, and loss recordsVerify the selected knowledge bases and document versions; only knowledge bases sharing the same vector model may be jointly associated
Search modeHybrid retrievalPurchase order numbers and supplier names are exact fields while other text is natural language; compare semantic recall results with full-text recall results
Citation limitSet a token value for this exerciseCompare with the total length of the sample materials to confirm the cited content covers the key fields of the three documents
Minimum relevance scoreSet a 0–1 value for this exerciseCompare with rerank scores to observe whether low-relevance fragments are filtered; this applies only under semantic retrieval or reranking
Question optimizationDecide whether to enable based on observed effectCompare completion results for references such as "this batch of apples" before and after enabling, and confirm whether the retrieval terms are complete
Result rerankingEnable by configuration when a model is availableCompare candidate text ordering before and after reranking, and confirm its relationship to question completeness

Three common errors

  1. Treating retrieval output as an authorization conclusion. The knowledge base search outputs a citation array whose length may be zero, and retrieval does not perform authorization decisions. The error appears as: concluding that a purchase was approved because the purchase order was retrieved. Check method: input the purchase order text from the hypothetical sample, compare the retrieval result with approval fields, observe whether an approval record exists, and record it as unsupported when absent.
  2. Jointly associating knowledge bases with different vector models. The official documentation states that only knowledge bases with the same vector model can be selected. The error appears as: associating two knowledge bases that use different vector models at the same time. Check method: verify the knowledge base identifiers and vector model identifiers, exclude those that do not match, and record the actual observation. Do not run cross-model retrieval to compare missed recalls.
  3. Treating a pending-review status as a completed termination or an effective change. The error appears as: concluding that the purchase quantity has been changed to 195 boxes because the acceptance record states "actually received 195 boxes." Check method: input the purchase order text and the acceptance record text, compare the quantity fields, confirm that the purchase order states 200 boxes and the acceptance record states 195 boxes, and treat these as different values in different fields belonging to different documents, which is unsupported or pending verification.

How to verify the setup

  1. Input the purchase order, acceptance record, test report, and loss record texts from the hypothetical sample, together with the draft sentence "This batch of apples: purchase quantity 200 boxes, accepted and put into storage 200 boxes, loss 0 boxes." Compare the subject, object, quantity, and status fields of the draft sentence against each source material. Expected observation: the "200 boxes" in the draft sentence disagrees with the 195 boxes in the acceptance record, and "loss 0 boxes" disagrees with the 3 boxes in the loss record, so the draft sentence is judged unsupported.
  2. Input an explicit paper input [] and check how the downstream design handles an empty citation array. Compare this input with the documented statement that the search node outputs a citation array whose length may be zero. Expected observation: the output path completes and does not terminate with an error because of the empty array; record this observation.
  3. Input the pesticide-residue test report text from the hypothetical sample, and compare the report date of 11 March with the required delivery date of 12 March in the purchase order. Expected observation: the report date precedes the delivery date and constitutes valid test evidence for the same batch, but a passing test does not indicate passing acceptance; these are two different facts, and the distinction is recorded.

This page addresses only fruit-store procurement, contract and transaction material comparison, and citation tracing. Operational handover must not treat retrieval or a form as authorization to execute.