一句话:提出 VidTutorAssistant,用检索增强生成自动回答编程教学视频评论中的提问,答案质量优于原视频作者。
YouTube 上的编程教程视频评论区已成为学习者追问的重要空间,但提问数量常超出创作者可回复的规模,导致学习者得不到澄清。本文提出 VidTutorAssistant,一个自动回答编程视频教程观众提问的 Web 平台。其核心是检索增强生成(RAG)流水线:先抽取视频字幕并分段、嵌入;再将每条评论分类为问题或非问题;对识别出的问题,用余弦相似度检索最相关的字幕片段;最后以这些片段为上下文,用 GPT-4 生成答案。作者从 7,522 个 Python 和 Java 教程的 105,553 条评论中选取 440 条进行研究评估。结果显示:视频编程语言识别准确率 0.99,问题/非问题分类准确率 0.96,生成答案的正确率为 98%、完整率为 99.5%,均优于原视频作者的 89% 和 90%。
Programming tutorial videos on YouTube are an important information resource for software developers and students, and their comment sections have evolved into active spaces where viewers ask follow-up questions. The volume of these questions, however, often exceeds what content creators can address, leaving learners without the clarifications they need. We present VidTutorAssistant, a web platform that automates responses to viewer questions on programming video tutorials. VidTutorAssistant implements a retrieval-augmented generation pipeline that extracts a video’s transcript, then segments it and embeds it. It then classifies each viewer comment as being a question or non-question, retrieves the most relevant transcript segments to each identified question via cosine similarity, and then generates an answer to the question using an LLM (GPT-4), while grounding the response using the retrieved transcript segments as context. We validate VidTutorAssistant through a study on a subset of 440 user comments selected from a larger dataset of 105,553 comments extracted from 7,522 Python and Java tutorials. VidTutorAssistant is evaluated on various criteria: a) its ability to identify the programming language in a video, achieving a 0.99 accuracy; b) its ability to classify comments into questions and non-questions, reaching a 0.96 accuracy; and c) its ability to produce correct and complete answers to questions, producing 98% correct and 99.5% complete responses, compared with 89% and 90% for the original creators’ answers.