This application discloses a method for constructing a vehicle diagnosis and repair
knowledge base, an electronic device, and a storage medium, relating to the field of vehicle diagnosis and repair. The method includes: Step S1,
knowledge base creation involves uploading knowledge documents to the
knowledge base, then sequentially performing standardized
processing including document reading, cleaning, segmentation,
knowledge generation, and knowledge storage, before saving the knowledge to a
database. The process of saving knowledge to the
database uses a template method to define a unified document
parsing and
processing flow, and a bridging pattern to decouple each
processing stage. The specific processing at each stage uses a
strategy pattern to load different implementation methods. The cleaning stage uses a chain of responsibility pattern to flexibly configure the rule execution order. Step S6, diagnosis and repair knowledge query involves standardizing the text of a user's question, retrieving it from the knowledge base, and generating a corresponding question based on a large
language model. The method utilizes plug-in technology to enable configurability of knowledge document
parsing rules.