Understanding llm fine-tuning step to understand prompt engineering
How to Write Good Prompts?
Large Language Models are black boxes, unless we try different prompts we don’t know which prompts produce good results. There are many suggestions online on how to write good prompts either directly from model providers or practioners. When compared to general programming which is very standardized, where we have syntax and the help of api’s to write code. It is bit frustating to interact with llm and build applications since it lacks the same standardization and reliability.
Pre-trained models are practically unusable unless they are fine-tuned. It is this fine-tuning step which introduced the prompting. There are two ways you could solve this issue …..
First, If all the llm providers release the major prompts/instructions used in the fine-tuning datasets and if we use those prompts, it will give good results. Infact, model providers are actively including all the good prompts in each iteration of the fine-tuning. All the initial versions of the models have released/described the fine-tuning datasets. It is highly unlikely they would do that now given the IP Concerns.
Second, Reverse Engineering the fine-tuned model to understand the major prompts/instructions would be very helpful. How would you do that is the major concern, machanistic interpretability or asking the model itself or altogether using agents. Using Agents to divide the big problem into multiple small problems and using agents to solve each small problem and correcting based on the feedback seems to be the go to workflow now.
unfortunately there is no staright forward solution to these, but the idea that knowing what went into fine-tuning the llm would definately be very helpfull in writing good prompts or even designing the agentic workflows. On a very high level, fine-tuing at this stage is similar to creation of api’s in general software development. Pre-trained models have lot to say on the output of prompts, but fine-tuning also effects on the output of prompts. Exposing those api’s is how we use those functionality.
Enjoy Reading This Article?
Here are some more articles you might like to read next: