Spaces:
Paused
Paused
Update README.md (#435)
Browse files* Update README.md
* add description of websearch on readme
* Apply suggestions from code review
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
* Update README.md
---------
Co-authored-by: Mishig Davaadorj <dmishig@gmail.com>
Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
README.md
CHANGED
|
@@ -12,16 +12,17 @@ app_port: 3000
|
|
| 12 |
|
| 13 |
# Chat UI
|
| 14 |
|
| 15 |
-
.
|
| 18 |
|
| 19 |
0. [No Setup Deploy](#no-setup-deploy)
|
| 20 |
1. [Setup](#setup)
|
| 21 |
2. [Launch](#launch)
|
| 22 |
-
3. [
|
| 23 |
-
4. [
|
| 24 |
-
5. [
|
|
|
|
| 25 |
|
| 26 |
## No Setup Deploy
|
| 27 |
|
|
@@ -70,6 +71,16 @@ npm install
|
|
| 70 |
npm run dev
|
| 71 |
```
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
## Extra parameters
|
| 74 |
|
| 75 |
### OpenID connect
|
|
|
|
| 12 |
|
| 13 |
# Chat UI
|
| 14 |
|
| 15 |
+

|
| 16 |
|
| 17 |
A chat interface using open source models, eg OpenAssistant or Llama. It is a SvelteKit app and it powers the [HuggingChat app on hf.co/chat](https://huggingface.co/chat).
|
| 18 |
|
| 19 |
0. [No Setup Deploy](#no-setup-deploy)
|
| 20 |
1. [Setup](#setup)
|
| 21 |
2. [Launch](#launch)
|
| 22 |
+
3. [Web Search](#web-search)
|
| 23 |
+
4. [Extra parameters](#extra-parameters)
|
| 24 |
+
5. [Deploying to a HF Space](#deploying-to-a-hf-space)
|
| 25 |
+
6. [Building](#building)
|
| 26 |
|
| 27 |
## No Setup Deploy
|
| 28 |
|
|
|
|
| 71 |
npm run dev
|
| 72 |
```
|
| 73 |
|
| 74 |
+
## Web Search
|
| 75 |
+
|
| 76 |
+
Chat UI features a powerful Web Search feature. It works by:
|
| 77 |
+
|
| 78 |
+
1. Generating an appropriate Google query from the user prompt.
|
| 79 |
+
2. Performing Google search and extracting content from webpages.
|
| 80 |
+
3. Creating embeddings from texts using [transformers.js](https://huggingface.co/docs/transformers.js). Specifically, using [Xenova/e5-small-v2](https://huggingface.co/Xenova/e5-small-v2) model.
|
| 81 |
+
4. From these embeddings, find the ones that are closest to the user query using vector similarity search. Specifically, we use `inner product` distance.
|
| 82 |
+
5. Get the corresponding texts to those closest embeddings and perform [Retrieval-Augmented Generation](https://huggingface.co/papers/2005.11401) (i.e. expand user prompt by adding those texts so that a LLM can use this information).
|
| 83 |
+
|
| 84 |
## Extra parameters
|
| 85 |
|
| 86 |
### OpenID connect
|