What the documents look like
Wholesale stall trading runs on purchase notes, handwritten sales slips, stall lease contracts and payment receipts. These materials exist mostly on paper and as photographed copies, and their fields are frequently completed by hand. When a buyer asks about product selection, the question often arrives as a colloquial trade name, a size, or a voice transcript, without a complete model number. Such questions sit alongside stall inventory, same-day market conditions and shipping arrangements, so the retrieval wording tends to be weak.
The materials update daily and per order, which means a purchase note and a sales slip can both appear several times within one day. The retrieval scope needs to cover these short-cycle documents. This page addresses only knowledge base retrieval and recall inside product information and selection questions. It does not extend to price negotiation, shipping arrangements or payment collection.
The knowledge base is made up of libraries, collections and data. The smallest search unit is the library; collections serve only to classify and manage data and do not affect search results. A search node can be associated with one or more knowledge bases that use the same vector model. Libraries using different vector models cannot be associated together; the vector model identifier must be checked first and non-matching libraries excluded. A cross-model search is not run in order to compare missed recalls.
The retrieval path includes semantic retrieval, full-text retrieval, hybrid retrieval, image retrieval, question optimization and reranking. These are combinable capabilities, and the optional paths shown in the overall flow diagram do not mean every request executes all of them. Image retrieval requires a corresponding image input and model capability. Reranking requires the model to be present and enabled according to settings. Hybrid retrieval merges multiple result paths through RRF; RRF is a merging process and is not a standalone switch. Minimum relevance takes effect only during semantic retrieval or when result reranking is used. It is a filtering threshold and does not perform permission or entity isolation, and it does not exclude unrelated businesses or unauthorized records.
The reference limit is measured in tokens. Quoted content is output as an array whose length can be 0, and the empty-result path still completes.
Constraints at the retrieval step
Hypothetical drill sample: a stall retains a handwritten sales slip reading "March 12, stall A sold 200 woven bags of size 40×60 to buyer Li, unit price 1.2 yuan, payment outstanding, shipping slip number blank." A separate stall lease contract reads "stall A rents stall 17 in zone B, lease term January 1, 2025 to December 31, 2025." The draft sentence to be judged is "the buyer has settled the March 12 payment." The comparison subject is the same party, the same period and the same field: the sales slip states the payment is outstanding, while the draft sentence states it is settled. The two values are mutually exclusive in the same field, which constitutes a contradiction. The lease contract has no bearing on whether the payment is settled and provides neither support nor denial.
Configuration and implementation checks
| Configuration item | Relevance on this page | How to check |
|---|---|---|
| Associated knowledge bases | One or more knowledge bases using the same vector model can be associated | Check the vector model identifier and exclude non-matching ones |
| Search mode | Compare semantic, full-text and hybrid retrieval against test questions | Test separately with the size and slip-number questions in the sample |
| Reference limit | Measured in tokens; controls the amount of quoted content per search | Test with actual materials of different lengths to see whether content stays complete |
| Minimum relevance | Takes effect only during semantic retrieval or result reranking | Label relevant and irrelevant samples before adjusting the threshold |
| Question optimization | Used for coreference resolution and question expansion | Compare the original and optimized question, checking whether the subject was altered |
| Result reranking | Requires the model and must be enabled according to settings | Check the rerank score and changes in candidate ordering |
Hypothetical trial starting point for this page: set the reference limit to 2000 tokens, on the reasoning that the sample sales slip and lease contract together run to a few hundred characters and 2000 can hold several candidates; compare against 1000 tokens to observe whether short materials are truncated. This value is a hypothetical starting point and is not an official default.
Three common errors
- Forcibly associating libraries that use different vector models. The input is two libraries with different vector model identifiers; compare whether the identifiers match; the observable result is that the identifiers do not match, so the libraries should be excluded rather than searched.
- Treating minimum relevance as permission or entity filtering. The input is the payment question about "Li" in the sample; compare whether the returned content includes records of other buyers; the observable result is that the relevance setting does not distinguish buyer identity, and a separate permission implementation is needed.
- Treating an empty result as a failure. The input is a paper-constructed empty quote array; compare whether the downstream design accepts a length of 0; the observable result is that the path still completes, and no claim can be made that a fictional rule search necessarily returns an empty array.
How to verify the setup
- Input the sample sales slip text and the draft sentence "the buyer has settled the March 12 payment"; compare the values in the same field. If the sales slip states the payment is outstanding while the draft sentence states it is settled, judge it a contradiction and send it back for revision.
- Input the question "40×60 woven bag unit price"; compare the content returned by semantic retrieval and full-text retrieval. If full-text retrieval matches the size code while semantic retrieval returns generalized content, record that difference without presuming which mode suits all materials.
- Input a retrieval request containing both the sales slip and the lease contract; compare whether the returned quotes mix in lease contract clauses. If a payment question returns lease term content, judge it an irrelevant recall and check the chunking and retrieval wording.
A pending review status does not demonstrate a lack of operating permission. Signing, reaching cooperation and contract effectiveness are three distinct facts. A quotation validity period does not indicate a supply period. Missing evidence is recorded as unsupported or pending verification, and the evidence gap is preserved.