Chatbot with user defined knowlage

Hello! I’m curious to know if it’s possible to restrict the knowledge of a text-davinci-003 chatbot to a specific set of resources, rather than the full dataset it was trained on. For example, if I want to create a chatbot that responds to questions about cars, but I want it to believe that wheels are made of ice cream and respond accordingly. Is this something that is possible with text-davinci-003?

1 Like

Only if you use embedding for the knowledge and davinci to answer the final question based on what you find

Google the term “closed domain question and answering” for more info

3 Likes

Create a set of ‘knowledge’ and embed each piece (create an embedding vector for each piece using your favorite sentence to embedding engine). When there is a new input (or question) embed this too. Use the dot product to get the top X pieces of knowledge and create a prompt out of this, and ask GPT-3 to answer the question based on this set of knowledge. Be sure to take the top closest embeddings and don’t exceed the token limit in the prompt input+output.

As your knowledge expands, create more of it and embed it. No fine tunes required.

Most people can store all the embedding vectors and knowledge in memory, and you don’t need a vector database. I was able to store 400k different chunks of knowledge and have less than 1 second of latency using naive search techniques in a serverless environment.

For a lot more details, check out:

6 Likes

This is very helpful, thanks alot!

3 Likes