B2B marketplaces: retrieval for document comparison

Review retrieval for document comparison in B2B marketplaces. Check document scope, failure paths and source evidence through controlled tests.

What the documents look like

B2B marketplace matching involves four recurring document types: enterprise certification materials, inquiry and quotation sheets, electronic contracts, and platform settlement statements. These materials come from the platform itself, the National Enterprise Credit Information Publicity System, payment records, and logistics tracking. Compared with wholesale market stall transactions, this category relies more on online certification and electronic contracts, and does not depend on on-site stall verification. Document comparison for this task requires placing one entity's certification information, quotation records, contract text, and settlement data within the same retrieval scope. The materials are spread across multiple sources, and the choice of retrieval scope directly affects comparison results. The stated update frequency is daily and per order; retrieval uses content already trained in the current library.

A document comparison request may arrive as a drafted sentence or a handover request that needs to be checked against source text. The retrieval layer returns reference content; it does not decide whether a contract took effect, whether settlement is complete, or whether an entity is authorized.

Constraints at the retrieval step

The knowledge base search node can associate one or more libraries that use the same vector model. Libraries using different vector models cannot be associated together. The smallest search unit is the library; a collection is used only for classification management and does not affect search results.

Semantic retrieval relies on vector distance. Full-text retrieval relies on keyword matching and suits identifiers, model numbers, proper nouns, and error codes. Hybrid retrieval uses both semantic and full-text recall and merges the two result sets through RRF. Rerank performs a second ordering of candidate text and produces a 0–1 score. The minimum relevance value takes effect only under semantic retrieval or when result reranking is used; it is a filtering threshold and does not perform permission or entity isolation. Reference content is output as an array and its length can be 0, so the output path continues even when nothing is found.

Image retrieval requires corresponding image input and model capability. Reranking requires a model and must be enabled according to settings. Both are optional paths and are not executed on every request. Retrieval itself is not authorization. Forms collect values; business verification, approval, database writes, and external synchronization each require their own downstream implementation.

Hypothetical paper exercise sample: a platform operations staff member prepares to check one electronic contract against its corresponding settlement statement. The trained source text in the knowledge base reads: "Party A: XX Supply Chain Management Co., Ltd.; Contract No.: HYP-2024-0317; Signing date: March 17, 2024; Contract subject matter: one batch of office supplies; Settlement method: monthly settlement, 30 days." A second source text reads: "Platform settlement statement No.: JS-2024-0402; Corresponding contract No.: HYP-2024-0317; Settlement amount: RMB 58,000; Settlement status is pending review." The drafted sentence to be assessed is: "The contract has taken effect and settlement is complete." The verification request is: "Please confirm whether the signing status and settlement status for Contract No. HYP-2024-0317 are consistent."

Configuration and implementation checks

Configuration itemHypothetical starting value for this exerciseReason and comparison method
Associated librariesAssociate only the single same-vector-model library containing the above contract and settlement statementFirst check whether the library identifier and vector model identifier match; exclude libraries with different vector models
Search modeHybrid retrievalThe contract number is an exact query and the subject matter description is a semantic query; compare the two result paths after RRF merging
Reference limitSet to 800 tokensThis value is a starting point for this exercise, estimated from the combined length of the two source texts; compare completeness against 400 and 1200 tokens
Minimum relevanceSet to 0.3This value is a starting point for this exercise; first label relevant and irrelevant samples, then compare against 0.2 and 0.4
Question optimizationEnabledThe drafted sentence contains references; compare the original question with the optimized question and check whether the entity was altered
Result rerankingEnabledWhen candidates are numerous, reorder text and filter by rerank score; compare ordering against the disabled state

Three common errors

  1. Treating minimum relevance as a permission or entity filter. Minimum relevance is a filtering threshold that takes effect only under semantic retrieval or result reranking, and it does not exclude unrelated enterprises or unauthorized records. Check method: input the above contract number and the contract number of an unrelated enterprise, compare whether both are recalled, and observe whether threshold changes affect the return of unrelated records.
  2. Treating pending review status as completed settlement. The settlement statement source text states "Settlement status is pending review," while the drafted sentence says "settlement is complete." The two values are mutually exclusive on the same field. Check method: input the settlement statement source text and the drafted sentence, compare the settlement status field, and observe whether the drafted sentence contradicts the source text.
  3. Treating the signing date as contract effectiveness. The source text states only a signing date and does not state an effectiveness clause or effectiveness status. The drafted sentence "The contract has taken effect" is unsupported. Check method: input the contract source text and the drafted sentence, compare whether an effectiveness field exists, and observe whether the source text provides a basis for effectiveness.

How to verify the setup

  1. Contract number retrieval: input "HYP-2024-0317," compare whether the returned content includes the contract source text corresponding to that number, and observe whether the contract number, signing date, and settlement method fields appear in the reference content. If the returned content does not include that number, record it as a miss and check whether the library has completed training.
  2. Settlement status comparison: input the settlement statement source text and the drafted sentence "The contract has taken effect and settlement is complete," compare the settlement status field, and observe whether the drafted sentence contradicts "pending review." If the source text does not state an effectiveness field, record it as unsupported and retain the evidence gap.
  3. Empty-result handling: input the explicit paper input [] and check whether the downstream design handles a reference content length of 0. Do not claim that a fictional rule retrieval necessarily returns []; record only the output state actually observed.