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

91–100 of 247 posts

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

#91

Earlier quoted context omitted.

What is RAG? That's hard to search for

Off Topic; It fascinates me how much variance there is in peoples searching skills. some people think they are talking to a person when searching e.g 'what is the best way that i can {action}' I think the number one trick is to forget grammar and other language niceties and just enter concepts e.g. 'clean car best'

That’s why they will love chatgpt

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

#93
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". I found success from "rag llm tutorial" as a search input to better explain the process.

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

#95
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 cas…

Oh Great! How did you evaluate the LLM responses? I'm cofounder of an evaluation and monitoring platform - Athina AI (www.athina.ai) You can use our monitoring dashboard and evals to check your LLM performance and iterate quickly.

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

#96

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…

How does bedrock satisfy the non-hallucinating requirement?

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

#97
post #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.

Ask the model nicely, check any json in the output against your schema, regenerate if it doesn’t match. Crude, I know, but it’s compatible with every model. Which is useful if you want to compare the many different models out there.

That is a fairly good strategy. Six years ago at Capital One, I experimented with generating synthetic JSON AWS CloudWatch files for testing (that would not contain any sensitive information). Way back then I used LSTM models and I simply had code to check output and only keep valid samples.

LLMs are so much better for this than LSTMs now.

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

#98
post #44
post #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.

Microsoft Guidance will do this.

Seems Microsoft spun them out and gave them independence. Not sure why, given it's the kind of IP that helps keep microsoft dominant.

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

#99
post #9

GPT-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.

Long context length models are still mostly a mirage with the "lost in the middle" phenomenon rearing it's ugly little head on actual production use-cases of this.

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

#100

Many services/platforms are careless/disingenuous when they claim they “train” on your documents, where they actually mean they do RAG. An under-appreciate benefit of RAG is the ability to have the LLM cite sources for its answers (which are in principle automatically/manually verifiable). You lose this citation ability when you finetune on your documents. In Langroid (the Multi-Agent framework from ex-CMU/UW-Madison…

Thanks. I just read through your Colab examples notebook.
Post reply on HN