What the documents look like
Settlement between a supermarket and a supplier rests on a purchase-sale or consignment relationship. On-site operation is not a necessary condition. Four document types carry the account relationship: purchase contracts, delivery acceptance notes, rebate agreements, and statements of account. They arrive from ERP purchasing, supplier portals, POS sales, and finance systems, and they refresh weekly or monthly.
Each document type holds a distinct role. The contract sets the deduction rate and the settlement basis. The acceptance note records the quantity actually received. The rebate agreement sets the conditions for returning value. The statement summarizes the transactions of a period. For comparison to be possible at all, the counterparties, the object, the period, and the fields must sit inside the same material or inside a set of materials that can be checked against one another. The document chunking step exists to keep identity, version, and constraint relationships retrievable, so that each retrieved fragment can be traced back to its source text.
Constraints at the document chunking step
Chunking must follow the structure of the material. Contract clauses, acceptance line items, rebate condition descriptions, and statement summary rows each carry independent meaning. When a condition is separated from the quantity, deduction rate, or period it constrains, the retrieved fragment cannot support a comparison.
Original data and retrieval indexes are two layers. One group of original data can map to multiple indexes, and adding indexes does not change the original data content. Retrieval operates on the library; a collection only classifies data and does not affect search results. Semantic retrieval relies on vector similarity, full-text retrieval relies on keyword hits, hybrid retrieval fuses multiple result paths through RRF, and reranking requires a model and must be enabled according to settings. Similarity and minimum relevance are filtering and ordering parameters. They do not judge permissions, counterparties, or authorization status. A retrieval result is not an authorization, and it does not show that a document has taken effect.
Hypothetical paper exercise. Material one, purchase contract excerpt: Party A is a supermarket, Party B is a food supplier, the contract period runs from January 2025 to December 2025, the settlement method is purchase and sale, and the payment term is 30 days. Material two, delivery acceptance note excerpt: acceptance date 12 March 2025, received quantity 480 cases, acceptance status accepted. Material three, statement excerpt: statement period March 2025, quantity payable for the period 500 cases, the discrepancy explanation field is blank. Draft sentence to be assessed: "The March 2025 statement quantity matches the accepted quantity, and the discrepancy has been fully handled." The sentence concerns the same period and the same quantity field. The acceptance note states 480 cases, the statement states 500 cases, and the discrepancy explanation is unfilled.
Configuration and implementation checks
| Configuration or check item | Purpose on this page | Basis and boundary |
|---|---|---|
| Chunking method | Form separate chunks for contract clauses, acceptance line items, rebate conditions, and statement summary rows | Official text states that segmentation affects precision and does not give a fixed chunk length |
| Index to original data mapping | Check whether one group of original data maps to multiple indexes | Official text states that indexes is an array and one group of data can correspond to multiple vectors |
| Search mode | Use full-text retrieval for numbers and proper nouns, semantic or hybrid retrieval for natural-language questions | Official text describes the applicable scenarios of each mode and does not assign a required value for this page |
| Minimum relevance | Filter low-relevance candidates; applies only under semantic retrieval or reranking | Official text describes a 0-1 value; this page sets no specific value |
| Reference limit | Control the total tokens referenced in one search | Official text states the unit is tokens; this page sets no specific value |
| Post-update check | Check training and index status after material changes | Official text states that a successful upload does not mean retrieval is updated |
Three common errors
- Writing a quantity difference between statement and acceptance note as already handled. Input: the three material excerpts above and the draft sentence. Comparison object: the same quantity field in the same period. The acceptance note shows 480 cases, the statement shows 500 cases, and the discrepancy explanation is blank. Observable result: the draft sentence claims agreement and completed handling, which does not match the recorded materials, so the sentence must be changed to a discrepancy pending verification.
- Treating a retrieval hit as an authorization decision. Input: one retrieval result aimed at contract clauses. Comparison object: the returned content and any authorization status field. Observable result: retrieval returns text fragments only, the materials do not state a signing or effective status, and no conclusion follows that the contract has taken effect or that settlement has been approved.
- Merging libraries with different vector models to compare recall. Input: two libraries ingested separately with different vector model identifiers. Comparison object: the library identifier and the model identifier. Observable result: the identifiers differ, so the identifiers must be checked first and non-matching items excluded, with the actual observation recorded and no inference drawn about combined recall behavior.
How to verify the setup
- Chunk completeness check. Input: the purchase contract excerpt and the acceptance note excerpt above. Comparison object: whether each chunk after splitting retains counterparty, object, period, and status. Observable result: the contract chunk contains the settlement method and payment term, the acceptance chunk contains the acceptance date, quantity, and acceptance status, and no condition is separated from what it constrains. If a chunk holds only a quantity without a date or status, the condition is not met.
- Draft sentence assessment. Input: materials one through three and the draft sentence. Comparison object: the period, quantity, and handling status in the draft sentence against the recorded materials. Observable result: the claimed agreement does not match the recorded 480 cases, 500 cases, and blank discrepancy explanation, so the sentence is unsupported and the discrepancy remains pending verification. If a discrepancy handling record for the same period is later supplied, the comparison is repeated against the new record.
- Empty result and update status check. Input: an explicit manual empty retrieval list. Comparison object: how the downstream design handles an empty result, and the actual training and index status. Observable result: the empty result is recorded as a gap, and no conclusion follows that the rule does not exist. After a material change, the actual training and index status is checked, and a successful upload is not treated as evidence that retrieval has been updated.