Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
800 pointsThere is a 5 month old thread [1] on this, but it might be already outdated.
What is the best approach for feeding custom set of documents to LLM and get non-halucinating and decent result in Dec 2023?
UPD: The question is generally about how to "teach" LLM answer questions using your set of documents (not necessarily train your own, so approaches like RAG counts)
[1] https://news.ycombinator.com/item?id=36832572
Comments (237) 63 threads
Show all comments
Showing thread 4 of 63
Fine tuning does result in degradation of the overall model (https://twitter.com/xaiguydotagi/status/1737082280835703142) and so various RAG techniques may be desirable. As others have mentioned, LlamaIndex is a neat solution to build RAG pipelines: https://docs.llamaindex.ai/en/stable/optimizing/production_r...
I think harpercarrol link is a pretty good one, but it basically just feeds in the documents for completion, which isn't a good approach. The dataset needs to represent how you want to use it.
This one might also be helpful https://www.deeplearning.ai/short-courses/finetuning-large-l...
Honestly surprised how almost everyone is saying to use RAG (on its own). One strong benefit to RAG is the data can change, but has lots of failure modes.
People often use hybrid search (fuzzy or bm25 etc alongside embedding search) which I suppose is still RAG.
But fine-tuning models to be better at RAG is valuable as well, increasing accuracy.
https://ragntune.com/blog/Fine-tuning-an-LLM-to-be-good-at-R...
Ideally, I'd try both. Fine tune on both the documents (create a question / answer dataset with gpt4) and rag instruction fine tune it.