The invention discloses a course intelligent question-answering method and
system based on retrieval enhancement generation and a
large model, and the method comprises the steps:
processing a to-be-answered
artificial intelligence course
knowledge field question, obtaining a question sequence, and obtaining a text representation vector of the question; obtaining a similarity
score based on the text representation vector and the
paragraph representation vector, and calculating a BM25
score between the question and the
paragraph; based on the similarity
score and the BM25 score, calculating to obtain a mixed score corresponding to each
paragraph, and sorting the paragraphs from high to low according to the mixed scores to obtain a topN document; paragraphs in the topN document are reordered, and a topK document is obtained; and taking the topK document as the context of the question, taking the topK document and the question as input by the large
language model, and outputting the answer of the question. According to the method, intelligent
question answering of
artificial intelligence course knowledge in the education field is realized, the learning efficiency of students is improved, and the teaching burden of teaching assistance of teachers is reduced.