Channel receivables: document chunking for document comparison

Review document chunking for document comparison in Channel receivables. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

Channel receivables collection happens after credit sales. The materials revolve around three lines: credit granting, shipment, and cash recovery. The aging schedule of receivables updates weekly or monthly and records the distributor, the aging interval, and the outstanding amount. A credit agreement states the limit, the payment term, and the effective scope. A shipment freeze notice corresponds to an over-limit situation. A dunning letter is the carrier of a communication action. Comparing contracts with transaction materials requires placing the sales contract, the credit agreement, orders, and bank receipts under the same entity, the same period, and the same field for checking. Contradiction exists only when values in the same field are mutually exclusive. A field that is not stated, or evidence that covers only a related stage, is recorded as pending verification.

For chunking, this means each chunk must retain the entity, the object, the amount, the period, and the status. A conditional clause and the body text it constrains cannot be split apart. In the documented storage design, original data and retrieval indexes are separate: one set of original data in the MongoDB dataset.datas table can map to multiple vectors through the indexes field, which holds an array of vector IDs. Semantic retrieval relies on vector distance, full-text retrieval relies on keyword hits, hybrid retrieval merges multiple result paths through RRF, and ReRank produces a score from 0 to 1. The minimum relevance value takes effect only in semantic retrieval or when result reranking is used; it is a filtering threshold and does not perform permission or entity isolation. The citation limit is measured in tokens. Image retrieval requires image input and corresponding model capability, and reranking requires a model and must be enabled according to settings. The optional paths shown in the overall retrieval flow do not mean every request executes all of them.

Constraints at the document chunking step

A hypothetical drill sample is used here for illustration only. A brand finance team holds an excerpt of a Credit Agreement whose text reads: "Party A grants Party B a credit sales limit of RMB 800,000, with a payment term of 60 days, effective from January 1, 2024 to December 31, 2024." The same batch contains an order excerpt: "Party B submitted an order on March 10, 2024, in the amount of RMB 950,000, with shipment status pending shipment." The draft sentence to be assessed is: "This distributor's current order has exceeded the credit limit, and a shipment freeze should be executed." Checking requires confirming whether the agreement entity and the order entity are the same, whether the order date falls within the effective period, whether the limit and the order amount use the same field definition, and whether a shipment freeze already has an authorizing document.

Chunking must keep the entity, amount, period, and status inside one retrievable unit so that these comparisons remain possible. If a chunk splits the effective period away from the limit, or splits the order date away from the order amount, the comparison cannot be performed on the retrieved content. The credit agreement excerpt states the limit, the payment term, and the effective period. It does not state a freeze authorization clause. The draft sentence therefore reaches beyond what the source text supports, and the freeze conclusion remains unsupported rather than confirmed or denied. A pending review is not an approval, and a submitted draft is not an executed action.

Configuration and implementation checks

Configuration itemSetting on this pageBasis and checking method
Retrieval modeHybrid retrievalThe official document states that hybrid retrieval uses vector and full-text retrieval together and merges results through RRF, which suits both identifiers and natural language
Minimum relevanceHypothetical trial starting value 0.4 for this exerciseThis is a 0-1 value effective only in semantic retrieval or reranking; compare it against the score distribution observed in sample retrieval, then adjust
Citation limitSet in tokens, with no fixed numberThe official document controls citation volume by tokens; determine it after observing actual chunk lengths
Question optimizationDecide whether to enable it based on actual resultsThe official document states it adds one model call, improves retrieval in continuous conversations, and increases elapsed time
Result rerankingRequires a model and must be enabled according to settingsThe official document states reranking reorders candidate text and produces a 0-1 score
Training status checkAfter changes, check actual training and index statusA successful upload does not mean retrieval has updated; verify whether the index was generated

Three common errors

  1. Treating the minimum relevance value as a permission or entity filter. This value is a filtering threshold; it does not exclude unrelated businesses or unauthorized records, and retrieval itself is not authorization. Check: submit the same question, compare the business ownership field of returned content, and observe whether records of a non-target entity enter the candidate set.
  2. Treating a pending review or a submitted item as approved. If the draft sentence "a shipment freeze should be executed" has only a draft or pending-review status, the freeze cannot be treated as executed. Check: review the status field in the approval record and compare its value against "approved."
  3. Treating a successful upload as an updated index. If training and index status are not checked after a material change, retrieval may still return old content. Check: run a sample retrieval after the change and compare the returned content against the field values in the new source text.

How to verify the setup

  • Verification one: input the credit agreement excerpt and the order excerpt from the hypothetical sample, and compare three fields: entity, order date against the effective period, and limit against order amount. If the entity matches, the date falls within the effective period, and the amount uses the same field definition, the comparison result between limit and order amount can support a preliminary judgment that the limit is exceeded. If any field is missing, record it as pending verification.
  • Verification two: input the draft sentence "This distributor's current order has exceeded the credit limit, and a shipment freeze should be executed," and compare its conclusion against the range the source text can support. The source text states only the limit, the payment term, and the effective period, and does not state a freeze authorization clause, so "a shipment freeze should be executed" is unsupported. If the downstream design needs an empty-result path, use the explicit paper input [] to check the return structure, without claiming that a fictional rule necessarily returns an empty array.
  • Verification three: retrieve with the term "credit limit," with identifier-type fields, and with a natural language question, and compare the original-data identity and version of the returned content. If the same set of original data is merged after multiple recall paths, the score takes the highest value. If the returned content does not match the new source text, record it as index pending update. Libraries built on different vector models cannot be associated together; check the model identifier first, exclude those that do not match, and record the actual observation.