Earlier quoted context omitted.
Yep, that's the way it's currently implemented in langchain. The 4 is a hyperparameter you can change, though, so you could set it to 10 as well. The way it works is that it first looks up the N most relevant documents (N being 4 in the default case) in the FAISS store relevant to the question, so it uses distance of embedding vectors for this lookup. Then it uses GPT3 to get summaries of the 4 entries related to the…
Looks interesting! Have you considered a proper vector database like Qdrant ( https://qdrant.tech )? FAISS runs on a single machine, but if you want to scale things up, then a real database makes it a lot easier. And with a free 1GB cluster on Qdrant Cloud ( https://cloud.qdrant.io ), you can store quite a lot of vectors. Qdrant is also already integrated with Langchain.
Your website's content -> Q&A bot / chatbot
21–28 of 28 posts
Re: Your website's content -> Q&A bot / chatbot
#22Might be a fun weekend experiment.
Re: Your website's content -> Q&A bot / chatbot
#23Curious to see if it can take my entire site content: https://taoofmac.com/static/graph Might be a fun weekend experiment.
Should be fine, though, as it iterates over it, it creates embeddings and then stores them in the FAISS store (https://github.com/facebookresearch/faiss) which was created to handle a large amount of embeddings.
For the actual queries, it filters it down by the most relevant documents which are closest in the embedding space, so this should work.
Let me know how it goes!
Re: Your website's content -> Q&A bot / chatbot
#24For anyone interested in an audio version that talks to you, that you can get on your site today, my brother put this together a few weeks ago! https://siteguide.ai/
Re: Your website's content -> Q&A bot / chatbot
#25Earlier quoted context omitted.
Looks interesting! Have you considered a proper vector database like Qdrant ( https://qdrant.tech )? FAISS runs on a single machine, but if you want to scale things up, then a real database makes it a lot easier. And with a free 1GB cluster on Qdrant Cloud ( https://cloud.qdrant.io ), you can store quite a lot of vectors. Qdrant is also already integrated with Langchain.
Probably not very helpful at the scale most people would run this. Even brute forcing the search on CPU gives results in a few ms on small datasets.
https://github.com/FeatureBaseDB/slothbot/blob/slothbot-work...
Re: Your website's content -> Q&A bot / chatbot
#26Nice to have tools like this to wrap up features, definitely makes these types of solutions more accessible, thanks! It would be nice to know from your experience if there is a kind of rule of thumb for calculating cost of fine tuning and running a solution like this against a docs site?
I don't have larger scale experience on this at the moment, but I can tell you what I observed during my trials (also see my related blog entry for some more info: https://www.paepper.com/blog/posts/build-q-and-a-bot-of-your... ) It cost around 0.05$ to create the embeddings for my ~50 blog entries. Asking a question in the way I've described it also costs around 0.05$ via the API.
Re: Your website's content -> Q&A bot / chatbot
#27Earlier quoted context omitted.
Probably not very helpful at the scale most people would run this. Even brute forcing the search on CPU gives results in a few ms on small datasets.
Using something like Weaviate, which can be started in Docker with a one-liner, will give the ability to move away or toward dense vectors by concept. While doing dot product with manual code is fairly easy, using Weaviate to do the lifting (for embeddings as well) makes things super simple. https://github.com/FeatureBaseDB/slothbot/blob/slothbot-work...
Re: Your website's content -> Q&A bot / chatbot
#28Please advise. Thank you.