Fresh-food concession counters: vector indexes for product questions

Review vector indexes for product questions in Fresh-food concession counters. Check input mappings, source evidence and failure handling before use.

What the documents look like

Fresh-food concession counters in hypermarkets are frequently operated on site by suppliers under sales-sharing arrangements. Product reference material therefore spans concession contracts, daily sales reports, loss sheets, and food inbound inspection records. These materials are retrieved repeatedly during product-reference and selection questions to check the specification, settlement basis, and inspection status of a given batch. Data sources include the POS system, supplier delivery notes, food-safety ledgers, and store stock counts. Updates occur daily or per batch, so retrieval must compare records within the same batch and the same field, avoiding any mixing of records from different periods or different parties.

Three industry facts shape this task. First, because a supplier operates the counter, the same product line can appear in both the concession contract and the daily sales report with different roles, so a retrieval query needs to keep the contracting party, the batch, and the period aligned. Second, loss allocation is a recurring source of margin disputes, which means loss sheets and sales reports must be retrieved together when a question concerns settlement. Third, food inbound inspection records carry a verification state that is separate from the commercial relationship, so a retrieved inspection record does not by itself confirm that settlement or authorization has occurred.

Constraints at the vector indexes step

Vector search judges similarity through mathematical distance. Accuracy is affected by vector-model quality, data quality (length, completeness, diversity), and retriever precision, which trades speed against accuracy. FastGPT uses the PostgresSQL PG Vector plugin as the vector retriever, with an HNSW index. PostgresSQL is used only for vector retrieval and can be replaced by another database, while MongoDB stores other data. In the MongoDB dataset.datas table, the original data is stored together with an indexes field that records the corresponding vector IDs as an array, so one data group can correspond to multiple vectors. During retrieval, vectors are recalled first, then the original data is located in MongoDB by vector ID; entries corresponding to the same original data are merged and the highest score is taken.

A knowledge base selected for association must use the same vector model. The actual model and input type are checked first. Knowledge bases built on different vector models cannot be associated together; in that case only the identifier is checked and non-matching bases are excluded. The index content itself should be complete and focused, and retrieval coverage against index length is weighed against the sample at hand. Image retrieval depends additionally on whether an image description or image vector index was generated at ingestion, not only on the query side. After any model or index adjustment, the same set of questions is compared against the cited source text; a vector score alone does not support a claim about outcomes.

Hypothetical drill sample: a store's concession contract annex states that "Supplier A operates on site for leafy vegetables from 1 March 2025 to 31 August 2025, and loss is shared by both parties in proportion to sales." The daily sales report shows leafy-vegetable sales of 1,200 yuan on 12 April 2025. The sentence proposed for judgment is "Supplier A's April 2025 loss allocation has been settled by the store." The subject, object, period, and field of this request must be aligned item by item against the contract annex and the report. Whether settlement has been completed is a fact not stated in these materials.

Configuration and implementation checks

Configuration itemSetting or check relevant to this pageRelation to the sample
Associated knowledge baseSelect one or more knowledge bases using the same vector modelThe contract annex and sales report can be associated together only under the same model
Search modeSemantic search, full-text search, or hybrid searchBatch numbers and contract numbers suit full-text search
Citation limitEach search cites at most n tokensThe hypothetical trial starting value is 2,000, chosen so it can be compared against the displayed value
Minimum relevanceA 0-1 value, effective only in semantic search or with result rerankingFilters low-relevance fragments; it is not a permission or entity filter
Result rerankingRequires a ReRank model, enabled according to settingsSecondary ordering when candidates are many; the score is used for filtering
Image indexDepends on whether an image description or image vector was generated at ingestionWhen inspection records contain images, check the ingestion index first

The citation limit is expressed in tokens rather than top k because chunk lengths differ greatly in mixed knowledge bases. The minimum relevance is a filtering threshold, not a final ordering rule; once question optimization, hybrid search, image retrieval, or result reranking is enabled, final results may come from multi-path fusion and need not follow a single vector-similarity order.

Three common errors

  1. Treating minimum relevance as an entity or permission filter. The value is a similarity threshold and does not exclude unrelated business or unauthorized records. Retrieval itself does not constitute authorization.
  2. Forcing knowledge bases built on different vector models into one association. The documentation requires the same vector model. When identifiers do not match, exclude the non-matching base and record it, rather than running a cross-model retrieval to compare missed recalls.
  3. Treating a pending review or a quoted price as completed settlement. In the sample, "loss allocation has been settled by the store" lacks settlement evidence and remains unsupported. The evidence gap is preserved rather than resolved.

How to verify the setup

  1. Input the sample contract annex text and the proposed judgment sentence, then compare subject, period, and field. If the proposed sentence claims settlement is complete while the material states only the allocation method, the judgment is unsupported.
  2. Input the sample daily sales report amount of 1,200 yuan and the contract allocation clause, then compare the fields needed for the loss-allocation calculation. If the report does not list a loss amount, record the gap and do not derive a settlement result.
  3. Input one explicit paper empty result [] and check whether the downstream chain runs through. An empty citation output may have length 0. Do not claim that a fabricated rule retrieval necessarily returns [].

These checks observe and record failure branches. They do not guarantee a first-hit result, full recall, or an empty result for an unrelated query. A pending request is not approval, an offered option is not execution, and an unsigned termination is not a completed termination.