Update README.md
Browse files
README.md
CHANGED
@@ -1,26 +1,81 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
dataset_info:
|
4 |
-
features:
|
5 |
-
- name: xml_sha1
|
6 |
-
dtype: string
|
7 |
-
- name: declaration_xml
|
8 |
-
dtype: string
|
9 |
-
- name: declaration_json
|
10 |
-
dtype: string
|
11 |
-
- name: text_index
|
12 |
-
dtype: string
|
13 |
-
- name: text_index_embedding
|
14 |
-
sequence: float64
|
15 |
-
splits:
|
16 |
-
- name: train
|
17 |
-
num_bytes: 438508943
|
18 |
-
num_examples: 10944
|
19 |
-
download_size: 204548460
|
20 |
-
dataset_size: 438508943
|
21 |
-
configs:
|
22 |
-
- config_name: default
|
23 |
-
data_files:
|
24 |
-
- split: train
|
25 |
-
path: data/train-*
|
26 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
dataset_info:
|
4 |
+
features:
|
5 |
+
- name: xml_sha1
|
6 |
+
dtype: string
|
7 |
+
- name: declaration_xml
|
8 |
+
dtype: string
|
9 |
+
- name: declaration_json
|
10 |
+
dtype: string
|
11 |
+
- name: text_index
|
12 |
+
dtype: string
|
13 |
+
- name: text_index_embedding
|
14 |
+
sequence: float64
|
15 |
+
splits:
|
16 |
+
- name: train
|
17 |
+
num_bytes: 438508943
|
18 |
+
num_examples: 10944
|
19 |
+
download_size: 204548460
|
20 |
+
dataset_size: 438508943
|
21 |
+
configs:
|
22 |
+
- config_name: default
|
23 |
+
data_files:
|
24 |
+
- split: train
|
25 |
+
path: data/train-*
|
26 |
+
---
|
27 |
+
|
28 |
+
# HATVP Declaration Dataset
|
29 |
+
|
30 |
+
This dataset contains declarations from the HATVP (Haute Autorité pour la Transparence de la Vie Publique), converted into a structured format suitable for use in retrieval-augmented generation (RAG) tasks.
|
31 |
+
|
32 |
+
## Dataset Information
|
33 |
+
|
34 |
+
- **License**: `apache-2.0`
|
35 |
+
- **Configurations**: This dataset has one configuration (`default`).
|
36 |
+
- **Download size**: ~205 MB
|
37 |
+
- **Dataset size**: ~439 MB
|
38 |
+
|
39 |
+
## Features
|
40 |
+
|
41 |
+
- `xml_sha1`: SHA1 hash of the `declaration_xml`, useful for version comparison. Computed on 24-04-2024.
|
42 |
+
- `declaration_xml`: Original XML declaration as provided by the HATVP.
|
43 |
+
- `declaration_json`: JSON format of the XML, converted using the XMLTODICT Python library. This format reduces the character count by 25%.
|
44 |
+
- `text_index`: Name, surname, and current job title of the declaring person.
|
45 |
+
- `text_index_embedding`: Embedding vector from the OpenAI `text-embedding-3-large` model, optimized for French language text.
|
46 |
+
|
47 |
+
## Data Splits
|
48 |
+
|
49 |
+
- **Train**: 10,944 examples, occupying about 438.51 MB.
|
50 |
+
|
51 |
+
## Configuration: Default
|
52 |
+
|
53 |
+
- **Data Files**:
|
54 |
+
- `train-*`: Contains the training split data files.
|
55 |
+
|
56 |
+
## Usage
|
57 |
+
|
58 |
+
This dataset facilitates RAG by using a language model to answer questions about individuals based on their HATVP declarations. It is particularly useful for generating factual answers about public figures.
|
59 |
+
|
60 |
+
### Example Usage
|
61 |
+
|
62 |
+
```python
|
63 |
+
# Example of how to use this dataset with a RAG model
|
64 |
+
question = "Où travaille le conjoint de Damien Abad?"
|
65 |
+
# Assume `rag_model` is a pre-trained model loaded and ready to answer
|
66 |
+
answer = rag_model.answer(question)
|
67 |
+
print(answer) # Outputs: "Le conjoint de Damien Abad travaille au Centre Hospitalier du Haut-Bugey."
|
68 |
+
```
|
69 |
+
|
70 |
+
## Example Interactions
|
71 |
+
|
72 |
+
1. **Question**: "Où travaille le conjoint de Damien Abad?"
|
73 |
+
**Answer**: "Le conjoint de Damien Abad travaille au Centre Hospitalier du Haut-Bugey."
|
74 |
+
|
75 |
+
2. **Question**: "Combien est payé Damien Abad en 2019?"
|
76 |
+
**Answer**: "According to the provided context, Damien Abad was paid 71,105 euros in 2019."
|
77 |
+
|
78 |
+
3. **Question**: "Le conjoint de Damien Abad est-il un homme ou une femme?"
|
79 |
+
**Answer**: "Le conjoint de Damien Abad est une femme, car il est mentionné que son conjoint est une infirmière."
|
80 |
+
|
81 |
+
(Answers vary between French and English depending on the language model used for answering.)
|