Update README (#33)
Browse files- README.md +10 -32
- buster/imgs/qa_french.png +0 -0
- buster/imgs/qa_gpus.png +0 -0
- buster/imgs/qa_pasta.png +0 -0
- buster/imgs/qa_tmpdir.png +0 -0
- buster/imgs/qa_web_load.png +0 -0
- buster/imgs/qa_web_oom.png +0 -0
README.md
CHANGED
@@ -1,44 +1,22 @@
|
|
1 |
-
# Buster, the
|
2 |
|
3 |
-
Buster is a chatbot that can
|
4 |
|
5 |
|
6 |
-
![Question
|
7 |
-
<!---
|
8 |
-
Where should I put my data when running a job?
|
9 |
-
-->
|
10 |
|
11 |
-
![Question
|
12 |
-
<!---
|
13 |
-
How do I run a job with 2 GPUs?
|
14 |
-
-->
|
15 |
|
16 |
-
|
17 |
-
![Question en français](buster/imgs/qa_french.png)
|
18 |
-
<!---
|
19 |
-
Comment est-ce que je lance une job avec 2 GPUs?
|
20 |
-
-->
|
21 |
|
22 |
-
|
23 |
-
![Dumb question](buster/imgs/qa_pasta.png)
|
24 |
-
<!---
|
25 |
-
What has more calories: a DGX A100 or a pasta salad?
|
26 |
-
-->
|
27 |
|
28 |
-
|
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
|
40 |
-
- The engineering prompt
|
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 |
|
|
|
1 |
+
# Buster, the QA documentation chatbot!
|
2 |
|
3 |
+
Buster is a question-answering chatbot that can be tuned to specific documentations. You can try it [here](https://huggingface.co/spaces/jerpint/buster), where it will answer questions about [🤗 Transformers](https://huggingface.co/docs/transformers/index).
|
4 |
|
5 |
|
6 |
+
![Question: How do I load a Huggingface model?](buster/imgs/qa_web_load.png)
|
|
|
|
|
|
|
7 |
|
8 |
+
![Question: My code is crashing with "CUDA out of memory". What can I do to solve this?](buster/imgs/qa_web_oom.png)
|
|
|
|
|
|
|
9 |
|
10 |
+
## How does Buster work?
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
First, we parsed the documentation into snippets. For each snippet, we obtain an embedding by using the [OpenAI API](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings).
|
|
|
|
|
|
|
|
|
13 |
|
14 |
+
Then, when a user asks a question, we compute its embedding, and find the snippets from the doc with the highest cosine similarity to the question.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
Finally, we craft the prompt:
|
17 |
+
- The most relevant snippets from the doc.
|
18 |
+
- The engineering prompt.
|
19 |
+
- The user's question.
|
20 |
|
21 |
We send the prompt to the [OpenAI API](https://beta.openai.com/docs/api-reference/completions), and display the answer to the user!
|
22 |
|
buster/imgs/qa_french.png
DELETED
Binary file (74.4 kB)
|
|
buster/imgs/qa_gpus.png
DELETED
Binary file (95.4 kB)
|
|
buster/imgs/qa_pasta.png
DELETED
Binary file (38.1 kB)
|
|
buster/imgs/qa_tmpdir.png
DELETED
Binary file (56.9 kB)
|
|
buster/imgs/qa_web_load.png
ADDED
buster/imgs/qa_web_oom.png
ADDED