This invention discloses an intelligent
electronic document archiving and organization method based on LoRA fine-tuning, comprising two stages: training and
inference. In the training stage, historical archive data of the target unit is collected, and the three tasks of classification, identification, and evaluation are arranged into a three-in-one training sample. Low-rank
decomposition matrix pairs are added to the query, key, and value projection matrices of each attention layer of the base model, the original parameters are frozen, joint fine-tuning training is performed, and a unit-specific fine-tuned large
language model is generated and deployed. In the
inference stage, the electronic documents to be organized are received and the text is extracted. The instructions of the three tasks are combined with the text to form a comprehensive prompt word. The model is invoked to perform one
inference to generate a
JSON result containing the
organization identifier,
retention period code, security classification code, and importance
score. After four levels of progressive
parsing and field-level
verification, the result is written to the
database in one go. This invention achieves the simultaneous output of three internally consistent organization results in a single inference, reducing costs and improving accuracy.