docs
Browse files- README.md +48 -1
- imgs/qa_french.png +0 -0
- imgs/qa_gpus.png +0 -0
- imgs/qa_pasta.png +0 -0
- imgs/qa_tmpdir.png +0 -0
README.md
CHANGED
@@ -1 +1,48 @@
|
|
1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Buster, the Mila cluster chatbot!
|
2 |
+
|
3 |
+
Buster is a chatbot that can answer questions about the Mila cluster. You can try it [here](https://huggingface.co/spaces/jerpint/buster).
|
4 |
+
|
5 |
+
|
6 |
+
![Question about tmpdir](imgs/qa_tmpdir.png)
|
7 |
+
<!---
|
8 |
+
Where should I put my data when running a job?
|
9 |
+
-->
|
10 |
+
|
11 |
+
![Question about GPUs jobs](imgs/qa_gpus.png)
|
12 |
+
<!---
|
13 |
+
How do I run a job with 2 GPUs?
|
14 |
+
-->
|
15 |
+
|
16 |
+
It also works in french, although not as well:
|
17 |
+
![Question en français](imgs/qa_french.png)
|
18 |
+
<!---
|
19 |
+
Comment est-ce que je lance une job avec 2 GPUs?
|
20 |
+
-->
|
21 |
+
|
22 |
+
If you ask a stupid question, you will get a stupid answer:
|
23 |
+
![Dumb question](imgs/qa_pasta.png)
|
24 |
+
<!---
|
25 |
+
What has more calories: a DGX A100 or a pasta salad?
|
26 |
+
-->
|
27 |
+
|
28 |
+
## How does Buster works?
|
29 |
+
|
30 |
+
First, we parsed the [Mila docs](https://docs.mila.quebec/index.html) into snippets. You can see exactly how in [`buster.docparser.get_all_documents`](https://github.com/jerpint/buster/blob/main/buster/docparser.py#L17).
|
31 |
+
|
32 |
+
The resulting snippets can be seen in [`buster/data/documents.csv`](https://github.com/jerpint/buster/blob/main/buster/data/documents.csv).
|
33 |
+
|
34 |
+
For each snippet, we obtain an embedding by using the [OpenAI API](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings).
|
35 |
+
|
36 |
+
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.
|
37 |
+
|
38 |
+
Finally, we craft the prompt:
|
39 |
+
- The most relevant snippet from the doc
|
40 |
+
- The engineering prompt: "Now answer the following question:"
|
41 |
+
- The user's question
|
42 |
+
|
43 |
+
We send the prompt to the [OpenAI API](https://beta.openai.com/docs/api-reference/completions), and display the answer to the user!
|
44 |
+
|
45 |
+
### Currently used models
|
46 |
+
|
47 |
+
- For embeddings: "text-embedding-ada-002"
|
48 |
+
- For completion: "text-davinci-003"
|
imgs/qa_french.png
ADDED
![]() |
imgs/qa_gpus.png
ADDED
![]() |
imgs/qa_pasta.png
ADDED
![]() |
imgs/qa_tmpdir.png
ADDED
![]() |