File size: 3,291 Bytes
fd4087d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
license: cc-by-nc-sa-4.0
language:
- nso
- en
task_categories:
- text-retrieval
- question-answering
size_categories:
- 1K<n<10K
pretty_name: EduIntel FAISS Index v1
tags:
- sepedi
- sesotho-sa-leboa
- northern-sotho
- south-africa
- low-resource
- rag
- faiss
- vector-search
- embeddings
- eduintel
---

# EduIntel FAISS Index v1

A **FAISS vector index** of Sepedi (Sesotho sa Leboa) text chunks for the
**EduIntel RAG pipeline**, built by **Sediba AI**.

This is **not a model** — it is a retrieval index. It stores chunked Sepedi text and their
embeddings so that a retriever can find relevant Sepedi content for a query, which is then
fed to a generative model (e.g. [Sedibaai/SedibaLM](https://huggingface.co/Sedibaai/SedibaLM))
for answer generation.

## Contents

| File | Purpose |
|---|---|
| `eduintel.index` | The FAISS index (flat or IVF vector store) |
| `chunks.pkl` | The chunked Sepedi text aligned to the index rows |
| `model.txt` | Embedding model used: **`Sediba-AI/xlmr-sepedi`** (XLM-RoBERTa-base, further pre-trained on Sepedi) |
| `.gitattributes` | Git LFS pointer |

## Usage

```python
import faiss, pickle

index = faiss.read_index("eduintel.index")
chunks = pickle.load(open("chunks.pkl", "rb"))

# embed your query with the SAME model listed in model.txt
from transformers import AutoTokenizer, AutoModel
tok = AutoTokenizer.from_pretrained("Sediba-AI/xlmr-sepedi")
mdl = AutoModel.from_pretrained("Sediba-AI/xlmr-sepedi")
inputs = tok("Your Sepedi query", return_tensors="pt", padding=True, truncation=True)
emb = mdl(**inputs).last_hidden_state.mean(dim=1).detach().numpy()

D, I = index.search(emb, k=5)
retrieved = [chunks[i] for i in I[0]]
```

**Important:** you must embed with the same model recorded in `model.txt`
(`Sediba-AI/xlmr-sepedi`). A different embedding model produces vectors in an incompatible
space and the retrieval silently returns garbage.

## What this feeds

This index is the **retrieval layer** of the EduIntel application — the teacher-facing
education intelligence surface of the TST platform. The flow is:

```
Sepedi query → xlmr-sepedi embed → FAISS retrieval → Sepedi chunks → SedibaLM → response
```

## Licence

**CC BY-NC-SA 4.0** — attribution, non-commercial, share-alike.

This is the **interim** licence. The chunked text derives from the Sediba Sepedi training corpora
([`Sediba-AI/sepedi-training-v1`](https://huggingface.co/datasets/Sediba-AI/sepedi-training-v1)),
which are governed by **NOODL** (Northern-Sotho Open Data Licence) pending legal review. The
FAISS index is a derivative work of that corpus and inherits its licence obligations.

**Commercial use requires a separate agreement** with Sediba AI NPC.

## Limitations

- **No formal data-licence audit** has been completed on the underlying corpus — see the
  `sepedi-training-v1` dataset card.
- **Chunk quality is not scored.** The index mixes curated, scraped and synthetic material.
- **Embedding model is a research artefact** (`xlmr-sepedi` has no published evaluation).
- **Not a knowledge base** — it is a retrieval index. It cannot answer questions by itself.

## About

Built by **Sediba AI** — sovereign AI for South African languages, starting with Sepedi
(~4.7 million speakers), Mankweng, Limpopo, South Africa.