Skip to content
Back to skills

Kencorpus Qa Eval

ASecurity

Evaluates machine reading comprehension and question answering on low-resource Kiswahili. It tests a model's ability to read short stories and accurately extract or generate answers to posed questions. The protocol uses a held-out test split to measure token-level overlap and exact string matching against ground truth answers. Use when the user wants to benchmark on KenSwQuAD, or asks about evaluating this task. Reports F1 score.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythongotestingperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill kencorpus-qa-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Kencorpus Qa Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Kencorpus Qa Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-kencorpus-qa-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-kencorpus-qa-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: kencorpus-qa-eval
description: Evaluates machine reading comprehension and question answering on low-resource Kiswahili. It tests a model's ability to read short stories and accurately extract or generate answers to posed questions. The protocol uses a held-out test split to measure token-level overlap and exact string matching against ground truth answers. Use when the user wants to benchmark on KenSwQuAD, or asks about evaluating this task. Reports F1 score.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2208.12081
  bibtex_key: [REDACTED]
  confidence: high
---

# kencorpus-qa-eval

> Kencorpus: A Kenyan Language Corpus of Swahili, Dholuo and Luhya for Natural Language Processing Tasks — Wanjawa et al. (2022) (arXiv:2208.12081, 2022)

## What this evaluates

Evaluates machine reading comprehension and question answering on low-resource Kiswahili. It tests a model's ability to read short stories and accurately extract or generate answers to posed questions. The protocol uses a held-out test split to measure token-level overlap and exact string matching against ground truth answers.

## Datasets

- **KenSwQuAD** — total 7537; splits: train (400), test (100)

## Metrics

- `F1 score` **(primary)** — range: [0, 1]
  - Token-level F1 score computed between the predicted answer span and the ground truth answer.
- `Exact Match (EM)` — range: [0, 1]
  - Binary indicator that is 1 if the predicted answer exactly matches the ground truth string, 0 otherwise.
- `Word Error Rate (WER)` — range: [0, 1]
  - Ratio of (insertions + deletions + substitutions) to the total number of reference words in the speech transcript.

## Input / output format

**Input**: A Kiswahili story text and a question derived from it.

**Output**: A predicted answer string extracted from or generated for the story.

## Scoring recipe

```python
def compute_metrics(predictions, golds):
    f1_scores = []
    em_scores = []
    for pred, gold in zip(predictions, golds):
        pred_tokens = pred.lower().split()
        gold_tokens = gold.lower().split()
        common = Counter(pred_tokens) & Counter(gold_tokens)
        num_same = sum(common.values())
        if num_same == 0:
            f1_scores.append(0)
            em_scores.append(0)
            continue
        precision = num_same / len(pred_tokens)
        recall = num_same / len(gold_tokens)
        f1 = 2 * precision * recall / (precision + recall)
        f1_scores.append(f1)
        em_scores.append(1.0 if pred == gold else 0.0)
    return sum(f1_scores)/len(f1_scores), sum(em_scores)/len(em_scores)
```

## Common pitfalls

- The evaluation uses a very small test set (100 QA pairs from 100 stories), which may lead to high variance in reported metrics.
- Two different evaluation methods are reported (deep learning vs. semantic network) using different metrics (F1 vs. EM), making direct comparison difficult.
- The STT WER is reported on a separate small speech subset (27.5 hours), not the full corpus.

## Evidence (verbatim from paper)

> The first proof of concept that tested a QA system on the newly developed QA dataset was based on a deep learning system, specifically XLM-RoBERTa... using a dataset of 100 stories with 500 QA pairs from the Kencorpus QA dataset. The model used 80% of the data for training, while 20% of the data was used for testing... The summary of performance of the two proof of concept systems developed for the project is shown in Table 4.6, with EM being exact match, while WER being word error rate.

## Citation

```bibtex
@misc{wanjawa2022kencorpus,
  title={Kencorpus: A Kenyan Language Corpus of Swahili, Dholuo and Luhya for Natural Language Processing Tasks},
  author={Wanjawa et al. (2022)},
  year={2022},
  note={arXiv:2208.12081}
}
```

- arXiv: 2208.12081

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.