What the documents look like
Cross-border platform settlement and foreign exchange work concerns the collection of funds from completed orders. Fraud and chargeback handling belongs to cross-border payment risk control and sits outside this scope. The main data sources are the platform settlement center, bank statements, payment institution back office and ERP orders. The recurring materials are platform settlement statements, exchange rate tables, service fee invoices and receipt reconciliation tables. The typical roles involved are cross-border seller finance staff, tax accountants and platform operations staff. Data updates on a weekly or monthly basis. Errors here lead to incorrect profit calculation, tax filing deviations and cash shortfalls.
This page addresses only document parsing and chunking within contract and transaction material comparison. Once materials enter the knowledge base, the parsed result needs to retain a document identity and version that can point back to the source text. Segmentation needs to follow the structure of each specific material, so that conditions, explanations and the content they constrain are not split apart. Original data and retrieval indexes need to be kept distinct, and one group of original data can correspond to multiple indexes. The retrieval step does not perform authorization decisions. Which materials, operations and requests sit in which authorization state during an operations handover needs to be checked separately.
Constraints at the document chunking step
Settlement statements, exchange rate tables, service fee invoices and reconciliation tables differ substantially in structure, so chunking needs to follow each structure. FastGPT uses the PostgresSQL PG Vector plugin as its vector retriever, with HNSW as the index. PostgresSQL is used only for vector retrieval, while MongoDB stores other data. In the MongoDB dataset.datas table, information about the original vector data is stored, and an indexes field records the corresponding vector IDs. That field is an array, so one group of data can correspond to multiple vectors.
During retrieval, vectors are recalled first, then the vector IDs are used to find the original data content in MongoDB. If they correspond to the same group of original data, the results are merged and the vector score takes the highest value. Multi-vector mapping balances content length against semantic richness. Multiple vectors can be added to one longer piece of text, and if any one of those vectors is recalled, that data is also recalled. Full-text retrieval uses BM25 when the vector store is Milvus (≥ 2.5.16), with vectors and full text stored together in the single modeldata_v2 table. Other vector stores use MongoDB $text with jieba tokenization. Hybrid retrieval merges the two search results through the RRF formula. After reranking, a 0-1 score is produced that can be used for filtering. The citation limit controls the amount of cited content by tokens, and the minimum relevance score takes effect only in semantic retrieval or when result reranking is used.
Configuration and implementation checks
The configuration below is built around a hypothetical paper exercise sample. The sample source text is: "Party A commissions Party B to carry out cross-border platform settlement statement reconciliation, with a service period from 1 January 2024 to 31 March 2024. Party B shall complete the reconciliation within 5 working days of receiving the settlement statement and issue a reconciliation note. This commission does not include exchange rate difference appeals." The draft sentence under review is: "Party B is responsible for handling all exchange rate difference appeals for the first quarter of 2024." This draft sentence exceeds the scope of the commission.
| Configuration item | Setting or check content | Relation to this sample |
|---|---|---|
| Chunking basis | Segment by the structure of the settlement statement, exchange rate table, invoice and reconciliation table | Preserves the full meaning of the service period and the exclusion clause |
| Multi-vector mapping | One group of original data can correspond to multiple vector IDs | Longer commission text can be split into several index groups |
| Retrieval mode | Semantic retrieval, full-text retrieval or hybrid retrieval | Check terms, periods and identifiers separately |
| Citation limit | Controls the amount of cited content by tokens | The starting point for this hypothetical exercise is set to a token amount comparable to one settlement statement paragraph; the reason is to observe whether segmentation stays complete, and the comparison object is the cited content under different settings |
| Minimum relevance score | A 0-1 value, effective only in semantic retrieval or result reranking | The starting point for this hypothetical exercise is set to a middle value, comparing candidate content under different thresholds |
| Post-update review | After materials change, check the actual training and index state | A successful upload does not mean retrieval has been updated |
Three common errors
- Treating "all exchange rate difference appeals" in the draft sentence as part of the commission. The sample source text states "this commission does not include exchange rate difference appeals." The draft sentence and the source text take mutually exclusive values on the service scope field, which forms a contradiction. The error is failing to compare mutually exclusive values on the same field.
- Treating a successful upload as retrieval already updated. After the sample material changes, the actual training and index state need to be checked. The upload action itself does not mean the index has been updated. The error is conflating the upload action with the index state.
- Using the minimum relevance score to filter out unrelated business records. The minimum relevance score is a filtering threshold and does not perform permission or entity isolation. In the sample, judging the commission scope and the appeal exclusion clause depends on comparing the source text; retrieval settings cannot substitute for that.
How to verify the setup
- Input the sample source text and the draft sentence, and compare the values on the service scope field. The source text states "this commission does not include exchange rate difference appeals," and the draft sentence states "responsible for handling all exchange rate difference appeals for the first quarter of 2024." The values on the same field are mutually exclusive, and the observed result is that a contradiction holds. The expectation is that this contradiction is identified; no claim is made that testing has been performed.
- Input the sample source text and compare the commission period against the period in the draft sentence. The source period is 1 January 2024 to 31 March 2024, and the draft sentence period is the first quarter of 2024. The periods are consistent while the service scope is not, and the observed result is a consistent period alongside a contradictory scope, which need to be recorded separately.
- Input an empty-result scenario, using the paper input [] to check the downstream design. Observe how the downstream handles an empty citation; no claim is made that a fictional rule retrieval will necessarily return []. If the retrieval result is empty, record the gap and do not infer a denial or a conflict.
This feature has been checked against public technical facts for identifying relevant content in documents; the body is written independently and does not require copying a fixed five-row table: original material check, segmentation completeness, data and index, sample retrieval, and post-update review. During an operations handover, which materials, operations and requests sit in which authorization state cannot be treated as authorization execution through retrieval or a form.