Abstract
This paper introduces an automated pipeline that leverages Large Language Models (LLMs) to generate high-quality, context-based question-answering (QA) datasets from raw technical documents. By utilizing these synthetic pairs for Supervised Fine-Tuning (SFT), the researchers demonstrate that LLMs can effectively internalize domain-specific knowledge. This approach significantly reduces reliance on expensive human-labeled data and improves the model's reasoning capabilities, particularly in scenarios where source context is unavailable during inference.
Introduction: The Data Bottleneck in Domain Adaptation
While Retrieval-Augmented Generation (RAG) is a popular solution for knowledge-intensive tasks, it faces challenges such as high latency, retrieval inaccuracies, and "hallucinations" when synthesizing information across disparate document chunks. Supervised Fine-Tuning (SFT) offers a robust alternative by teaching models to "know" the domain directly. However, the primary obstacle to SFT is the scarcity of high-quality, domain-specific training data. Creating such datasets for technical fields, like IBM server support, typically requires weeks of manual labor from subject matter experts. This research addresses this "data hunger" by proposing a method to use LLMs to automatically build training datasets from raw technical manuals.
Methods: An Automated Self-Improving Cycle
The authors propose a two-stage "self-improving cycle" framework designed to transform raw technical documents into a structured training set.
1. Automated QA Generator
Using Mistral-7b-instruct-v0.3, the system processes raw IBM Technotes through a three-step pipeline:
- Question Generation: The model generates up to 10 "factoid" questions per document based on the provided context.
- Answer Generation: Factual answers are generated, grounded strictly in the source text.
- Post-Processing: To ensure high quality, a BERT-based semantic similarity check prunes unrelated or unanswered questions, while a RoBERTa-based classifier flags and removes unfinished sentences.
2. Model Fine-Tuning
The resulting synthetic dataset is used to fine-tune target models (Llama-3-8b and Mistral-7b-v0.3) using QLoRA. This 4-bit quantization technique enables efficient training on consumer-grade hardware without significant performance loss.
Datasets and Scale
The study utilizes the TechQA dataset, which contains real-world IBM technical support documents. Unlike common benchmarks like Wikipedia, TechQA represents specialized, "private" documentation that general-purpose models are unlikely to have encountered during pre-training.
The automated pipeline successfully generated over 55,000 QA pairs from 11,960 documents. This represents a massive increase in scale compared to the 1,400 human-annotated pairs available in the original TechQA set, providing a much denser training signal for domain adaptation.
Key Insights: Internalizing Technical Knowledge
A critical finding of this research is the model's ability to internalize knowledge. Models trained on synthetic data performed exceptionally well in "No Context" scenarios, suggesting that the fine-tuning process successfully "baked" technical facts into the model's weights.
Interestingly, while human-labeled data remains the "gold standard" when the context is provided during inference, synthetic data proved superior for teaching models to reason independently when the context was missing. Furthermore, the choice of the "teacher" model is vital; Mistral-7b-v0.3 demonstrated greater stability and consistency as both a generator and a student compared to Llama-3-8b in this technical domain.
Key Results
The researchers evaluated performance using BERTScore (F1), BLEU, and ROUGE metrics across different prompting strategies (0-shot, 1-shot, and 5-shot).
In "No Context" evaluations, the Mistral model fine-tuned on LLM-generated pairs achieved a BERT F1 of 0.858, significantly outperforming the same model trained on human-annotated pairs, which scored 0.836. These results highlight the efficiency of the automated approach, which provides 4.6 QA pairs per document versus the sparse annotations provided by humans.
Limitations and Future Directions
While promising, the study is limited to the technical support domain. Future work should explore whether this self-improving cycle translates to other fields like legal or medical analysis. Additionally, while smaller 7B-8B parameter models were the focus here, larger or closed-source models might produce even higher-quality synthetic data. Finally, the authors note the importance of maintaining a balance between automation and human oversight to prevent the propagation of subtle biases or logical errors in synthetic datasets.
Summary updated