The invention discloses an automatic prompt optimization method and
system for retrieval guidance, equipment and a medium. The method comprises the following steps: acquiring a to-be-identified customer dialogue; retrieving a plurality of annotated dialogue examples similar to customer dialogue
semantics from a pre-constructed insurance field corpus; generating a plurality of candidate prompts in combination with the basic prompt template according to the example dialogue texts and the labeled intention labels in the plurality of labeled dialogue examples; performing reasoning enhancement
processing on the plurality of candidate prompts to obtain a plurality of optimized candidate prompts; and evaluating the intention recognition accuracy of each optimized candidate prompt by utilizing a
verification data set containing a real intention
label, and selecting an optimal prompt from the plurality of optimized candidate prompts. According to the method, the problems that manual
engineering prompting depends on expert knowledge, coverage is incomplete, stability is poor and maintenance cost is high are solved, the defect that traditional model fine adjustment depends on large-scale
annotation data and computing resources is overcome, and intention recognition accuracy and adaptability in the insurance field are improved.