What the documents look like
A fresh-food concession counter in a hypermarket is commonly operated by a supplier who stations staff on site and shares sales revenue with the store. Contract terms and daily transaction materials must be checked against each other item by item. The documents handled on this page are the concession contract, the daily sales report, the shrinkage record, and the food purchase inspection record. Data sources are the POS system, supplier delivery notes, the food safety ledger, and store stocktaking. The contract sets the revenue-share ratio, the settlement cycle, and how shrinkage is borne. Transaction materials record the day's weighed sales, shrinkage quantities, and incoming batch numbers. The subject, period, and fields of the two material types must agree before a comparison conclusion has a basis. The retrieval step needs to recall contract clauses and transaction records together for manual checking.
The contract and the transaction materials change on different rhythms: the contract is a standing document, while sales reports and shrinkage records are produced daily and inspection records per batch. This difference matters because a comparison conclusion is only meaningful when both sides cover the same period and the same counterparty. Retrieval that returns a clause from one period and a record from another cannot support a field-level judgment.
Constraints at the retrieval step
The knowledge base search node can link one or more knowledge bases that use the same vector model. Semantic retrieval depends on vector distance; full-text retrieval depends on keyword hits; hybrid retrieval merges the two paths through RRF. The minimum relevance value takes effect only in semantic retrieval or when result reranking is used. The citation cap is measured in tokens. Question optimization performs coreference resolution and question expansion and adds one model call before retrieval. Retrieval results do not constitute authorization and do not determine whether materials have been approved or signed.
Hypothetical paper exercise sample: a supplier signs a concession contract with a store. The contract text states that the revenue-share ratio is twelve percent of sales, and that the portion of shrinkage exceeding three percent is borne by the supplier. The date range is 1 January 2024 to 31 December 2024. The daily sales report records the day's sales amount and shrinkage quantity, and the shrinkage record records the shrinkage cause and quantity. One draft sentence awaiting judgment reads: "The portion of this supplier's shrinkage in March 2024 exceeding the contract terms shall be borne by the store." Checking requires retrieving the contract clause, the month's sales report, and the shrinkage record, then comparing subject, period, and the shrinkage-bearing field. The contract text states only that the excess portion is borne by the supplier, while the draft sentence names the store as the bearing party; the two take mutually exclusive values on the same field. This sample is a paper exercise and no retrieval or approval was actually performed.
Configuration and implementation checks
The table below lists, for the sample above, relevant settings that the official documents describe or implementation checks tied to this page's task. The values are hypothetical starting points for this exercise, used only for comparison, and are not official defaults.
| Configuration item | Hypothetical starting point for this exercise | Reason for the choice and comparison method |
|---|---|---|
| Linked knowledge bases | Concession contract base and transaction materials base | Both bases must use the same vector model; check the identifier first, then link |
| Search mode | Hybrid retrieval | Contract clauses contain natural language and shrinkage records contain quantities and dates; compare the semantic and full-text paths |
| Citation cap | Hypothetical starting point of two thousand tokens | Contract clauses and report fields are long; compare against a shorter starting point to see whether content is truncated |
| Minimum relevance | Hypothetical starting point of zero point three | Takes effect only in semantic retrieval or reranking; compare filtering against labelled relevant samples |
| Question optimization | Enabled | Used for coreference resolution; compare whether the subject in the original question and the optimized question agree |
| Result reranking | Enabled per the setting | Reranks text when candidates are numerous; compare the rerank score with the vector score |
Three common errors
- Treating retrieval recall as an authorization judgment. Recalling a contract clause does not mean the clause is effective or approved; signing, reaching cooperation, and contract effectiveness are three distinct facts. To check, input the contract text and the draft sentence, compare the subject and bearing-party fields, and observe whether a conclusion is drawn from recalled content alone.
- Treating minimum relevance as an entity or permission filter. Minimum relevance is a filtering threshold and does not exclude unrelated businesses or unauthorized records. To check, input the same question with materials from different subjects, compare whether the recalled results still contain other subjects' content, and observe whether the threshold is wrongly assumed to isolate subjects.
- Treating an unstated field as a negation or a conflict. When the contract does not state how a certain shrinkage item is borne, the conclusion should be unsupported or pending verification. To check, input the contract text and the draft sentence, compare whether the field exists, and observe whether missing evidence is written as a contradiction.
How to verify the setup
- Input the contract text, sales report, and shrinkage record from the hypothetical sample above. Compare the bearing party in the draft sentence with the bearing party in the contract clause, and observe whether mutually exclusive values on the same field are identified. The expected result is that the draft sentence and the contract text are identified as inconsistent; this conclusion is a paper inference only.
- Input the same question with materials from two different subjects. Compare the subject identifiers in the recalled results, and observe whether the minimum relevance setting still returns other subjects' content. The expected result is that recalled results may contain other subjects' content, and the subject must be checked manually before use.
- Input a question that contains no image. Compare whether the retrieval path runs only on the text side, and observe whether image retrieval is triggered. The expected result is that image retrieval requires a corresponding image input and model capability, and this path does not run when no image is input. For an empty result, use an explicitly stated paper input of an empty array to check the downstream design, without asserting that retrieval necessarily returns an empty array.