You don't train on documents. There are many startups claiming that but they are deliberately using a misleading term because they know that's what people are searching for. You still do RAG. Llamaindex is still the best option that I know of. Most of the startups that have working products are likely using llamaindex. All of the ones that say they are training on documents are actually using RAG. Test it out. If it…
What is RAG? That's hard to search for
Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
61–70 of 247 posts
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#62Earlier quoted context omitted.
Another question, which one is preferred, LlamaIndex or Langchain, for RAG? Thanks in advance for your insights.
You basically don't use langchain for anything besides 30 minute demos that you copied from someone else's github. It has a completely spaghettified API, is not performant, and forces you into excessive mental contortions to reason about otherwise simple tasks. LlamaIndex is pretty good.
We originally started out building features with LangChain (loading chains from YAML sounded good—it felt like it would be easy to get non-engineers to help with prompt development) but in practice it’s just way too complicated. Nice idea, but the execution feels lacking.
It also doesn’t help that LangChain is evolving so rapidly. When we first started using it a lot of code samples on the internet couldn’t be copy/pasted because of import paths changing, and at one point we had to bump by ~60 patch versions to get a bug fix, which was painful because it broke all kinds of stuff
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#63Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#64Earlier quoted context omitted.
Thanks. Is it possible to have persistent RAG in Azure AI Studio though? I found only a preview version of uploading files that are available to model, but when using this model through API, this uploaded data is not available to the model Likely I misunderstood about how RAG works with Azure AI Studio, so sorry in advance
https://github.com/azure/aistudio-copilot-sample Check it out, specifically steps 3 and 4. As with almost every Microsoft CLI tool and SDK, it's clunky... and you can tell everyone is rushing this AI shit out as fast as they can to stay in the game. But what you want should be doable.
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#65GPT-4 Turbo has a 128K (~300 pages) context window, which probably handles a lot of use cases which might have previously needed extra training/refinement.
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#66Fine 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...
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#67Other 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. ;-)
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#68Slightly off topic but is there recommended advice on how to tune / train not for document retrieval but for consistent JSON output with specific enums? i.e given a text, always return back a certain set of fields. For some keys here is the possible set of enums etc. One shot prompting does work but curious how others approach this if you have training data on hand.
Crude, I know, but it’s compatible with every model. Which is useful if you want to compare the many different models out there.
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#69Earlier quoted context omitted.
https://docs.aws.amazon.com/bedrock/latest/userguide/quotas....
I’m sorry, I don’t understand those limits. It uses a lot of unfamiliar terms like “batch inference” and “modality”. I just want a nice UI that I can give my hard-drive to and then ask it questions.
Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?
#70With 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…