Re:Ask HN: How do I train a custom LLM/ChatGPT on my own doc...
by ilaksh on Monday December 25, 2023 @06:21AM
(#38761702)
https://docs.llamaindex.ai/en/stable/examples/retrievers/bm2...
Also maybe try to include tags or categories when you index and then you can filter on those when doing the vector search. Might get a similar effect from BM25.
Also llamaindex does RAG better than some other solutions.
Re:Ask HN: How do I train a custom LLM/ChatGPT on my own doc...
by simonw on Monday December 25, 2023 @11:07AM
(#38763697)
I've been trying out an interesting embedding model that knows how to treat text as a question be as a phrase about the world, and embeds the question such that it's likely to end up close to phrases that might answer that question: https://til.simonwillison.net/llms/embed-paragraphs
Embedding and chunking large amounts of documents is expensive though, in both compute and storage.
The other trick I've been planning to explore is using an LLM to turn the user's question into a small number of normal FTS search queries and then run those to try and get context data.
Re:Ask HN: How do I train a custom LLM/ChatGPT on my own doc...
by akrymski on Monday December 25, 2023 @12:08PM
(#38764212)
> The other trick I've been planning to explore is using an LLM to turn the user's question into a small number of normal FTS search queries and then run those to try and get context data.
I have also been working on this. I still fail to see why this approach isn't the default frankly. There's little benefit to vector databases.
We use RAG at my job, but we don’t do any preprocessing on the message from the user, so the results are not always great for us.
Do any of you have experience using a small local model just for extracting keywords from messages which you then use for the retrieval? And then feed the search result and your prompt into OpenAI or whatever as normal.