What the documents look like
General trade import declaration work centres on the customs value, freight and insurance, and duty payment. Each declaration draws on the import declaration form, commercial invoice, packing list, bill of lading, and contract. These materials arrive from the International Trade Single Window, customs tariff schedules, forwarder arrival notices, and foreign exchange payment vouchers, and the data updates per declaration. During handover, the customs broker and customs manager need to pin down the citation source for a given material so later stages can trace back to the original document. Material versions multiply and fields cross between documents, so citation tracing means checking whether the cited content genuinely comes from the currently effective version, and what authorization status that citation holds at handover.
The knowledge base search node can associate one or more knowledge bases that share the same vector model, and it outputs cited content as an array whose length may be zero; when the array is empty, the output path still runs through. Search results pass to the answering stage, where each answer sentence is compared against the cited source text. Retrieval itself is not authorization, and cited content does not mean a document has been approved or already used in a declaration.
Hypothetical drill sample: one consignment of imported goods. Assumed source text is "Commercial invoice INV-001 states the transaction term as CIF, with freight and insurance already included in the invoice total", "Bill of lading B/L-001 shows the port of discharge as Shanghai, with an arrival notice date of hypothetical 10 March 2025", and "Contract HT-001 sets the payment term at 60 days after the bill of lading date". A draft sentence to be judged is "The freight and insurance field of this declaration should directly cite the invoice total from INV-001, with no separate breakdown needed". Whether that draft sentence holds depends on whether the declaration filing rule matches the invoice transaction term. The sample does not provide the declaration form text, so this point remains unsupported and the evidence gap must be preserved.
Constraints at the citation tracing step
The search node's output array may be empty, and an empty array is not a workflow error or termination. A citation must be traceable to a named document and version. The vector model identity of each associated knowledge base must be checked first, because knowledge bases with different vector models cannot be associated together. A relevance score is a filtering threshold, not a category, entity, or permission filter, so it does not exclude unrelated businesses or unauthorized records. Retrieval does not grant authorization, and cited content does not equal an approved or filed document. The thinking budget setting is a reasoning budget and must not be treated as a citation token limit. The optional paths in the overall retrieval flow, such as image retrieval or reranking, do not all execute on every request; image retrieval requires image input and model capability, and reranking requires a rerank model that is enabled by configuration.
Configuration and implementation checks
| Configuration or check item | Hypothetical trial starting point | Reason and comparison method |
|---|---|---|
| Associated knowledge bases | Assume selection of the knowledge base containing the INV-001, B/L-001, and HT-001 source text | Check each base's vector model identifier first, exclude those with a different vector model, and do not run cross-model retrieval |
| Citation limit | Assume a starting point of 2000 tokens | Compare against the combined length of the three sample materials and observe whether truncation drops a key field |
| Minimum relevance | Assume a starting point of 0.5 | Compare against semantic retrieval or rerank scores and judge whether a fragment containing INV-001 is filtered out |
| Search mode | Assume hybrid retrieval | Numbered fields such as INV-001 suit full-text hits; compare after RRF fusion with semantic recall results |
| Cited content output | Assume the output array holds 3 entries | Compare entry by entry against the sample source text and confirm each citation locates a specific material |
| Citation handover | Assume the answering stage receives that array | Check whether the answer sentence uses only cited source text and introduces no fact outside the sample |
Three common errors
- Treating a retrieval hit as authorized execution. The input is the draft sentence "directly cite the invoice total from INV-001"; the comparison object is the declaration filing rule against the invoice transaction term; if the sample provides no declaration form text, the observable result is only that the citation source is pending verification, and the draft sentence cannot be judged to hold.
- Associating knowledge bases with different vector models together. The input is two knowledge bases whose vector model identifiers differ; compare whether the identifiers match; the observable result is that they cannot be associated together, so record the identifiers and exclude the mismatched base without inferring missed recall or redundancy.
- Treating an empty citation array as a halted process. The input is a hypothetical output of
[]; compare whether the downstream node still receives that output; the observable result is that the path runs through, and an empty array is neither an error nor proof that a retrieval rule always returns empty.
How to verify the setup
- Input the sample source text "Commercial invoice INV-001 states the transaction term as CIF, with freight and insurance already included in the invoice total". Compare whether the cited content corresponds word for word to INV-001. The observable result is that the citation locates the invoice source text, and the draft sentence stays within the source text's scope.
- Input the sample source text "Bill of lading B/L-001 shows the port of discharge as Shanghai, with an arrival notice date of hypothetical 10 March 2025". Compare whether the citation contains that date and port. The observable result is that the cited fields match the source text, and the arrival date is not rewritten as a declaration date.
- Input a hypothetical output of
[]. Compare whether the downstream answering stage still executes. The observable result is that the output path runs through, while recording that this retrieval returned no citation, without claiming that a hypothetical rule always returns empty.