Fine-Tuning and Prompt Optimization: Two Great Steps that Work Better Together
Dilara Soylu, Christopher Potts, Omar Khattab

TL;DR
This paper introduces a combined optimization approach for modular NLP systems that jointly tunes model weights and prompts, significantly improving task performance across various benchmarks.
Contribution
It proposes the novel BetterTogether strategy that alternates between weight and prompt optimization to enhance modular NLP pipeline performance.
Findings
Outperforms separate weight or prompt optimization by up to 60% and 6%.
Effective across multiple LMs and NLP tasks.
Released as part of DSPy toolkit.
Abstract
Natural Language Processing (NLP) systems are increasingly taking the form of sophisticated modular pipelines, e.g., Retrieval Augmented Generation (RAG), where each module may involve a distinct Language Model (LM) and an associated prompt template. These compound systems often lack intermediate labels or gradient flow to optimize each module, making their end-to-end optimization challenging. Here we seek strategies to optimize both the module-level LM weights and the associated prompt templates of such systems to maximize a downstream task metric. We propose for the first time combining the weight and prompt optimization strategies to optimize a modular LM pipeline by alternating between the two to get the same LM to teach itself. In experiments with multi-hop QA, mathematical reasoning, and feature-based classification using mistral-7b, llama-2-7b, and llama-3-8b, these…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSystems Engineering Methodologies and Applications · Embedded Systems Design Techniques
