Passing the meaning of completions through fine-tuning to enhance model behaviour and correctness

Hello everyone,

I managed to successfully fine-tune some models to follow certain behaviour in completions through making a couple of hundred lines of prompt → completion. I got a pretty good result, and seem to be improving it by covering a wider range of possibilities given by enlarging the dataset.

However, I was wondering if there is a more efficient way of using already built-in “knowledge” about the desired domain inside GPT model with my own completions which might make it better. Or it might be the case it is already being utilised during and after the training.

To clarify, I am trying to fine-tune the model to generate a simple completion: a code/codes for the recognised database operation/operations which should be executed based on the prompt (e.g. for Elasticsearch it might go like this, prompt: “Create me a new index called ‘logs’” → completion: “CRI”, where CRI would stand for index creation). With a couple of hundred of training lines I managed to do this on the curie model with occasional miss. The case why I do it is to use the output to perform the operation on my DB (basically turning NL to API call).

So, with knowing this, my intention is, I would also like to instruct the model through fine-tuning to know the codes and what they stand for, and that they are related to elasticsearch operations, (e.g. CRI is for index creation, UPM is for updating mapping etc…) and not only to match prompts to these completion codes. It kind of seems to me that the model is matching prompts from training data to closeness of usage prompts and spits out the completion without knowing what the completion actually means.

My question is, how to do this, to explain to the model that CRI means to create an index? One way I could go is to the direction of making empty prompts and give instructions in completions? Also, my question is, do I need to do it actually because I am wondering maybe the model picks up from the raw training data what CRI is standing actually for by matching the closeness of the internal weight embeddings of training data to elasticsearch operations?

Latest idea I have is that potentially I could use other approach and use embeddings to achieve this behaviour actually, without a fine-tuned model. But still, the question remains on how to pass the instructions through fine-tuning to use existing knowledge in GPT to relate to the completion instead of matching prompts and completions through wide array of training examples.

I greatly appreciate any thoughts you might have about this, and would be happy to get any idea or further clarification or if I might have got anything in this concept wrong (especially from someone who has deeper knowledge of under the hood).