Update README.md
Browse files
README.md
CHANGED
|
@@ -99,8 +99,18 @@ There was no need here to split characters here.
|
|
| 99 |
|
| 100 |
Each `chunk_text` was embedded using the [**`BAAI/bge-m3`**](https://huggingface.co/BAAI/bge-m3) model. The resulting embedding vector is stored in the `embeddings_bge-m3` column as a **string**, but can easily be parsed back into a `list[float]` or NumPy array.
|
| 101 |
|
| 102 |
-
##
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
```python
|
| 106 |
import pandas as pd
|
|
@@ -112,8 +122,8 @@ dataset = load_dataset("AgentPublic/state-administrations-directory")
|
|
| 112 |
df = pd.DataFrame(dataset['train'])
|
| 113 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 114 |
```
|
|
|
|
| 115 |
|
| 116 |
-
Otherwise, if you have already downloaded all parquet files from the `data/state-administrations-directory-latest/` folder :
|
| 117 |
```python
|
| 118 |
import pandas as pd
|
| 119 |
import json
|
|
|
|
| 99 |
|
| 100 |
Each `chunk_text` was embedded using the [**`BAAI/bge-m3`**](https://huggingface.co/BAAI/bge-m3) model. The resulting embedding vector is stored in the `embeddings_bge-m3` column as a **string**, but can easily be parsed back into a `list[float]` or NumPy array.
|
| 101 |
|
| 102 |
+
## 🎓 Tutorials
|
| 103 |
+
|
| 104 |
+
### 🤖 1. How to load MediaTech's datasets from Hugging Face and use them in a RAG pipeline ?
|
| 105 |
+
|
| 106 |
+
To learn how to load MediaTech's datasets from Hugging Face and integrate them into a Retrieval-Augmented Generation (RAG) pipeline, check out our [step-by-step RAG tutorial available on our GitHub repository !](https://github.com/etalab-ia/mediatech/blob/main/docs/hugging_face_rag_tutorial.ipynb)
|
| 107 |
+
|
| 108 |
+
### 📌 2. Embedding Use Notice
|
| 109 |
+
|
| 110 |
+
⚠️ The `embeddings_bge-m3` column is stored as a **stringified list** of floats (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 111 |
+
To use it as a vector, you need to parse it into a list of floats or NumPy array.
|
| 112 |
+
|
| 113 |
+
#### Using the `datasets` library:
|
| 114 |
|
| 115 |
```python
|
| 116 |
import pandas as pd
|
|
|
|
| 122 |
df = pd.DataFrame(dataset['train'])
|
| 123 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 124 |
```
|
| 125 |
+
#### Using downloaded local Parquet files:
|
| 126 |
|
|
|
|
| 127 |
```python
|
| 128 |
import pandas as pd
|
| 129 |
import json
|