Q&A for Process Specifications and Technical Standards for Pharmaceutical Preparations Manufacturing: Knowledge Base Retrieval and Recall

Data related to process specifications and technical standards for pharmaceutical preparations manufacturing comes from approved formulation

What this category of data looks like

Data related to process specifications and technical standards for pharmaceutical preparations manufacturing comes from approved formulation processes, material batches, MES electronic batch records, equipment and environmental monitoring data, LIMS system data, and quality management system data. Data is updated synchronously with each batch production, execution of key process steps, and completion of monitoring plans. Daily documents include master production documents, batch production/packing/cleaning records, inspection records, deviation/CAPA/change documents, and batch release review forms. Fields cover material batch numbers, process parameter values, test results, deviation descriptions, and more. Units comply with production measurement specifications.

Constraints Imposed on Knowledge Base Retrieval and Recall

Process data for pharmaceutical preparations manufacturing is updated per batch and has a structured format. Retrieval and recall must support filtering valid data by batch range to avoid invalid cross-batch content. Single-batch document data volumes are large and mostly structured tables. Chunk granularity must be controlled to prevent excessive token consumption. GMP requirements mandate that documents align with operations. Retrieval results must match the currently valid version of process specifications, and expired documents cannot be recalled. Additionally, process Q&A requires precise matching of parameters and steps. The confidence requirement for recall results is higher than in general scenarios, so false recalls of irrelevant content must be reduced.

Configuration Settings

This page applies to FastGPT v4.17.0.

Configuration ItemRecommended ValueRationale
similarity0.75–0.85Matches the precision requirement for process parameters and steps, balances recall coverage and irrelevant content filtering
limitTop 6–8 resultsControls token consumption per recall, aligns with the structured nature of single-batch batch records
usingReRankEnabledPerforms secondary ranking on initial recall results to filter entries that match parameters but do not match process steps
datasetSearchUsingExtensionQueryEnabledExpands the query coverage of process terminology, for example, covering synonymous expressions such as "charging" and "weighing"
searchModeembeddingAligns with structured process and batch record data, enabling more precise matching of parameters and steps than keyword search

Three Common Misconfigurations

  • Scenario: Retrieval returns overly large data chunks, causing token consumption to exceed limits, or failing to locate specific process steps. Cause: Failed to split Excel-format batch records into small chunks, and used default general large chunk parameters.
  • Scenario: No matching results in the knowledge base fails to trigger online search, or incorrect search triggers return irrelevant content. Cause: Failed to correctly configure the agent's branch trigger logic, and did not set empty knowledge base recall results as the trigger condition for online search.
  • Scenario: Casual chat queries are mistakenly identified as process-related Q&A and return recall results. Cause: The similarity threshold is set too low, and non-process-related queries were not filtered via configuration.

How to Verify Successful Configuration

  • Upload a single batch record Excel file, enter a query containing specific process parameters, and confirm that the chunk length of the recall results matches expectations.
  • Enter a casual chat query, check that the knowledge base returns no results, and confirm that the filtering effect meets requirements.
  • Trigger a query scenario where the knowledge base has no matching results, and verify that subsequent online search is triggered as configured.
  • View FastGPT retrieval logs, confirm that the number of single recall results does not exceed the set limit value, and token consumption is within a reasonable range.

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