Live data from Hacker News

Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

news.ycombinator.com

11–20 of 247 posts

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#11

Train on your own documents or analyze your own documents for answers? Very different things. For the first (fine tuning) follow “AI Jason” on YouTube. He has some great tutorials. For the second (RAG or similar), fire up a cloud VM with GPUs or use Ollama locally and read through the LlamaIndex docs on how to build a RAG pipeline.

Would you kindly elaborate a little bit the difference between training on own documents vs analyzing documents for answers?

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#12
post #5

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…

Well said. The problem is, there are way too many alternatives. Any idea how llamaindex's ingestion engine compares to unstructured.io? ( Which is used in langchain)

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#13
post #5

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…

To sing the praises of Bedrock again, it does have continuous pre-training as well as RAG “knowledge bases”. The former is based on JSON fragments and the RAG stuff is PDFs and other document formats.

With regards to its efficacy, I haven’t gone to production with it yet but I was reasonably impressed.

I uploaded 100 legal case documents to Bedrock via Claude and could push it pretty hard asking about the various cases and for situations across the knowledge base.

It did feel like it broke down and got confused at a certain point of complexity of questioning, but I still think it’s already useful as a “copilot” or search engine and surely it will only improve over time.

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#15
post #5

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

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#16
post #5

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

Retrieval-augmented generation, RAG + LLM will turn up more results.

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#17
Slightly 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.

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#18
post #8
post #5

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…

Are there public examples of working products using RAG, compared with fine-tuning or training from scratch?

Copilots use RAG:

https://www.microsoft.com/en-us/research/group/dynamics-insi...

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#19

AWS Bedrock is fairly easy. You can do it in 5 or 6 clicks. You have to upload your documents to S3, create a “Knowledge Base” then sync your documents into a vector database like OpenSearch or PineCone. You are then good to go via their playground or the AWS API. I made a video here describing the process, check around 14 minutes in: https://ensembleanalytics.io/blog/introducing-bedrock-knowle... Bedrock is a decent…

Is there a limit? Could I create a knowledge base with 10,000 documents? 100k? 1M?

Re: Ask HN: How do I train a custom LLM/ChatGPT on my own documents in Dec 2023?

#20
post #7
post #4

I haven't personally tried this for anything serious yet, but to get the thread started: Cheshire Cat [0] looks promising. It's a framework for building AI assistants by providing it with documents that it stores as "memories" that can be retrieved later. I'm not sure how well it works yet, but it has an active community on Discord and seems to be developing rapidly. The main perk over the cloud options is that you c…

But that's not training. That's RAG. They seem to be using qdrant which I believe is a vector store.

They've updated the question to clarify that RAG counts, and as many have noted, properly "training" on a set of documents isn't really a thing.
Post reply on HN