paint-brush
Improving Your LLM: Train, fine-tune, prompt, RAG... What to do?!by@whatsai
522 reads
522 reads

Improving Your LLM: Train, fine-tune, prompt, RAG... What to do?!

by Louis BouchardNovember 30th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Each approach serves a unique purpose and comes with its own cost-benefit analysis. Always start with prompt engineering with GPT-4 for quick and effective solutions. If style-specific adaptations are required, try techniques on fine-tuning that are cost-effective methods like LoRa and QLoRa.
featured image - Improving Your LLM: Train, fine-tune, prompt, RAG... What to do?!
Louis Bouchard HackerNoon profile picture



Are you a student or professional inAI, particularly involved with large language models (LLMs)? Understanding when and how to use various techniques like training from scratch, fine-tuning, prompt engineering, or Retrieval Augmented Generation (RAG) can be quite daunting. Each approach serves a unique purpose and comes with its cost-benefit analysis.


Let’s demystify the process of optimizing LLM performance. Balancing factors like quality, cost, and ease of use to provide actionable insights. 🚀✨ I also want to share why Retrieval Augmented Generation (RAG) is becoming a game-changer in the field.


Another very important distinction to understand is the difference between fine-tuning, basic prompting, and full-scale training from scratch and when to apply each of these methods for optimal results.


Here’s a quick tl;dr:

First, always start with prompt engineering with GPT-4 for quick and effective solutions. It doesn’t matter if it doesn’t scale. It will be fast and easy to set up and you can later on figure out how to go from there.


When style-specific adaptations are required, try techniques on fine-tuning that are cost-effective methods like LoRa and QLoRa.


Then, if imperfections like model hallucinations and misaligned outputs remain, retrieval augmented generation can significantly help at a relatively low cost.


Now that you know the essentials, the next step is which one to take in your current position, considering YOUR challenges and how to do it. Here’s my new video that should answer all your questions: