Returned-goods inspections: document chunking for document comparison

Review document chunking for document comparison in Returned-goods inspections. Check input mappings, source evidence and failure handling before use.

What the documents look like

Returned-goods inbound inspection handles reverse parcels and product grading. It does not handle outbound picking and packing for new orders. The data comes from the WMS returns module, platform after-sales records, carrier return parcels and the inspection bench, and it updates per item and per day. Errors here can put defective goods back on sale, trigger refund disputes and contaminate inventory.

Contract and transaction material comparison at this step works across four document types at once: the return inbound note, inspection photos, the grade determination table and the resale listing sheet. These materials frequently disagree on the responsible party, the batch and the status description. The quality of document parsing and chunking decides whether later retrieval can gather the documents of one return event into a single checkable group. When chunking splits material apart, a condition and the conclusion it constrains end up in separate places.

The materials contain precise fields such as identifiers, models and grade codes, and they also contain natural-language status statements. Semantic retrieval relies on vector distance and suits natural-language questions. Full-text retrieval relies on keyword hits and suits identifiers and proper nouns. Hybrid retrieval merges multiple result paths through RRF and then applies ReRank for a second ordering. Image retrieval requires an image input and model capability, and an index that was not built at ingestion time cannot be retrieved. One set of source data can map to multiple indexes, and vectors and full text can share the single modeldata_v2 table. Retrieval is a recall action; it does not perform authorization judgment and does not isolate results by business entity or permission.

Constraints at the document chunking step

A hypothetical paper exercise sample is used here. The source material offered for comparison reads: "Return inbound note R-2024-0517, party: after-sales warehouse A, object: 12 items of batch B-0912, status is pending inspection, date scope: 2024-05-17 only." A draft sentence awaiting judgment reads: "This batch of goods has completed grade determination and is approved for resale listing." The source states no grade determination result and no resale approval, so the draft's "has completed" and "approved" lack supporting fields.

Three constraints follow from the material. First, precise fields and natural-language descriptions need different retrieval paths, so the identifier R-2024-0517 is better served by full-text or hybrid retrieval, while a question about current status is better served by semantic retrieval. Second, a chunk must keep a condition together with the content it constrains; if the grade table's condition and its result land in different chunks, retrieval returns only a fragment. Third, image retrieval depends on an index built at ingestion time, so inspection photos must be checked for a generated image description index or image vector index. A relevance score is not a category, entity or permission filter, and a similarity setting does not exclude unrelated businesses or unauthorized records.

Configuration and implementation checks

Configuration itemSetting or check relevant to this pageRelation to the sample
Search modeSemantic, full-text or hybrid retrieval can be selectedIdentifier R-2024-0517 is better served by full-text or hybrid
Result rerankingA ReRank model must exist and be enabled by configurationReorders status descriptions when candidates are numerous
Reference limitControls the referenced content per search in tokensHypothetical trial starting value 3000 tokens, chosen because the sample material is short, then adjusted after comparison with the interface value
Minimum relevanceA 0-1 value, effective only under semantic retrieval or result rerankingFilters low-relevance fragments; does not exclude unrelated businesses
Question optimizationPerforms reference resolution and question expansion before retrievalCan be enabled for multi-turn questions about batch status
Image indexAn image description index or image vector index must be built at ingestionInspection photos must be confirmed to have a corresponding index

The reference limit uses the documented unit of tokens, not a guessed item count. Minimum relevance is a filter threshold, not a final ordering rule. Question optimization adds one model call before retrieval and usually improves multi-turn retrieval while increasing elapsed time. Hybrid retrieval merges paths through RRF, which is a fusion process rather than a switch. The optional paths in the overall retrieval flow are not all executed on every request: image retrieval requires a corresponding image input and model capability, and reranking requires a model enabled by configuration. Libraries built on different vector models cannot be associated together; identifiers must be checked first and non-matching libraries excluded.

Three common errors

  1. Treating a retrieval hit as an authorization conclusion. Input "can R-2024-0517 be resold", retrieval returns the pending-inspection record, and the output states "resale approved". This treats a recall result as an approval fact. The check compares the source status field with the draft's "has completed" and "approved" for the same party, the same period and the same field, and records the evidence gap when they do not match.
  2. Splitting a condition from its conclusion during chunking. The grade determination table's condition and its result are placed in different data blocks, and retrieval recalls only the result fragment. The check inspects whether one chunk retains the condition together with the content it constrains, and observes whether the recalled fragment is complete.
  3. Associating libraries across different vector models. Libraries built on different vector models cannot be associated together, and forcing a comparison produces unsupported results. The check verifies the identifiers, excludes non-matching libraries and records the actual observation, without inferring missed recall or redundancy.

How to verify the setup

  1. Input the hypothetical source text "Return inbound note R-2024-0517, party: after-sales warehouse A, object: 12 items of batch B-0912, status is pending inspection, date scope: 2024-05-17 only", then compare "has completed" and "approved" in the draft sentence "This batch of goods has completed grade determination and is approved for resale listing" against the source status field. The source states only "pending inspection" and carries no grade determination or resale approval, so the draft sentence is unsupported and the evidence gap must be recorded.
  2. Input the identifier "R-2024-0517" and the natural-language question "what is the current status of this return", then observe separately whether the full-text and semantic recalled fragments contain the party, the object, the status and the date scope. If a fragment lacks the status or the date, record incomplete chunking. A first-position hit is not guaranteed.
  3. Input an image query and a text query, and check whether the inspection photo has an image description index or an image vector index built at ingestion. If no index was built, record that this path is unavailable, without claiming retrieval necessarily returns an empty result.

Fields not stated, or supported only by related-stage evidence, are recorded as pending verification. A pending review does not demonstrate a lack of operating permission. Signing, reaching cooperation and contract effectiveness are three distinct facts. The same-vector-model requirement for associated retrieval libraries does not extend to external systems. Upload success is not the same as retrieval having been updated, and the actual training and index state must be checked after a material change.