What the documents look like
Each general export declaration shipment involves an export declaration form, a commercial invoice, a packing list, and a contract. Inventory procurement and supplier records are used to check the origin of goods, purchase quantities, and supplier information, cross-verifying the declared elements on the export declaration form. Compared with general import declarations, export declarations also affect the matching of export tax rebate vouchers. These records are updated per shipment, and during parsing and chunking the correspondence between the procurement contract number, invoice number, supplier name, and goods quantity must be preserved. Returned declarations for inspection, declaration errors, and blocked tax rebates are common consequences; if chunking splits the binding between supplier and goods quantity, it becomes difficult to trace back to the original shipment during verification.
Constraints at the document chunking step
Parsing must preserve document identity and version so that chunks can refer back to the original procurement contract or invoice. Segmentation must ensure that conditions, descriptions, and the content they constrain are not separated; for example, the supplier name and the corresponding goods quantity should remain in the same data block. Original data and retrieval indexes must be distinguished: the same set of original data can correspond to multiple indexes, and the indexes field records the corresponding vector IDs. During retrieval, vectors are recalled first, then the vector IDs are used to find the original data in the dataset.datas table in MongoDB; if they correspond to the same set of original data, they are merged, and the vector score takes the highest score. The citation limit among search parameters is measured in tokens, and the minimum relevance score takes effect only during semantic retrieval or result reranking. Hybrid retrieval fuses multiple result paths through RRF, and the 0-1 score obtained after reranking can be used for filtering.
Hypothetical drill sample: an export company has a procurement contract whose original text reads "Contract No. PO-2024-018, supplier is East China Metal Products Co., Ltd., goods are stainless steel fasteners, quantity 5,000 pieces, unit price USD 2.30, delivery date June 20, 2024." There is also a commercial invoice whose original text reads "Invoice No. INV-2024-033, contract No. PO-2024-018, goods stainless steel fasteners 5,000 pieces, total price USD 11,500." A draft sentence to be assessed reads "This batch of stainless steel fasteners has completed procurement warehousing, and supplier records are complete." This sample is used only for paper-based verification and does not represent a real business record.
Configuration and implementation checks
| Check item | Hypothetical trial starting point | Comparison method and reason |
|---|---|---|
| Citation limit | 3000 tokens | Starting point for this hypothetical trial because the procurement contract and invoice paragraphs are long; compare with 2000 tokens to observe whether supplier and quantity are returned in the same block |
| Minimum relevance | 0.35 | Starting point for this hypothetical trial because low-relevance fragments need filtering; compare with 0.5 to observe whether contract number retrieval still returns the corresponding block |
| Search mode | Hybrid retrieval | Contract numbers and invoice numbers are precise identifiers suited to full-text retrieval; natural-language questions suit semantic retrieval, and the two are fused through RRF |
| Question optimization | Enabled | Starting point for this hypothetical trial because references may be unclear during consecutive follow-up questions about suppliers; compare after disabling to see whether contract number retrieval still hits |
| Result reranking | Enabled | When candidates are numerous, use ReRank for secondary sorting, and the 0-1 score can be used for filtering; this step is not executed when no rerank model is configured |
Three common errors
- Treating a successful upload as an updated index. The input is the procurement contract upload action, the comparison object is the actual training and index status, and the observable result is whether retrieving that contract number returns the corresponding data block. A successful upload and a completed index are two different facts.
- Treating retrieval results as an authorization basis. The input is retrieved supplier records, the comparison object is the operational handover authorization status, and the observable result is whether there is a separate signed or approved record. Retrieval does not handle permissions or entity isolation.
- Treating a draft sentence pending review as a verified fact. The input is "This batch of stainless steel fasteners has completed procurement warehousing," the comparison object is the original contract and invoice text, and the observable result is whether the original text states the warehousing status. The original text does not state warehousing, so this sentence is not supported.
How to verify the setup
- Retrieve by contract number. The input is contract number PO-2024-018, the comparison object is whether the returned data block contains both the supplier name "East China Metal Products Co., Ltd." and the goods quantity "5,000 pieces," and the condition is met when both appear in the same data block. If the returned result contains only the goods quantity and not the supplier name, record it as segmentation failing to preserve the binding, and recheck the chunking result for that contract.
- Retrieve by invoice number. The input is invoice number INV-2024-033, the comparison object is whether the returned block contains both contract number PO-2024-018 and the total price USD 11,500, and the condition is met when the contract number and total price appear in the same block. If the returned block lacks the contract number, record it as the invoice-contract association not being preserved, and check whether the parsing stage merged the contract number into the invoice data block.
- Verify the draft sentence. The input is "This batch of stainless steel fasteners has completed procurement warehousing, and supplier records are complete," and the comparison object is whether the original contract and invoice text states the warehousing status and the completeness of supplier records. The condition is met when the original text explicitly states warehousing and complete records; when the original text does not state this, record it as unsupported, and do not judge on this basis that procurement has been completed or records are complete.
All three checks are performed on paper samples, and no actual testing is claimed. If retrieval returns an empty result, the paper input [] can be used to check the downstream design, without claiming that retrieval under a fictional rule necessarily returns []. Libraries across different vector models cannot be jointly associated; first check identifiers and exclude non-matching ones, and record actual observations. Image retrieval requires corresponding image input and model capability, and reranking requires a model and must be enabled according to settings; these optional paths do not mean that every request executes all of them.