The invention discloses a question and answer and quotation generation method and
system based on a large
language model, and belongs to the technical field of large language models, and the method comprises the following steps: S1, training an intelligent question and answer large
language model, and training an abstract to generate a large
language model; s2, constructing a
knowledge base; s3, segmenting a long text generated in the flow type answer according to a comma to obtain a plurality of short texts, and inputting the long text and the plurality of short texts into a language model to obtain corresponding
sentence vectors; s4, calculating the similarity between the
sentence vector of the long text and the
sentence vector of the abstract in the
knowledge base, and taking the abstract with the similarity TOP20 as a candidate; s5, calculating the weighted similarity of the plurality of short texts and the abstract of the TOP20 as the
score of each abstract; and S6, selecting the abstract with the highest
score which is greater than the threshold value, and inserting the abstract into the backmost of the long text. According to the method and the
system, the user can quickly position the article which the user wants to watch while browsing the answer content, and more efficient and smooth user experience is provided.