eduintel-faiss / README.md
Sediba-AI's picture
docs: real dataset card - FAISS index, CC BY-NC-SA 4.0, xlmr-sepedi embedder, RAG retrieval layer
fd4087d verified
|
Raw
History Blame Contribute Delete
3.29 kB
---
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.