I recently heard an interesting comment from a gentleman on YouTube and it made sense instantly.

To paraphrase he explained that "fine-tuning" an LM is not necessarily adding knowledge to a model - it is rather teaching that model to do or suggest things in the style of the fine-tuning data.

So then my question is what if one does not want to change the model too much - just wants to make a model aware of a new set of data i.e.: a companies internal domain knowledge? Is there a recommended strategy?

Edit: My thought is some sort of distillation where you train a smaller or same model against itself - plus the additional data.

  • 1
    $\begingroup$ They are tunable. Try treating them like a machine learner (they are) and augmenting their training. Remember that in moving toward your stuff, they likely move away from their center, whatever that is. youtube.com/watch?v=8ZW1E017VEc&t=2112s $\endgroup$ May 22, 2023 at 20:25
  • 1
    $\begingroup$ @EngrStudent That's a great interview. I has started it a while back. $\endgroup$
    – Edv Beq
    May 22, 2023 at 22:06

3 Answers 3


Have a look at llamaindex or langchain for information injection in the promt of the llm: https://gpt-index.readthedocs.io/en/latest/index.html

This retrieve-augment-generate (RAG) works without Finetuning/prolonged pre-training but comes with the cost of having to pay for the additional tokens in your "pre-promt" which is where you inject your new information

Also note that

  1. pretraining or fine-tuning modifies the parameters $\theta$ of your neural net $f_\theta(x)$.
  2. RAG on the other hand improves/modifies the input $x$ supplied to your model.
  • $\begingroup$ Are you taking about pre-prompts - and isn't that limited to max tokens which is not a lot currently? $\endgroup$
    – Edv Beq
    May 25, 2023 at 13:00
  • $\begingroup$ Yes it is pre-promts and yes those are limited to max_tokens. If the rumours are true, for gpt4 we have 32000 max_tokens when they finally release it fully. This would be ~ 64000 words. This is more than many books have. Still it would be costly but Moore's law is with us, so costs per token will only drop! $\endgroup$
    – Ggjj11
    May 25, 2023 at 17:51
  • $\begingroup$ Link is broken. $\endgroup$
    – Lance
    Aug 11, 2023 at 8:35

From LIMA: Less Is More for Alignment (2023) by Chunting Zhou et al.:

These results strongly suggest that almost all knowledge in large language models is learned during pretraining, and only limited instruction tuning data is necessary to teach models to produce high quality output.

Remains prolonged pre-training and adding information in the prompt, as Ggjj11 suggested.


The common way is through providing a context to a prompt. GPT type of bots' APIs allow for providing large amount of text for a context, e.g. 64K in a bot that I use. Also look up retrieval-augmented generation (RAG).

The way I use this in my teaching is by supplying the text of my slides and lecture notes to the bot when conversing with it. So that a bot can use the context to come up with better answers than a general bot.

  • $\begingroup$ Just curious if the large context is only available through api calls. I use ChatGpt and the UI does not allow very many words. Or perhaps, the large context is only allowed through system chat through the api as well. $\endgroup$
    – Edv Beq
    Aug 11, 2023 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.