What the documents look like
A department-store concession sits inside the mall's unified checkout and commission settlement arrangement. The brand side, the mall operations team and the finance team each hold part of the record. A single sale can appear in the mall POS, the brand ERP and the monthly reconciliation statement under different languages and different numbering formats. Four document families carry this work: the joint-operation commission contract, the mall activity letter, the sales receipt, and the monthly reconciliation statement. These documents support the cross-border material and multilingual retrieval task described on this page.
For chunking, the practical consequence is that a retrieved fragment must keep enough document identity and version information to point back to the contract or activity letter it came from. Contract clauses, activity conditions and the fee items they govern can be split across separate chunks, and a search may then return the condition while missing the scope it applies to. One set of source data can map to several indexes, so source records and indexes need separate checks. Semantic retrieval can match across languages, and its results do not carry permission or entity isolation; a relevance score is not an authorization filter.
Constraints at the document chunking step
The knowledge base is organized as library, collection and data. The smallest search unit is the library, and a search runs against the whole library; collections only classify data and do not affect search results. In the dataset.datas table, source data is stored together with an indexes field that records the vector IDs belonging to it, and that field is an array, so one set of data can correspond to multiple vectors. Vector retrieval uses the PostgresSQL PG Vector extension with an HNSW index, while MongoDB holds the remaining data. During retrieval, vectors are recalled first, then the vector IDs are used to locate source content in MongoDB; when several vectors map to the same source data, the results merge and the highest score is kept.
Chunking must therefore preserve the structure of each document family. Conditions, explanations and the content they constrain belong in the same chunk where the document's own structure keeps them together. A multilingual search that returns a clause fragment without its scope cannot be matched back to a specific contract or activity letter.
Hypothetical paper exercise sample: a concession plans to check one cross-border joint-operation commission contract fragment. The source text reads: "Party A shall accrue a commission of twenty percent on Party B's concession sales for the period 1 March 2025 to 31 March 2025; the promotion fee agreed under activity letter number ACT-2025-017 falls outside this commission." The draft sentence to be judged reads: "The concession's March 2025 commission already includes the ACT-2025-017 promotion fee." This sentence shares the same subject, the same period and the same fee field as the source text. The source text states that the promotion fee falls outside the commission scope, so the draft sentence is not supported.
Configuration and implementation checks
| Configuration item | Relevant setting or check on this page | Hypothetical trial starting point and comparison method |
|---|---|---|
| Search mode | Semantic retrieval, full-text retrieval or hybrid retrieval | Use full-text or hybrid retrieval for numbered questions; compare against semantic retrieval results |
| Reference limit | Maximum tokens referenced per search | Start from a value covering one contract fragment; compare with the length of returned content |
| Minimum relevance | A 0-1 value, effective only in semantic retrieval or with reranking | Start at 0.3 for this trial; compare with recall changes after adjustment |
| Question optimization | Coreference resolution and question expansion before retrieval | Enable in multi-turn follow-up scenarios; compare with results when disabled |
| Result reranking | ReRank second-pass ordering with a 0-1 score | Enable when candidates are numerous; compare with ordering before reranking |
| Chunk check | Inspect paragraph completeness against document structure | Manually compare whether chunk conditions and scope stay in the same paragraph |
These are trial starting points for the hypothetical exercise, not documented defaults. The reference limit uses tokens rather than top k because chunk lengths vary widely in mixed knowledge bases. Minimum relevance acts as a filter threshold, not a final ordering rule; after question optimization, hybrid retrieval, image retrieval or reranking, results may come from several recall paths and need not follow a single vector similarity order. Hybrid retrieval combines vector and full-text results through RRF, which is a fusion step in the pipeline, not a switch. Question optimization adds one model call before retrieval and typically increases total latency.
Three common errors
- Treating several indexes of the same source data as separate documents, so a retrieved hit cannot be traced back to its source. To check, input the source data identifier and its
indexesarray, compare the number of indexes with the number of source records, and observe whether the result can be located to the same source text. - Treating minimum relevance as a permission or entity filter, and assuming a low score excludes unrelated business. To check, input the same question with different relevance values, compare the returned content, and observe whether fragments outside the target scope can still be recalled.
- Treating a successful upload as proof that retrieval has updated. To check, input the updated material and its retrieval term, compare the training and index states, and observe whether the search still returns the earlier version.
How to verify the setup
- Input the hypothetical sample source text and the draft sentence, compare whether the draft sentence agrees with the source on subject, period and fee field, and observe whether the draft sentence is supported. The expected result is that it is not supported.
- Input the contract number and a natural-language question as separate searches, compare the chunk content returned by each, and observe whether the number search hits the corresponding clause and whether the natural-language search recalls the same chunk. If the number search does not hit, record this as a failure branch.
- Input the updated material identifier and retrieval term, compare the content returned before and after the update, and observe whether the new version paragraph is returned. If the earlier version is still returned, record the training and index states as pending verification. For an empty-result scenario, a paper input of an empty array can be used to check the downstream display design; this page does not claim that a search under a hypothetical rule must return an empty result.
Across these checks, retrieval is not authorization. Whether material, actions or requests sit in a given authorization state at operations handover is a separate question; a search or a form does not execute approval, database writes or external synchronization. Those steps require their own stated downstream implementation.