The invention provides a few-sample intention detection method, medium, equipment and product, and relates to the technical field of
artificial intelligence, and the method comprises the steps: carrying out the pre-training of a
basic language model through employing an
offline learning mode, and obtaining a prediction model; the prediction model receives user query data online in an
online learning mode, a candidate intention
list with sorting is generated, and whether the first intention in the candidate intention
list meets a preset
confidence threshold value or not is judged; if yes, outputting the first intention; if not, forming a reduced candidate set by the first K candidate intentions in the candidate intention
list, and obtaining a
large model prediction intention by using a large
language model; if the
large model prediction intention is consistent with the first intention, outputting the
large model prediction intention; if not, the large
language model outputs a final intention according to the user query data, the first intention, the large
model prediction intention and comparative context information of example query. According to the invention, accurate few-sample intention detection is realized.