LLM Adaptation: Prompting vs Fine-Tuning

Generative AI & AgentsNLP

Comparison of prompt engineering and LoRA fine-tuning for three-way fact-checking and claim verification.

Problem

Fine-tuning a language model is not always the right choice. Some problems can be solved with good prompting, retrieval or simpler models, while other tasks require model adaptation. This project investigated when prompt engineering is enough and when fine-tuning adds measurable value.

Solution

The task was three-way claim verification: the model had to classify whether the evidence supported, refuted or gave mixed/insufficient support for a claim. First, a prompting baseline was built with strict instructions, label parsing, evidence selection and low temperature.

Then a Qwen3 model was adapted with LoRA fine-tuning. The training run included JSON data loading, instruction formatting, supervised fine-tuning, adapter injection, reproducible evaluation and metric logging.

Result

Prompting achieved 58.76% accuracy and 0.6494 weighted F1. Fine-tuning improved this to 67.23% accuracy and 0.6889 weighted F1.

The key finding was not just that fine-tuning scored higher, but that the choice of approach should be evaluation-driven: start with a baseline, measure performance, understand failure modes, and only then decide whether prompting, retrieval, rules or fine-tuning is the right path.

Technologies used

LLMQwen3LoRAFine-tuningPrompt EngineeringOllamaUnslothPythonModel Evaluation