File size: 1,882 Bytes
e712779
f66e4f3
e712779
 
 
 
 
 
 
 
f713e02
 
 
 
 
e712779
f66e4f3
 
 
 
 
 
 
 
 
 
 
 
f713e02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f66e4f3
f713e02
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: ContextqaSV Tool
emoji: 📊
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 4.42.0
app_file: app.py
pinned: false
---
<p align="center">
  <img src="assets/contextqasv-logo.png" alt="Imagen" width="200" style="display: inline-block; vertical-align: middle;">
</p>

# ContextqaSV

HuggingChat tool for querying law documents from El Salvador. This is a forked and customized version of the [RAG community template](https://huggingface.co/spaces/nsarrazin/rag-tool-template/tree/main)

## Updated or added features

* Better model for texts in Spanish (This tool's target is spanish-speaking people, and the data sources are in Spanish as well)
* Chunk normalization
* Enhanced text splitting logic based on a specific chunk size and the split character (.).
* Cosine similarity instead of dot product for finding text similarities.
* Cached embeddings (local development).
* Typed functions.
* Simplified existing functions.

## How to use?

On the [HuggingChat](https://huggingface.co/chat/) site, follow the next steps:

Click the *Browse more tools* button:

![Brose more tools ss](assets/contextqasv-ss1.png)

Start typing in the search box and click on the **ContextqaSV** tool:

![search and select it ss](assets/contextqasv-ss2.png)

Click on the *Activate* button:

![activate ss](assets/contextqasv-ss3.png)

You're all set! You can now start asking questions about El Salvador's constitution and its traffic regulations:

![start ss](assets/contextqasv-ss4.png)

Note that you can use the [tool's URL](https://hf.co/chat/tools/67a7a96e127c6ef860bce266) to be redirected to HuggingChat and directly show the tool card to activate it (3rd step)

### Contact

For inquiries, contributions, or feedback, please contact [me](mailto:[email protected]). Visit my [github account](https://github.com/zaldivards) and check out my other projects :)