This document was written for FastGPT v4.17.0.
What This Category of Data Looks Like
Data for this category primarily comes from approved formulation processes, MES electronic batch records, LIMS systems, and quality management systems. Daily documents include master production files, batch production records, cleaning records, inspection records, deviation and change documents, and similar materials. Fields include material batch numbers, process execution parameters, test results, environmental monitoring data, and more. Units involve batch numbers, degrees Celsius, kilograms, hours, and others. Data updates align with production batches, key process steps, and monitoring plan execution. Each production batch corresponds to a complete set of records.
Constraints Imposed by These Characteristics on Vector Models and Indexes
The batched structured data and high-frequency update nature of this category require vector indexes to support rapid filtered recall by production batch. Specialized process parameter and test result fields need vector models adapted to the pharmaceutical domain to avoid semantic drift issues present in general-purpose models. Each single production batch corresponds to a complete set of records, so indexes must ensure no associated records are missed during recall, supporting full associated queries for batch record audits. In scenarios with frequently added batch data, indexes must support incremental updates to avoid additional time costs from full index rebuilding.
Configuration Settings
| Configuration Item | Recommended Values | Rationale |
|---|---|---|
| Chunk Length | 800–1200 characters | Aligns with the length of single-process descriptions in batch records, avoiding information fragmentation within chunks |
| Overlap Length | 100–200 characters | Preserves contextual connections between adjacent chunks, ensuring coherence of process steps |
maxToken | 8192 token | Matches the maximum input limit of pharmaceutical domain embedding models, covering chunking requirements for long documents |
defaultToken | Calibrated via actual measurements | Adapts to the total token scale of single-batch records, avoiding truncation of critical inspection and process information |
| Similarity Threshold | 0.75–0.85 | Filters low-relevance non-process-related records, ensuring accuracy of audit retrievals |
| Single Search Limit | Top 20 results | Covers the number of associated records required for single-batch audits, avoiding redundant data loading |
Three Common Misconfigurations
- Symptom: The interface returns a 503 error, with a prompt that no available channels are found for the specified embedding model. Cause: No separate embedding model channel is configured, and only the default oneapi configuration is used, leading to model scheduling failure.
- Symptom: After docker deployment, the knowledge base index cannot be created, and the host machine has no GPU resources. Cause: The vector model loading is not adapted to GPU-free environments, and GPU-dependent embedding models cannot initialize properly.
- Symptom: After configuring environment variables, the index still cannot be generated, and logs show empty fields. Cause: The container was not restarted to apply the newly configured environment variables, and the existing container still uses old configuration parameters.
How to Confirm Successful Configuration
- Check the vector model loading logs to confirm there are no initialization failure error messages.
- Upload a single batch record document, perform a retrieval test, and confirm that the returned associated results match the document content.
- Configure a retrieval condition filtered by production batch, verify whether the index supports rapid data recall by batch.
- View the index update records to confirm that newly added test data has been correctly indexed.
The values provided here are common starting points, and should be evaluated against the reader's own samples.