Metadata-Version: 2.5
Name: bangla-ai-eval
Version: 0.1.0
Summary: Open benchmark for how well AI models handle Bangla and everyday Bangladeshi tasks.
Project-URL: Homepage, https://github.com/hossainbuilds/bangla-ai-eval
Project-URL: Issues, https://github.com/hossainbuilds/bangla-ai-eval/issues
Project-URL: Contributing, https://github.com/hossainbuilds/bangla-ai-eval/blob/main/CONTRIBUTING.md
Author: Mohammed Hossain
License-Expression: MIT
License-File: LICENSE
Keywords: bangla,bangladesh,benchmark,bengali,evaluation,llm,nlp
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: Bengali
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# bangla-ai-eval

**How well do AI models actually handle Bangla?** An open benchmark of everyday Bangla and Bangladeshi tasks. Every test case is written or checked by a native speaker.

> বাংলায় AI কতটা ভালো, সেটা মাপার একটা খোলা পরীক্ষা। প্রতিটা প্রশ্ন একজন বাংলাভাষী লিখেছেন বা যাচাই করেছেন। **কোড না জানলেও অবদান রাখতে পারবেন:** নিচে দেখুন।

[![CI](https://github.com/hossainbuilds/bangla-ai-eval/actions/workflows/ci.yml/badge.svg)](https://github.com/hossainbuilds/bangla-ai-eval/actions/workflows/ci.yml)
![License: MIT](https://img.shields.io/badge/license-MIT-blue)

## Why

Over 270 million people speak Bangla. AI models often look fluent in it, but trip over things any Bangladeshi gets right without thinking:

- **Irregular number words.** ৫৩ is *তিপ্পান্ন*, not "পঞ্চাশ তিন".
- **Lakh/crore commas.** Money is written ১২,৩৪,৫৬৭, not 1,234,567.
- **Banglish.** People type `order ta kobe pabo?`, and a model should read it back as *অর্ডারটা কবে পাবো?*
- **The Bangla calendar** as used in Bangladesh, where Pohela Boishakh is 14 April.

These mistakes matter when businesses here use AI for invoices, customer chat and content. This benchmark measures them so anyone can see how each model does.

## What's inside (v0.1)

**Everyday Bangla**

| Category | What it tests | Cases | |
|---|---|---|---|
| `digits` | Bangla ↔ English digits | 12 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/digits.yaml) |
| `taka-format` | Lakh/crore comma grouping | 10 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/taka-format.yaml) |
| `number-words` | Numbers written as Bangla words | 24 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/number-words.yaml) |
| `banglish` | Banglish → Bangla script | 8 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/banglish.yaml) |
| `bd-facts` | National symbols, dates, places, food (no politics) | 20 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/bd-facts.yaml) |
| `bangla-calendar` | Months, seasons, Bangladesh's revised calendar | 15 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/bangla-calendar.yaml) |

**🏆 AI কে হারাও: the hard part**

| Category | What it tests | Cases | |
|---|---|---|---|
| `dialect` | Chittagonian, Sylheti, Noakhali words → standard Bangla | 7 | [➕ তোমার এলাকার শব্দ দাও](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/dialect.yaml) |
| `proverbs` | Complete a প্রবাদ | 10 | [➕ প্রবাদ যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/proverbs.yaml) |
| `riddles` | Classic ধাঁধা | 3 | [➕ ধাঁধা যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/riddles.yaml) |
| `grammar` | Opposite words, সন্ধি বিচ্ছেদ | 10 | [➕ প্রশ্ন যোগ করো](https://github.com/hossainbuilds/bangla-ai-eval/edit/main/cases/grammar.yaml) |

Clicking ➕ opens the file in GitHub's editor. GitHub makes your own copy (fork) automatically, so you just add your question at the bottom and press **Propose changes**. Have an idea for a whole new category? [Create a new file](https://github.com/hossainbuilds/bangla-ai-eval/new/main/cases).

Run `python -m bangla_eval stats` for live counts. Every v0.1 case has been reviewed by a native speaker (`verified: true`). New contributions start as `verified: false` until a reviewer checks them. Use `--only-verified` to score only reviewed cases.

## Run it

Python 3.10+, one dependency. The cases ship inside the package.

```bash
pip install bangla-ai-eval
bangla-eval validate                     # check all cases
bangla-eval run --provider mock          # dry run, no API key, no cost
```

Against a real model (API keys come from environment variables only):

```bash
# Anthropic
export ANTHROPIC_API_KEY=...
bangla-eval run --provider anthropic --model <model-id>

# Anything OpenAI-compatible: OpenAI, Gemini, OpenRouter, Ollama, LM Studio
export OPENAI_API_KEY=...
bangla-eval run --provider openai --model <model-id> --base-url <endpoint>

bangla-eval report                       # markdown table of all runs
```

Working from a clone of this repo (to add cases), use `pip install PyYAML` and `python -m bangla_eval ...` instead.

Each run is saved to `results/` with every prompt, response and score, so any number can be checked by hand.

## Results

*Coming soon: the first model runs.* Scores are published together with every raw response, so anyone can check them.

### 🏆 Hall of Fame: questions AI got wrong

When a question stumps a major model, it goes here, with the model's actual wrong answer and the contributor's name. Generated by `python -m bangla_eval hardest`.

*Fills up with the first results.* Think you can stump an AI? [Open a "Stump the AI" issue](https://github.com/hossainbuilds/bangla-ai-eval/issues/new?template=stump-the-ai.yml) or add the question yourself.

## Contribute: no code needed

The most valuable contribution is **a good question**: one that any Bangladeshi gets right, and that a model might not.

1. Open a file in [`cases/`](cases), or start a new category
2. Add your case at the end (copy the shape of the one above it)
3. Open a pull request. CI checks the format automatically.

Full guide in Bangla and English: [CONTRIBUTING.md](CONTRIBUTING.md).

## How scoring works

- Answers are compared after Unicode normalization (NFC, invisible joiners removed, surrounding punctuation stripped). Invisible differences never fail a model, but real spelling differences do.
- Bangla often has more than one accepted spelling (*ষোলো / ষোল*). Each case lists every accepted form under `accept`.
- Models are asked to answer with only the final answer, at temperature 0.

## License

MIT, covering both code and test cases. Built by [Mohammed Hossain](https://github.com/hossainbuilds) and contributors.
