Buster, the Mila cluster chatbot!
Buster is a chatbot that can answer questions about the Mila cluster. You can try it here.
It also works in french, although not as well:
If you ask a stupid question, you will get a stupid answer:
How does Buster works?
First, we parsed the Mila docs into snippets. You can see exactly how in buster.docparser.get_all_documents
.
The resulting snippets can be seen in buster/data/documents.csv
.
For each snippet, we obtain an embedding by using the OpenAI API.
Then, when a user asks a question, we compute its embedding, find the snippet from the doc with the highest cosine similarity to the question.
Finally, we craft the prompt:
- The most relevant snippet from the doc
- The engineering prompt: "Now answer the following question:"
- The user's question
We send the prompt to the OpenAI API, and display the answer to the user!
Currently used models
- For embeddings: "text-embedding-ada-002"
- For completion: "text-davinci-003"