Medical Supply Chain Ledger Aggregation and Report Generation: Knowledge Base Retrieval and Recall

Medical Supply Chain Ledger Aggregation and Report Generation: Knowledge Base Retrieval and Recall

What the data for this category looks like

The source data for medical supply chain ledgers includes supplier qualification documents, inventory and sales ledger Excel files, cold chain transportation records, and drug regulatory sampling reports. Updates follow goods circulation batches or occur daily. The number of documents updated in a single batch fluctuates based on business scale. Document types include structured Excel tables (with fields such as batch number, expiration date, national drug approval number, outbound quantity, etc.), Feishu multi-dimensional documents (recording ledger verification workflows), and PDF-format qualification certificates and cold chain temperature logs. A key feature of the fields is that they include precise identifiers such as batch numbers, validity periods, and cold chain temperature values. Units include boxes, vials, batches, degrees Celsius, and others.

Constraints on knowledge base retrieval and recall

The structured fields of medical supply chain ledgers are numerous and precise. Retrieval must balance text semantic matching and exact field matching to avoid retrieving documents from unrelated batches. Multiple document types coexist. Configurations must support separate parsing for Excel tables, multi-dimensional document indexing, and PDF text extraction. Frequently updated ledger data requires the knowledge base to support incremental indexing. This avoids performance losses from full index reconstruction. Numeric fields such as cold chain temperature and outbound quantity require numeric range retrieval. Simple text vector recall cannot meet precise matching requirements.

How to configure the system

The following configurations are formulated for FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
similarity0.75–0.85Precise fields such as batch numbers and expiration dates for medical ledgers require high matching accuracy to avoid retrieving unrelated batch documents
limitTop 10 resultsThe number of associated documents per batch ledger is limited. Excessive results increase context redundancy and reduce report generation efficiency
searchModeHybrid retrievalBalances structured field matching and unstructured text semantic retrieval to adapt to the multi-type document structure of ledgers
usingReRankEnabledPerforms secondary sorting of recall results by relevance to filter low-quality results that match batch numbers or expiration dates but are semantically unrelated
datasetSearchUsingExtensionQueryEnabledAutomatically expands query terms related to ledgers. For example, expand "June 2024 ledger" to "June 2024 inventory and sales ledger" to improve recall coverage
collectionIdsSpecified by business moduleOnly recall knowledge base collections related to medical supply chain inventory and sales, qualification, and cold chain ledgers to avoid interference from unrelated data

Three common configuration errors

  • Phenomenon: Retrieval results are empty after importing Feishu multi-dimensional documents or Excel ledger files. Cause: The parsing plugin for the corresponding document type is not enabled, or the file is not added to the specified collectionIds collection.
  • Phenomenon: Retrieved PDF documents cannot be opened directly in the results list. Cause: External link access permissions for knowledge base files are not configured, or the file index extraction function was not enabled during upload.
  • Phenomenon: After restoring a backup node, knowledge base retrieval results differ from those before the backup. Cause: Only project files were restored without synchronously restoring the knowledge base vector index files. Both project files and the vector database directory must be backed up.

How to verify correct configuration

  • Upload a test medical inventory and sales Excel ledger, and check that the knowledge base parsing status shows success.
  • Enter a query term containing a specific batch number, and confirm that the recall results include documents matching the batch number, and that the similarity score falls within the 0.75–0.85 range.
  • After enabling usingReRank, compare result rankings before and after reranking to confirm that highly relevant documents appear at the top of the list.
  • Check the collectionIds configuration for the knowledge base collection to confirm that only directories related to medical supply chain are included.

The values provided are common starting points and should be measured against the reader's own samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-28.