Wholesale stall trading: citation tracing for procurement

Review citation tracing for procurement in Wholesale stall trading. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

Wholesale stall trading in stock procurement and supplier records centres on four document types: purchase notes, handwritten sales slips, stall lease contracts and payment receipts. Transactions are fragmented, on-site bargaining runs alongside freight consignment, and data sources include wholesale market quotations, stall inventory, WeChat payments and logistics consignment notes. These characteristics shape citation tracing directly. A single batch of incoming goods may be supported only by a handwritten slip; a single payment may exist only as a WeChat receipt; a stall lease contract and a payment receipt belong to different parties and different periods. Citation tracing therefore requires each cited item to correspond to a specific material, and where a material is absent, the gap is retained rather than filled.

The knowledge base search node can be linked to one or more knowledge bases that share the same vector model, and it outputs cited content as an array whose length may be zero. An empty array means no content was retrieved, and that output path still completes. Retrieved results are passed to the answering step, where each answer sentence is then checked against the cited source text. Semantic recall and relevance scores do not perform permission or entity isolation, and the same-vector-model requirement for linked knowledge bases does not extend to external systems sharing that model. Knowledge bases built on different vector models cannot be linked together; the identifier is checked first and non-conforming bases are excluded. The optional paths shown in the overall document flow diagram do not mean every request executes all of them. Image retrieval requires a corresponding image input and model capability, and reranking requires a model and must be enabled according to settings.

Hypothetical drill sample: a stall owner submits the text of one purchase note reading "12 March 2026, purchased 50 cases of walnuts from Xinglong Dried Fruit Wholesale, unit price 120 yuan per case, payment receipt number SJ-0312, settlement agreed before 20 March." Alongside it, one draft sentence awaits judgement: "This supplier record has passed review and may be used for subsequent procurement citations." A separate handover request reads: "Please add the above purchase note and payment receipt to the supplier record base and mark them as reviewed." The source text contains the subject, object, date, quantity and amount; the draft sentence concerns review status; the handover request concerns a write and a marking action. Whether review is complete and whether the write has been executed both require a separate system implementation. Retrieval or a form does not constitute authorised execution.

Constraints at the citation tracing step

Tracing a citation back to its source in this category runs into several boundary conditions. The search node returns an array that may be empty, so a downstream design must accept zero citations without treating that as a failure. The same-vector-model condition applies only to the linked knowledge bases inside the search node; it does not mean that an external business registry or any other outside system must use the same model. Semantic similarity is a retrieval signal, not a permission filter or an entity filter, so a high-scoring result is not evidence that the requesting party is authorised to see it.

The optional retrieval paths in the documented flow are conditional. Image description retrieval or image vector retrieval applies only when an image is present in the input and the model supports the corresponding capability. Reranking applies when a ReRank model is available and the setting is enabled. Neither should be assumed to run on every request.

For the drill sample, the purchase note text carries the subject, object, date, quantity and amount. The draft sentence makes a claim about review status that the source text does not contain. The handover request describes a write and a marking action that a form collects as values but does not itself execute. Review completion, database writes and status marking all require downstream implementation. The correct treatment is to record the review status as pending verification, the handover request as pending, and the citation entries as corresponding to the purchase note and receipt text only.

Configuration and implementation checks

Configuration itemRelevant setting or check on this pageLink to the sample
Linked knowledge basesSelect one or more knowledge bases sharing the same vector modelCheck whether the vector model identifiers of the purchase note base and the receipt base match
Search modeSemantic retrieval, full-text retrieval or hybrid retrievalThe sample contains number SJ-0312; full-text retrieval can check the number match
Citation limitEach search cites at most n tokens of contentHypothetical trial starting value 2000 tokens, chosen because of the combined length of the purchase note and receipt text, then adjusted against the compared value
Minimum relevanceA 0-1 value, effective only under semantic retrieval or result rerankingHypothetical trial starting value 0.5, used to observe whether the sample draft sentence is recalled
Result rerankingUses a ReRank model for secondary orderingEnabled when the sample has many candidates; check the rerank score against the setting
Citation content outputArray format, length may be zeroUse the paper input [] to check the downstream design for empty results

Three common errors

  1. Treating retrieval output as completed review. In the sample the draft sentence states "has passed review", while retrieval can only return the purchase note and receipt text. The review status requires a separate system implementation. The check input is the draft sentence and the source text; the comparison is whether a review field appears in the source text; the observable result is that the source text does not state a review status, so the item is marked pending verification.
  2. Treating the handover request as an executed write. The sample request states "add to the supplier record base and mark as reviewed". A form collects values, and the database write and marking action require downstream implementation. The check input is the request text and the current base record; the comparison is between the requested action and the executed action; the observable result is that the request remains pending and does not constitute a completed write or review.
  3. Forcing knowledge bases with different vector models to be linked together. If the purchase note base and the receipt base in the sample carry different vector model identifiers, they cannot be linked. The check input is the vector model identifier of each base; the comparison is whether the identifiers match; the observable result is that a base with a non-matching identifier is excluded, and no cross-model retrieval is run to compare missed recalls.

How to verify the setup

  1. Test citation tracing with the sample purchase note text and the draft sentence. The input is the purchase note text and the draft sentence; the comparison is whether each citation in the answer corresponds to the subject, date, quantity and amount in the source text; the observable result is that citation entries match the source text and the review status is marked pending verification, which satisfies the condition.
  2. Test empty-result handling with the paper input []. The input is an explicit empty array; the comparison is whether the downstream node continues execution without error; the observable result is that the output path completes with no cited content, which satisfies the condition.
  3. Test the authorisation boundary with the sample handover request. The input is the handover request text; the comparison is between the requested action and the current system state; the observable result is that the request is marked pending and no record of a completed write or review appears, which satisfies the condition.