News for hackers. Stuff that matters.
Re:Run and create custom ChatGPT-like bots with OpenChat by underlines on Wednesday June 07, 2023 @08:35AM (#36225995)
Disclaimer: I am curating LLM-tools on github [1]

A few thoughts:

* allow for custom endpoint URLs, this way people can use open source LLMs with a fake openAI API backend like basaran[2] or llama-api-server[3]

* look into better embedding methods for info-retrieval like InstructorEmbeddings or Document Summary Index

* Don't use a single embedding per content item, use multiple to increase retrieval quality

1 https://github.com/underlines/awesome-marketing-datascience/...

2 https://github.com/hyperonym/basaran

3 https://github.com/iaalm/llama-api-server

Re:Run and create custom ChatGPT-like bots with OpenChat by forgingahead on Wednesday June 07, 2023 @08:54AM (#36226175)
* Don't use a single embedding per content item, use multiple to increase retrieval quality

Can you share some specific examples of what you mean by this? How would you process specific info types (eg: news article, or web page, or product catalogue data) this way, and how would you handle retrieval that makes the quality "better"?

Re:Run and create custom ChatGPT-like bots with OpenChat by lgas on Wednesday June 07, 2023 @09:42AM (#36226695)
I'm curious about more sophisticated answers to this question, but the obvious approach would be to split the article or web page into sentences and do an embedding per sentence.
Re:Run and create custom ChatGPT-like bots with OpenChat by mrtranscendence on Wednesday June 07, 2023 @10:06AM (#36226944)
When I was playing around with search via embeddings (as a test I was using Vampire the Masquerade V5 sourcebooks, and asking rules questions), I got the best results -- in terms of correct answers -- by using sentence embeddings. I'd search the query against the sentence embeddings, and then retrieve more context surrounding the winning sentence(s). That context would be passed to the LLM.

It wasn't perfect, though. I'm tempted to try the avenue of having an LLM generate questions for each passage and then use those embeddings, but it sounds a bit expensive to set up given the length of the books.

Re:Run and create custom ChatGPT-like bots with OpenChat by lgas on Friday June 09, 2023 @09:04PM (#36266498)
Sentence embeddings + retrieving context makes sense.

By any chance, have you done any work with indexing code using embeddings? I'd like to do something similar there, but there's no obvious notion of "sentence", especially across languages.

Probably the closest analogue is just lines of code, but breaking lines on newlines might break an expression in the middle removing meaning from both halves.

I was planning on trying indexing overlapping groups of lines but haven't had time yet.

Re:Run and create custom ChatGPT-like bots with OpenChat by sandkoan on Wednesday June 07, 2023 @09:34AM (#36226610)
* * *
Re:Run and create custom ChatGPT-like bots with OpenChat by iamflimflam1 on Wednesday June 07, 2023 @09:50AM (#36226773)
There are a couple of things that can help. As has been pointed out by other commenters - chunking up content is very useful.

The other often neglected approach is to use an LLM to derive new content and use the embedding of this as well.

E.g. ask the LLM “give me a list of questions that can be answered by the following passage”

You then use embeddings of the generated questions instead of embeddings of the original content.

Re:Run and create custom ChatGPT-like bots with OpenChat by jerpint on Wednesday June 07, 2023 @09:58AM (#36226856)
another approach is HyDE, where you ask the LLM to come up with a plausible (but likely wrong) answer, and use the embedding of the wrong answer to find the appropriate chunk, pretty clever
Re:Run and create custom ChatGPT-like bots with OpenChat by lhenault on Wednesday June 07, 2023 @10:45AM (#36227435)
Using this as an opportunity to mention my own related project, perhaps it can end up on your nice list one day. :)

https://github.com/lhenault/SimpleAI

Re:Run and create custom ChatGPT-like bots with OpenChat by underlines on Friday June 16, 2023 @05:54AM (#36354005)
added to the list :) thanks!
Re:Run and create custom ChatGPT-like bots with OpenChat by moneywoes on Wednesday June 07, 2023 @11:05AM (#36227723)
Do you have a list somewhere, most impressive project you’ve seen?