What the documents look like
Wholesale market stall trading depends on on-site bargaining and consignment shipping. Compared with regional distributor replenishment, transactions are more fragmented, and the paperwork reflects that pattern. The documents handled day to day include purchase receipts, handwritten sales slips, stall lease contracts and payment receipts. These records are produced daily or per transaction.
For order fulfilment and after-sales question answering, a reply often needs to be traced back to the wording of a specific document. Citation tracing therefore focuses on two things: whether the knowledge base holds document text that can be checked, and whether the answering step presents the retrieved citation content item by item. Handwriting, amounts and consignment addresses on stall documents frequently exist in more than one version, so tracing requires checking the same party, the same document and the same field.
Constraints at the citation tracing step
The knowledge base search node can associate one or more knowledge bases that use the same vector model, and it outputs citation content as an array whose length may be zero. When the array is empty, the downstream chain still runs. Retrieval does not perform authorization judgement: similarity scores and the minimum relevance setting only filter low-relevance results, and they do not replace business authorization or entity isolation. Hybrid retrieval merges multiple result paths through RRF. Re-ranking requires a model and must be enabled according to the settings. Question optimization and image retrieval are optional paths that run only when the corresponding input and model capability exist.
Hypothetical paper exercise sample: a stall keeps a handwritten sales slip whose original text reads, "12 March 2025, buyer Li purchased 30 boxes of potatoes at a unit price of 45 yuan, agreed for consignment to the East City Market, with a balance of 2000 yuan to be settled within three days of receipt." A stall lease contract separately reads, "Lease term 1 January 2025 to 31 December 2025, monthly rent 3000 yuan." A draft sentence is now under review: "The buyer settled the balance on 15 March and the order was fulfilled." The review materials contain no receipt record or settlement confirmation dated 15 March. The settlement fact in the draft sentence is not supported and must remain pending verification.
Configuration and implementation checks
| Configuration item | Hypothetical starting point for this exercise | Reason and comparison method |
|---|---|---|
| Associated knowledge bases | Select the purchase receipt base and the sales slip base that use the same vector model | Check the vector model identifier of each selected base; bases with different models are not associated together |
| Search mode | Hybrid retrieval | Compare with semantic retrieval alone for hits on numbers and amounts |
| Minimum relevance | Hypothetical starting value 0.3 | Compare with 0.5 and observe whether irrelevant fragments decrease |
| Citation limit | Hypothetical starting value 2000 tokens | Compare with 1000 and observe whether citations cover the key fields of the document |
| Question optimization | Enabled | Compare with disabled for retrieval across multi-turn follow-up questions |
| Result re-ranking | Enabled | Compare with disabled for changes in candidate ordering |
These values are hypothetical starting points for this paper exercise, not official default values.
Three common errors
- Treating a retrieval score as an authorization basis. Input a stall document query, compare the score with the business authorization status, and note that a high score does not mean the buyer has been permitted to view the record or has settled the balance.
- Writing an unrecorded settlement fact as settled. Input the draft sentence and the sales slip original text, compare whether a payment date field appears, and record the item as pending verification when the original text lacks that field.
- Associating knowledge bases across different vector models. Input the model identifiers of the two bases, compare whether they match, and exclude a base when they do not match rather than running a cross-model retrieval to compare missed recalls.
How to verify the setup
- Input the sales slip original text and the draft sentence, then compare whether the settlement date in the draft sentence appears in the original text. When the original text lacks that date, the judgement is that the fact is not supported.
- Input the lease contract original text and a question about the lease term, then compare whether the term start and end cited in the answer match the original text. Record any difference when they do not match.
- Input an explicitly written empty result array [] and compare whether the downstream answering step still runs. The empty citation output condition is met when the chain runs through.
All three verification items are paper expectations and were not actually executed.