Bid Document and Quotation Preparation for Pharmaceutical Dosage Form Manufacturing: Knowledge Base Retrieval and Recall

This category’s data originates from approved prescription processes, material batches, MES systems, electronic batch records, equipment and

What the data for this category looks like

This category’s data originates from approved prescription processes, material batches, MES systems, electronic batch records, equipment and environmental monitoring data, LIMS and quality management systems, and is maintained by production, quality assurance, quality control, and warehousing departments. Daily documents include master production documents, batch production records, batch packaging records, cleaning records, inspection records, deviation/CAPA/change documents, and batch release review forms. Updates occur per batch production, when key process steps are executed, and according to fixed monitoring plans. Document fields include material batch numbers, process parameters, inspection results, deviation handling results, and more, and must comply with compliance data requirements.

What constraints these characteristics impose on knowledge base retrieval and recall

High data update frequency and batch binding require retrieval to accurately match batch information to avoid mixing cross-batch data. Diverse document types and highly compliant fields require setting differentiated retrieval weights for different document types. Data comes from multiple systems, so retrieval must cover all authorized data sources to prevent missing key compliance information. Documents such as batch records must be strictly associated with production links, and retrieval results must be traceable to original data sources while meeting data integrity requirements. This prevents bid documents or quotation content from failing to meet compliance standards due to data misalignment.

How to set the configuration

This configuration is based on FastGPT v4.17.0.

Configuration ItemRecommended Value RangeRationale
similarity0.75–0.85Pharmaceutical dosage form data has strict compliance requirements, so low-match irrelevant documents must be filtered to avoid interfering with compliance judgments
limitTop 8–12 resultsBid documents need to cover multi-dimensional compliance data, and an appropriate number of recalled results balances completeness and retrieval efficiency
searchModemixedRecallBoth semantically related process parameters and precise keywords such as batch numbers and material IDs must be matched to improve retrieval accuracy
usingReRankEnabledIn multi-source data mixing scenarios, reranking optimizes result sorting to prioritize compliance documents strongly related to the target bid batch
datasetSearchUsingExtensionQueryEnabledBid scenarios require expanding retrieval of documents related to processes and materials to supplement cost basis required for quotations

Three common mistakes

  • Phenomenon: Retrieval results only return a small number of low-match documents, or fail to recall batch records for the target batch at all. Cause: The similarity threshold is not set within the range required for compliance, or the keyword matching mode of searchMode is not enabled, leading to an imbalance between semantic and precise field matching.
  • Phenomenon: The configured retrieval step in the workflow does not trigger, and returned results come directly from built-in model conversations. Cause: The execution order of the workflow is not configured correctly, or the knowledge base retrieval node is not placed before the conversation node, causing the model to not call retrieval results.
  • Phenomenon: Retrieval results include expired deviation handling documents or unreleased batch data. Cause: The incremental synchronization cycle of the knowledge base is not set according to the data update frequency, or expired document versions are not filtered, leading to errors in compliance data.

How to confirm the configuration is correct

  • Manually enter the material batch number and process parameters of a specific batch, and check whether the retrieval results include the corresponding batch’s batch production records and inspection records.
  • View the document sources returned by retrieval to confirm that authorized data sets from MES systems, LIMS, and quality management systems are covered.
  • Trigger the retrieval step in the workflow to confirm that the number of returned results matches the preset limit value range.
  • Check whether the reranking function is active, and confirm that highly matched compliance documents appear at the top of the results.

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