[论文解读] A Comparison of LLM Finetuning Methods & Evaluation Metrics with Travel Chatbot Use Case
本研究对比了QLoRA、RAFT和RLHF微调方法在LLaMA 2与Mistral 7B模型上的应用效果,针对旅行聊天机器人场景,通过端到端(E2E)、自然语言处理(NLP)、Ragas、GPT-4及人工评估指标进行评估。Mistral-RAFT模型经RLHF微调后表现最佳,尤其在人工评估中优势显著,凸显了人工参与评估的关键作用,以及GPT-4相较于自动化指标的优越性。
This research compares large language model (LLM) fine-tuning methods, including Quantized Low Rank Adapter (QLoRA), Retrieval Augmented fine-tuning (RAFT), and Reinforcement Learning from Human Feedback (RLHF), and additionally compared LLM evaluation methods including End to End (E2E) benchmark method of "Golden Answers", traditional natural language processing (NLP) metrics, RAG Assessment (Ragas), OpenAI GPT-4 evaluation metrics, and human evaluation, using the travel chatbot use case. The travel dataset was sourced from the the Reddit API by requesting posts from travel-related subreddits to get travel-related conversation prompts and personalized travel experiences, and augmented for each fine-tuning method. We used two pretrained LLMs utilized for fine-tuning research: LLaMa 2 7B, and Mistral 7B. QLoRA and RAFT are applied to the two pretrained models. The inferences from these models are extensively evaluated against the aforementioned metrics. The best model according to human evaluation and some GPT-4 metrics was Mistral RAFT, so this underwent a Reinforcement Learning from Human Feedback (RLHF) training pipeline, and ultimately was evaluated as the best model. Our main findings are that: 1) quantitative and Ragas metrics do not align with human evaluation, 2) Open AI GPT-4 evaluation most aligns with human evaluation, 3) it is essential to keep humans in the loop for evaluation because, 4) traditional NLP metrics insufficient, 5) Mistral generally outperformed LLaMa, 6) RAFT outperforms QLoRA, but still needs postprocessing, 7) RLHF improves model performance significantly. Next steps include improving data quality, increasing data quantity, exploring RAG methods, and focusing data collection on a specific city, which would improve data quality by narrowing the focus, while creating a useful product.
研究动机与目标
- 评估并比较QLoRA、RAFT和RLHF微调方法在旅行聊天机器人性能方面的有效性。
- 评估自动化评估指标(E2E、NLP、Ragas、GPT-4)与人工评估之间的一致性。
- 确定在旅行规划场景中,哪种微调方法与模型组合能产生最符合人类偏好的响应。
- 识别自动化指标的局限性,并倡导在LLM部署中采用人工参与的评估流程。
- 探索在数据质量、领域特定微调以及RAG集成方面未来可能的改进方向。
提出的方法
- 使用QLoRA和RAFT对两个7B参数的LLM(LLaMA 2与Mistral)进行微调,以实现旅行聊天机器人任务的领域适应。
- 从Reddit的旅行相关子版块收集并整理了一个旅行领域专用的数据集,以支持领域内微调。
- 应用检索增强微调(RAFT),在微调过程中集成外部知识,提升事实性依据。
- 在表现最佳的RAFT模型上应用基于人类反馈的强化学习(RLHF),进一步优化响应质量。
- 采用五项指标评估模型输出:端到端(黄金答案)、传统NLP指标、Ragas、OpenAI GPT-4以及人工评估。
- 对全部五种模型变体(2个模型 × 3种方法)进行消融分析与对比,以识别性能趋势。

实验结果
研究问题
- RQ1在QLoRA、RAFT与RLHF三种微调方法中,哪一种能产生最有效的旅行聊天机器人响应?
- RQ2自动化评估指标(E2E、NLP、Ragas、GPT-4)与人工评估在响应质量上的相关性如何?
- RQ3模型架构(LLaMA 2与Mistral)在旅行领域性能上是否存在显著影响?
- RQ4在RAFT或QLoRA初步微调后,RLHF能在多大程度上进一步提升响应质量?
- RQ5当基于领域特定知识时,基于RAG的方法(如RAFT)是否能超越标准的参数高效微调方法?
主要发现
- 定量指标与Ragas指标与人工评估结果相关性较差,表明其在真实LLM评估中可靠性有限。
- OpenAI GPT-4评估指标与人工评估的相关性最强,因此作为自动化指标的替代方案更具可靠性,优于传统NLP或Ragas指标。
- 人工评估至关重要,因为仅靠自动化指标无法捕捉响应质量中的细微方面,如相关性、连贯性与个性化。
- 传统NLP指标(如BLEU、ROUGE)不足以评估旅行领域中复杂、开放式聊天机器人响应的质量。
- Mistral 7B在所有评估方法中均优于LLaMA 2 7B,表明模型架构的选择对性能有显著影响。
- RAFT在自动化与人工评估中均优于QLoRA,但仍需后处理以解决事实性不一致与幻觉问题。
![Figure 2 : Visualization of the explosion of LLM research from 2007 to 2023. [ 6 ]](https://ar5iv.labs.arxiv.org/html/2408.03562/assets/Images/llm_research_viz.png)
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。