What the documents look like
Returned-goods warehouse inspection works on returned parcels and assigned product grades. It does not handle outbound picking for new orders. The records that matter here are the return inbound note, inspection photographs, the grade decision table, and the resale listing sheet. Sources include the WMS return module, platform after-sales records, carrier return shipments, and the inspection bench. Records are produced per item and refreshed daily.
A single returned item can carry several photographs and more than one grade decision, so chunking has to keep the return number, the product identifier, and the decision state connected. The return inbound note holds fields such as return number, product, quantity, and carrier. The grade decision table holds the grade value and the basis for the decision. Inspection photographs hold images and possibly a text caption. The resale listing sheet holds the listing object and its state. Parsing should preserve the document identity and version that allow a chunk to be traced back to the source, and segmentation should avoid separating a grade value from the condition that produced it.
Constraints at the document chunking step
FastGPT stores a knowledge base as library, collection, and data. The smallest search unit is the library; collections classify data for management and do not affect search results. Vector retrieval uses the PostgresSQL PG Vector extension with an HNSW index, and PostgresSQL is used only for vector retrieval while MongoDB stores other data. In the MongoDB dataset.datas table, the original data record holds an indexes field listing the vector IDs that map to it, so one data record can correspond to several vectors. During retrieval the system recalls vectors first, then uses the vector IDs to find the original content in MongoDB. Records that resolve to the same original data are merged, and the highest score is kept. Apart from the default text index, a model that supports it can also generate an image description index or an image vector index.
Semantic retrieval computes distance between vectors. Full-text retrieval depends on keyword hits and suits exact queries such as numbers, models, proper nouns, and error codes. Hybrid retrieval uses both and merges them through RRF. ReRank performs a second ordering of candidate text and returns a score between 0 and 1. The minimum relevance value is a filter threshold and applies only during semantic retrieval or when result reranking is used; it is not a final ordering rule. The citation limit controls how many tokens of content are cited per search. Retrieval is a recall process and does not perform authorization or entity isolation.
Hypothetical drill sample: an after-sales warehouse receives a return inbound note, return number RT-2024-0417, product a certain model of handheld vacuum cleaner, quantity 1, carrier a certain express service, arrival date 17 April 2024. On the same day the inspection bench records one row in the grade decision table, grade "resellable", basis "no visible scratches on the exterior, functional test passed". Two inspection photographs are recorded, file names QC-0417-01 and QC-0417-02. Draft sentence to be assessed: "This returned product has been judged resellable and can be listed for sale directly." The sentence does not state whether a resale listing sheet has been generated or whether a listing state has been confirmed, and the stated basis covers only the scope recorded in the grade decision table.
Configuration and implementation checks
| Configuration or check item | Use on this page | How to check |
|---|---|---|
| Semantic retrieval | Recall return inbound note and grade decision table fragments from a natural-language question | Search "resellable decision basis" and observe whether returned fragments contain the decision condition |
| Full-text retrieval | Find an exact return number, model, or file name | Search RT-2024-0417 and observe whether the fragment carrying that return number is returned |
| Hybrid retrieval with RRF | Combine semantic and full-text recall | Run the same question through both paths and observe the merged cited content |
| Result reranking | Reorder candidate text and produce a 0-1 score | Enable when candidates are numerous, then filter by score |
| Citation limit | Control the amount of cited content per search by tokens | Hypothetical trial starting value 2000 tokens, chosen to hold several fragments of a single return record; compare against the chunk lengths common in this library and adjust |
| Minimum relevance | Filter low-relevance results | Applies only during semantic retrieval or result reranking; observe filtering behaviour across the 0-1 range |
Three common errors
- Treating a successful upload as an updated retrieval index. After source material changes, the actual training and index state must be checked; the upload action alone does not show that the index was rebuilt.
- Reading the multi-vector mapping of one original data record as several independent documents. The vector ID array points to the same original data, which is merged with the highest score kept, so the content should not be cited repeatedly.
- Inferring authorization state from retrieval results. Retrieval returns cited content only. Whether a resale listing sheet has been generated and whether a listing has been confirmed are downstream business actions that need their own implementation.
How to verify the setup
- Enter the return number RT-2024-0417 from the drill sample and compare the returned fragments for that number together with its product, quantity, and carrier fields. A fragment showing the return number and those fields together indicates that segmentation preserved the record.
- Enter the draft sentence "This returned product has been judged resellable and can be listed for sale directly" and compare it with the grade decision table text. The source records only the grade and the decision basis; it does not record a listing state. A draft sentence that reaches beyond the source scope is unsupported, and the evidence gap should be recorded.
- Enter the empty citation list [] and compare how the downstream design handles an empty citation. A downstream branch that handles empty input indicates that empty-result handling is available. This check does not claim that a retrieval under an invented rule will return [].
Libraries built on different vector models cannot be associated together. Check the identifier first, exclude those that do not match, and record the actual observation rather than running a cross-model retrieval to compare missed recalls. Image retrieval requires a corresponding image input and model capability, and reranking requires a model and must be enabled in the settings. The optional paths shown in the overall document flow diagram do not mean that every request executes all of them.