Export tax rebate filings: document chunking for product questions

Review document chunking for product questions in Export tax rebate filings. Check sources, input boundaries, error handling and repeatable test evidence.

What the documents look like

Export tax rebate filing work happens after goods have left the country. It matches tax vouchers against export records. The core materials are the export tax exemption and rebate filing form, the customs export declaration, the purchase invoice, and the foreign exchange receipt voucher. These come from the electronic tax bureau, the export rebate filing system, customs electronic data, and the finance ledger. They update monthly and per batch. Errors cause delayed rebates, denial of rebate, or tax risk.

Structure differs across these materials, and that difference drives parsing and chunking. A filing form carries a header plus detail rows. A customs declaration carries item numbers, quantities, and amounts. A purchase invoice carries buyer and seller parties plus goods names. A receipt voucher carries an amount and a date. Chunking must preserve the document identity and version that let a chunk point back to its source text. A condition or note cannot be split away from the content it constrains.

Constraints at the document chunking step

In FastGPT a knowledge base is made of libraries, collections, and data. The smallest search unit is the library; collections only classify data and do not affect search results. Vector retrieval uses the PostgresSQL PG Vector plugin with an HNSW index. MongoDB stores the original data, and the indexes field in the dataset.datas table records the corresponding vector IDs, so one set of data can map to multiple vectors. During retrieval, vectors are recalled first, then the vector ID is used to find the original content in MongoDB; content mapping to the same original data is merged, and the vector score takes the highest value.

Segmentation should keep meaning complete and singular. A leaner index raises precision but sacrifices some retrieval range, and one chunk can carry multiple index entries. Hybrid retrieval merges semantic and full-text results through RRF. A ReRank model produces a score from 0 to 1. Minimum relevance applies only under semantic retrieval or result reranking; it is a filter threshold and does not perform permission or entity isolation. The citation limit is controlled by tokens, which differs from top k. Retrieval term quality and data quality both affect results.

Configuration and implementation checks

The following centers on a hypothetical drill sample.

Hypothetical drill sample: a foreign trade enterprise finance staff member prepares a March 2025 rebate filing material handover request. The source text reads: "Customs declaration number A-2025-0312, item number 1, quantity 500 pieces, purchase invoice number B-2025-0088, amount 42,000 yuan, receipt voucher date March 20, 2025, receipt amount 6,000 US dollars. The above materials have been uploaded to the knowledge base, pending determination: whether the purchase invoice for this export shipment matches item number 1 on the customs declaration." A draft sentence reads: "This shipment has completed rebate filing matching." The pending determination request reads: "Please confirm the correspondence between purchase invoice B-2025-0088 and item number 1 on customs declaration A-2025-0312."

Configuration itemRelevant setting or check on this pageRelation to the sample
Search modeSemantic, full-text, or hybrid retrievalNumber-type queries suit full-text or hybrid retrieval
Citation limitCaps cited content by tokensThe sample has many fields, so truncation needs checking
Minimum relevanceValue from 0 to 1, effective only under semantic retrieval or rerankingHypothetical starting value 0.3, chosen to reduce unrelated fragments, compared against the recall range when no value is set
Question optimizationCoreference resolution and question expansion before retrievalThe sample question contains numbers, so over-optimization may drift from the original terms
Result rerankingReRank model reorders results, score from 0 to 1Model availability must be confirmed and enabled per settings
Data and indexesCheck original data and indexes field statusA successful upload does not equal an updated retrieval index

Three common errors

  1. Treating a successful upload as an updated retrieval index. The input is the sample upload action, the comparison is against actual training and index status, and the observable result is whether the material content can be retrieved. Without checking training status, whether this material is retrievable remains unknown.
  2. Treating minimum relevance as a permission or entity filter. The input is the declaration number and invoice number in the sample, the comparison is whether returned content belongs to this enterprise's materials, and the observable result is whether returned content includes records of another entity. A relevance score does not perform permission isolation.
  3. Treating the pending determination request as approved or completed. The input is the handover request in the sample, the comparison is against any signature or approval record, and the observable result is that the request status remains pending review. Pending review does not show a lack of operating permission, and it does not constitute a completed match.

How to verify the setup

  1. Against the sample source text, enter "correspondence between purchase invoice B-2025-0088 and item number 1 on customs declaration A-2025-0312." Compare whether the retrieved content contains that invoice number and declaration number. The condition is met when the returned content points back to the source text and the fields are not split apart. If either number is missing from the returned content, record it as a miss; a first-position hit is not guaranteed.
  2. Against the draft sentence "This shipment has completed rebate filing matching," enter that sentence and the sample source text. Compare whether the draft claims matching is complete. The source text states only that materials were uploaded and that a determination is pending; it does not state that matching is complete. The draft sentence is unsupported.
  3. Against the receipt voucher date and amount in the sample, enter "receipt of 6,000 US dollars on March 20, 2025." Compare whether the returned content contains that date and amount. If the fields agree, record a hit; if only related-stage evidence is returned, record it as pending verification. An empty result can be checked against a downstream design using the explicit paper input []; this does not claim that a fabricated rule search must return []. Libraries across different vector models cannot be associated together; check identifiers first and exclude those that do not conform, rather than running a cross-model search to compare missed recalls.