With OpenAI, you can first build Question & Answer pairs derived from your documents and use the OpenAI fine-tuning feature to build yourself a custom model. This method is more than just learning behavior in that facts do get recalled. I have written about it here, with a play demo use-case: https://ndurner.github.io/training-own-model-finetuning
Note that I have yet to use this in a real world use-case, and I would love to hear feedback.
Other than OpenAI, there is the newly introduced „continued pre-training“ of Amazon Bedrock - but I haven’t tried.
RAG: I think that‘s a fundamentally flawed concept, but RAGfluencers will disagree. ;-)