What the documents look like
Wholesale stall trading is scattered and depends on on-site bargaining and consignment shipping. The daily documents are purchase sheets, handwritten sales slips, stall lease contracts, and payment receipts. These materials are mostly paper or photographed copies, and the same transaction can carry different field names and writing habits across a contract, a sales slip, and a receipt.
The comparison task for contracts and transaction materials asks whether the same party, the same period, and the same field hold values that support each other. The retrieval step recalls the original passages connected to the field under review, so a person can compare them item by item. Scattered materials mean retrieval must cover many phrasings. Handwritten and photographed materials mean the recalled content can be empty or incomplete. The output of the knowledge base search node is an array of references, and its length can be 0, which means the output path still runs even when nothing is found.
Constraints at the retrieval step
The knowledge base search node can associate one or more knowledge bases that use the same vector model. Bases with different vector models cannot be associated together. The vector model identifier should be checked first, and non-matching bases excluded. Retrieval runs against the whole base; a collection is only a way to classify data and does not affect search results.
Semantic retrieval depends on vector distance. Full-text retrieval depends on keyword hits. Hybrid retrieval uses both and merges the two result sets through RRF. RRF is a fusion process inside hybrid retrieval, not a switch that can be turned on. The minimum relevance value is a filter threshold and takes effect only in semantic retrieval or when result reranking is used. It does not perform permission or entity isolation, and retrieval itself is not authorization. Image retrieval needs an image input and the corresponding model capability. Reranking needs a rerank model and must be enabled in the settings. The optional paths shown in the overall retrieval diagram do not mean every request executes all of them. The reference cap is measured in tokens, and the returned reference array can have a length of 0.
Configuration and implementation checks
The settings below are built around a hypothetical drill sample. Sample background: a stall owner and a purchaser have three materials for one batch of goods, a stall lease contract, a handwritten sales slip, and a payment receipt. The contract text is "Party A leases stall No. 3 to Party B, term from 1 March 2024 to 31 August 2024, monthly rent 2000 yuan." The sales slip text is "5 March, A goods 50 pieces shipped, unit price 12 yuan, total 600 yuan, freight borne by the purchaser." The receipt text is "Received purchaser payment 600 yuan today, corresponding to A goods of 5 March." The draft sentence to be judged is "The purchaser settled all payment in full on 5 March." That sentence covers only the single 5 March A goods transaction. The lease term and rent fields do not appear in the receipt and remain unsupported.
| Configuration item | Hypothetical starting point for this drill | Reason for the choice and comparison method |
|---|---|---|
| Associated knowledge base | One base containing the three materials above | Check each base's vector model identifier first, exclude different models, and do not run cross-model retrieval |
| Search mode | Hybrid retrieval | The query mixes natural language with exact terms such as "A goods" and "600 yuan"; compare semantic, full-text, and hybrid recall |
| Reference cap | 800 tokens as the hypothetical starting point for this drill | Use one full receipt passage as the reference for completeness, and compare against 400 and 1200 for truncation |
| Minimum relevance | 0.3 as the hypothetical starting point for this drill | Label relevant and irrelevant samples first, then compare against 0.2 and 0.4 for false recalls and misses |
| Question optimization | Enabled | Used for coreference resolution and question expansion; compare the original and optimized question and check whether the party was changed |
| Result reranking | Enabled | Reorders text when candidates are numerous; compare ranking positions before and after enabling |
Three common errors
- Treating a retrieval hit as authorization or as a verification conclusion. Incorrect behavior: inferring from a retrieved receipt that payment was settled or that the purchaser was authorized. Check: input the draft sentence and the receipt text, then compare whether the receipt states "all payment" and "settled in full." The receipt only says "received 600 yuan, corresponding to A goods of 5 March," so the claim of settling all payment is unsupported.
- Treating minimum relevance as an entity or permission filter. Incorrect behavior: assuming a higher relevance value excludes records of unrelated purchasers. Check: input the same question and compare the returned original passages under different thresholds. The threshold changes only the relevance filtering result and does not change the accessible range; permission requires a separate system implementation.
- Treating an absent field as a contradiction. Incorrect behavior: deciding the contract and the receipt conflict because the receipt omits the lease term. Check: input the contract text and the receipt text, then compare whether the lease term field appears in both materials. The receipt does not state the lease term, so it should be recorded as unsupported or pending verification, not as a denial or a conflict.
How to verify the setup
- Input the contract, sales slip, and receipt texts above together with the draft sentence, then compare whether the party, date, amount, and goods name in the draft sentence have corresponding fields in the originals. The receipt states "purchaser," "5 March," "600 yuan," and "A goods." The phrase "settled all payment in full" has no corresponding wording in the originals. When this condition holds, the sentence should be judged unsupported, and the evidence gap retained.
- Input a query that does not contain the materials above, for example "stall rent for September 2024," and compare the length of the returned references. If the returned reference length is 0, the output path still runs. Use a clearly labeled paper input of an empty array to check the downstream design, and do not claim that retrieval is guaranteed to return empty.
- Input the same question once with semantic retrieval and once with full-text retrieval, and compare the hit positions of exact terms such as "A goods" and "600 yuan" against the recall of the natural language phrasing. Then enable reranking and compare the ranking changes. For bases with different vector models, check the identifiers first and exclude non-matching ones; do not run cross-model retrieval to compare missed recalls.