What Data Looks Like for This Category
Relevant data for pharmaceutical dosage form manufacturing comes from approved formulation processes, material batches, MES systems, electronic batch records, LIMS, and quality management systems. This data is maintained by production, quality assurance, quality control, and warehouse departments. Daily documents include master production files, batch production records, batch packaging records, cleaning records, inspection records, deviation/CAPA/change documents, and batch release review forms. Each document links to specific fields such as material batch numbers, process parameters, and inspection values. Update frequency follows per batch production, each critical process step, and as specified in monitoring plans. Single-batch documents contain fixed-format weighing, packaging, inspection data, and compliance audit records.
What Constraints Do These Characteristics Impose on the Knowledge Base Retrieval and Recall Link
Documents in this category are linked to fixed fields by production batch and have high update frequency. Retrieval must accurately match core fields such as batch numbers and process parameters to avoid retrieving historical data unrelated to the current batch. Documents must also meet GMP compliance requirements. Retrieval results must prioritize high-priority content related to deviations and releases, and must not omit key compliance records. Additionally, the volume of retrieved documents for a single batch must be controlled within a reasonable range to avoid overly long contexts that exceed model processing limits. Incremental updates must be supported to accommodate frequent batch record submissions. Failure to meet these requirements may lead to excessive audit delays or compliance risks.
Configuration Settings
| Configuration Item | Suggested Value | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Accurately match core fields such as batch numbers and process parameters in pharmaceutical dosage form batch records, and filter low-relevance historical documents |
limit | Top 10 results | Cover all core documents linked to a single batch production, while controlling context length to meet model processing requirements |
searchMode | mixedRecall | Combine keyword retrieval and vector retrieval to match both fixed fields and free text descriptions in documents |
usingReRank | Enabled | Reorder retrieved results to ensure high-priority documents such as deviation and release reviews appear first |
datasetSearchUsingExtensionQuery | Enabled | Automatically expand search terms, for example, expanding "feeding" to "weighing and feeding values" to match professional compliance expressions in documents |
collectionIds | Bind collection IDs from production and QA departments | Only retrieve approved compliant documents and exclude unrelated non-production data |
This configuration is based on FastGPT v4.17.0.
Three Common Mistakes
- Phenomenon: An error occurs during vectorization tasks, with logs showing embedding rate limit exceeded. Cause: The number of concurrent vectorization threads is not restricted, and too many requests submitted in a short time exceed interface limits.
- Phenomenon: Knowledge base retrieval takes too long, with performance lower than expected under the same model configuration. Cause:
usingReRankis not enabled,searchModeis set to pure vector retrieval, andlimitis set too large, resulting in a large number of irrelevant documents participating in the sorting process. - Phenomenon: Untriggered model call error logs appear during workflow operation. Cause: After enabling
datasetSearchUsingExtensionQuery, the scope of used models is not restricted, triggering unconfigured model requests.
How to Confirm the Configuration Is Correct
- A single batch of test documents is uploaded, a retrieval operation is executed, and the retrieved results are verified to include documents related to the batch’s linked materials and process parameters, with sorting aligned to business priority.
- Vectorization task run logs are reviewed to confirm there are no rate limit exceeded errors, and that the number of concurrent requests meets the current interface’s restriction requirements.
- Workflow operation is simulated, and logs are checked to confirm there are no untriggered model call abnormal records.
- The
similaritythreshold is adjusted to verify that the compliance matching degree of the retrieved results meets the requirements of business audits.
The values provided are common starting points and should be measured against the samples used in the specific deployment.