What the documents look like
Trade returns and claims work on the reverse logistics and liability determination that follow an export. The records arrive from customer email, inspection reports, customs systems and insurer claim systems. This page covers four document types: the return agreement, the claim letter, the quality report and the return customs declaration. Updates are irregular and case by case, with no fixed batch rhythm.
The structures differ by document. A return agreement carries the buyer and seller, the cargo batch and the return reason. A claim letter carries the claim amount, its basis and a submission deadline. A quality report carries the inspection conclusion and the sample scope. A return customs declaration carries the declaration number and the filing status. One cargo batch may have several of these documents at the same time, so the parties, the object and the effective scope need to be checked document by document. Parsing and chunking must preserve the correspondence between these fields, so that a condition and its conclusion are not separated.
Constraints at the document chunking step
A FastGPT knowledge base is made of libraries, collections and data. The smallest search unit is the library; a collection only classifies data and does not affect search results. Vector source data is stored in the dataset.datas table in MongoDB, and an indexes field records the corresponding vector IDs, so one set of data can map to multiple vectors. A vector field in PostgresSQL stores the vectors. During retrieval, vectors are recalled first, then the source data is looked up by vector ID in MongoDB; entries that map to the same source data are merged and the highest score is kept.
Segmentation should keep structure and semantics complete. A leaner index raises precision while reducing retrieval range, and one chunk can carry several indexes. Hybrid retrieval combines results through RRF, and a ReRank model produces a score from 0 to 1 that can be used for filtering. The minimum relevance value applies only during semantic retrieval or when result reranking is used, and it is a filter threshold. The citation limit is counted in tokens, not top k. Image retrieval needs image input and the matching model capability; reranking needs a model and is enabled by settings. Neither runs on every request. Retrieval does not perform authorization checks, and a similarity setting does not exclude unrelated business records or unauthorized records.
Configuration and implementation checks
Hypothetical paper exercise sample: a company plans to return a shipment of exported goods. The source text reads: "Return agreement states: Buyer A submitted return batch B-0310 on 10 March 2026; the return reason is outer packaging damage; the seller has not yet signed. Claim letter states: for batch B-0310 the claim amount is undetermined; the evidence list is not attached. Quality report states: inspection batch B-0310; conclusion is outer packaging damage; sample scope 20 pieces." The draft sentence to be judged is: "The seller has agreed to return batch B-0310 and the claim amount has been confirmed." The check compares the agreement signature status, the claim amount field and the quality report sample scope.
| Check item | Relation to this page's documents | How to perform the check |
|---|---|---|
| Segmentation completeness | Return reason and the batch it constrains must stay in one segment | Check whether the batch number and reason are split apart |
| Multi-vector mapping | One set of source data can map to several indexes | Check whether indexes cover the batch number and the declaration number |
| Citation limit | Counted in tokens, not top k | Record the hypothetical starting value and state the reason for choosing it |
| Minimum relevance | Applies only during semantic retrieval or reranking | Check whether reranking is enabled before comparing |
| Search mode | Numbers and declaration numbers suit full-text or hybrid retrieval | Search by term, by number and by natural language separately |
| Post-update review | A successful upload does not mean retrieval is updated | Check the actual training and index status |
The hypothetical starting value for the citation limit is 2000 tokens. The reason for choosing it is the length of the main paragraphs of one return agreement plus one quality report. The comparison object is whether the actual cited content covers the agreement parties and the report conclusion. This value is a starting point for this paper exercise and is not an official default.
Three common errors
- Treating a successful upload as an updated index. The input is the return agreement and quality report in the sample. Compare the upload record with the actual training and index status, and observe whether retrieval returns the new version. Before that check, the status is unknown.
- Treating a similarity threshold as a permission or entity filter. The input is a search term for batch B-0310. Compare whether returned content contains other batches or unauthorized records, and observe whether the minimum relevance setting changes the returned range. That setting only affects relevance filtering.
- Treating "has agreed" and "has been confirmed" in the draft sentence as fact. The input is the sample source text and the draft sentence. Compare the agreement signature status and the claim amount field, and observe whether the source text states agreement and an amount. Where the source text does not state them, the wording is unsupported.
How to verify the setup
- Input the sample source text and the draft sentence "The seller has agreed to return batch B-0310 and the claim amount has been confirmed." Compare the signature status in the return agreement and the amount field in the claim letter, and observe whether the draft sentence matches the source text. The source text does not state agreement or an amount, so the finding is unsupported.
- Input batch number B-0310 and a natural language question, and run full-text retrieval and semantic retrieval separately. Compare whether the returned segments contain the batch number, the return reason and the sample scope, and observe whether condition and conclusion stay in one segment. If they are split apart, segmentation needs adjustment.
- Input the quality report sample scope of 20 pieces and the draft sentence wording. Compare whether the draft sentence draws a conclusion beyond the sample scope, and observe whether it extends the scope of application. Wording beyond the scope must retain the evidence gap.
When the paper input is an empty list, check how the downstream design handles an empty result. A claim that a rule search necessarily returns empty cannot be made. Libraries using different vector models cannot be associated together; check the identifiers, exclude those that do not match, and record the actual observation.