The invention discloses a biochemical experiment
automation script training generation method based on RAG and DPO. The method comprises the steps that biochemical experiment technical documents are collected to serve as an external
knowledge base; the BM25 and the Fiss are fused to construct a
hybrid retriever; generating experimental
process description by using a large
language model, determining equipment, protocols and materials, and retrieving related documents from a
knowledge base on the basis of the experimental
process description, the protocols and the materials; generating an experiment script based on a
retrieval result, and performing platform
simulation verification, and performing iterative optimization on the script which fails in
verification; marking successful and failed scripts as
preference data pairs, and constructing a
training set; carrying out LoRA
fine tuning on a local large
language model by adopting direct preference optimization; and according to a target and appliance prompt input by a user, generating a verified experiment script by using the large
language model after direct preference optimization training. According to the method, the script generation
automation level and the passing rate are remarkably improved, the manual intervention cost is reduced, and an efficient solution is provided for
automation of biochemical experiments.