touchstone-llm 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- touchstone_llm-0.1.0/.env.example +15 -0
- touchstone_llm-0.1.0/.gitattributes +4 -0
- touchstone_llm-0.1.0/.gitignore +39 -0
- touchstone_llm-0.1.0/.kasauti/cache.sqlite +0 -0
- touchstone_llm-0.1.0/CHANGELOG.md +38 -0
- touchstone_llm-0.1.0/CITATION.cff +18 -0
- touchstone_llm-0.1.0/CODE_OF_CONDUCT.md +85 -0
- touchstone_llm-0.1.0/CONTRIBUTING.md +39 -0
- touchstone_llm-0.1.0/DATASETS.md +15 -0
- touchstone_llm-0.1.0/LICENSE +202 -0
- touchstone_llm-0.1.0/LIMITATIONS.md +14 -0
- touchstone_llm-0.1.0/PKG-INFO +319 -0
- touchstone_llm-0.1.0/README.md +277 -0
- touchstone_llm-0.1.0/SECURITY.md +12 -0
- touchstone_llm-0.1.0/datasets/README.md +35 -0
- touchstone_llm-0.1.0/datasets/pending/codemixed_instructions.jsonl +25 -0
- touchstone_llm-0.1.0/datasets/pending/cultural_context.jsonl +25 -0
- touchstone_llm-0.1.0/datasets/pending/hindi_comprehension.jsonl +25 -0
- touchstone_llm-0.1.0/datasets/pending/hindi_reasoning.jsonl +25 -0
- touchstone_llm-0.1.0/datasets/pending/hinglish_understanding.jsonl +25 -0
- touchstone_llm-0.1.0/datasets/pending/translation_hi_en.jsonl +25 -0
- touchstone_llm-0.1.0/design-system/touchstone/MASTER.md +281 -0
- touchstone_llm-0.1.0/pyproject.toml +96 -0
- touchstone_llm-0.1.0/src/touchstone_llm/__init__.py +3 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/__init__.py +112 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/base.py +207 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/errors.py +41 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/gemini.py +73 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/mock.py +38 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/openai_compat.py +57 -0
- touchstone_llm-0.1.0/src/touchstone_llm/backends/ratelimit.py +79 -0
- touchstone_llm-0.1.0/src/touchstone_llm/cache.py +59 -0
- touchstone_llm-0.1.0/src/touchstone_llm/cli.py +337 -0
- touchstone_llm-0.1.0/src/touchstone_llm/config.py +83 -0
- touchstone_llm-0.1.0/src/touchstone_llm/drafts.py +26 -0
- touchstone_llm-0.1.0/src/touchstone_llm/env.py +146 -0
- touchstone_llm-0.1.0/src/touchstone_llm/errors.py +11 -0
- touchstone_llm-0.1.0/src/touchstone_llm/py.typed +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/report/__init__.py +84 -0
- touchstone_llm-0.1.0/src/touchstone_llm/report/templates/report.html.j2 +152 -0
- touchstone_llm-0.1.0/src/touchstone_llm/report/templates/report.md.j2 +56 -0
- touchstone_llm-0.1.0/src/touchstone_llm/reproduce.py +63 -0
- touchstone_llm-0.1.0/src/touchstone_llm/results.py +138 -0
- touchstone_llm-0.1.0/src/touchstone_llm/review.py +243 -0
- touchstone_llm-0.1.0/src/touchstone_llm/runner.py +152 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/__init__.py +1 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/chrf.py +54 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/mcq.py +107 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/normalize.py +37 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/numeric.py +37 -0
- touchstone_llm-0.1.0/src/touchstone_llm/scoring/rules.py +176 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/__init__.py +1 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/app.py +264 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/jobs.py +114 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/fira-code-latin-400-normal-C-QZfXAs.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/fira-code-latin-400-normal-DGosTW8U.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/fira-code-latin-500-normal-B6gioGu8.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/fira-code-latin-500-normal-aMLC2AMm.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/index-Dgv2BMCR.css +2 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/index-Pvf3wJWw.js +11 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-400-normal-BlDd6KY1.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-400-normal-CdOJmQ4E.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-500-normal-DO6LFp12.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-500-normal-DVtwyDnM.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-600-normal-B5tDaqnD.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-devanagari-devanagari-600-normal-BeyktMLo.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-400-normal-BTkUljjl.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-400-normal-DPpKfCgK.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-500-normal-CDPngY5C.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-500-normal-DCA2Z9Cj.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-600-normal-DVJMj_t0.woff +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/assets/noto-sans-latin-600-normal-Dkgu5AE5.woff2 +0 -0
- touchstone_llm-0.1.0/src/touchstone_llm/server/static/index.html +22 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/__init__.py +61 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/base.py +128 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/instructions.py +38 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/mcq.py +93 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/numeric.py +52 -0
- touchstone_llm-0.1.0/src/touchstone_llm/tasks/translation.py +51 -0
- touchstone_llm-0.1.0/tests/backends/test_gemini.py +125 -0
- touchstone_llm-0.1.0/tests/backends/test_openai_compat.py +149 -0
- touchstone_llm-0.1.0/tests/backends/test_ratelimit.py +93 -0
- touchstone_llm-0.1.0/tests/backends/test_registry.py +52 -0
- touchstone_llm-0.1.0/tests/conftest.py +81 -0
- touchstone_llm-0.1.0/tests/scoring/test_chrf.py +30 -0
- touchstone_llm-0.1.0/tests/scoring/test_mcq.py +74 -0
- touchstone_llm-0.1.0/tests/scoring/test_numeric.py +31 -0
- touchstone_llm-0.1.0/tests/scoring/test_rules.py +78 -0
- touchstone_llm-0.1.0/tests/server/test_app.py +198 -0
- touchstone_llm-0.1.0/tests/tasks/test_tasks.py +211 -0
- touchstone_llm-0.1.0/tests/test_cache.py +26 -0
- touchstone_llm-0.1.0/tests/test_cli.py +172 -0
- touchstone_llm-0.1.0/tests/test_config.py +60 -0
- touchstone_llm-0.1.0/tests/test_datasets.py +63 -0
- touchstone_llm-0.1.0/tests/test_drafts.py +11 -0
- touchstone_llm-0.1.0/tests/test_env.py +128 -0
- touchstone_llm-0.1.0/tests/test_report.py +69 -0
- touchstone_llm-0.1.0/tests/test_reproduce.py +44 -0
- touchstone_llm-0.1.0/tests/test_results.py +84 -0
- touchstone_llm-0.1.0/tests/test_review.py +131 -0
- touchstone_llm-0.1.0/tests/test_runner.py +126 -0
- touchstone_llm-0.1.0/ui/.npmrc +4 -0
- touchstone_llm-0.1.0/ui/index.html +21 -0
- touchstone_llm-0.1.0/ui/package-lock.json +1959 -0
- touchstone_llm-0.1.0/ui/package.json +31 -0
- touchstone_llm-0.1.0/ui/src/Layout.tsx +81 -0
- touchstone_llm-0.1.0/ui/src/StoneHero.tsx +94 -0
- touchstone_llm-0.1.0/ui/src/api.ts +146 -0
- touchstone_llm-0.1.0/ui/src/components.tsx +153 -0
- touchstone_llm-0.1.0/ui/src/lib.ts +70 -0
- touchstone_llm-0.1.0/ui/src/main.tsx +30 -0
- touchstone_llm-0.1.0/ui/src/pages/AboutPage.tsx +70 -0
- touchstone_llm-0.1.0/ui/src/pages/ComparePage.tsx +144 -0
- touchstone_llm-0.1.0/ui/src/pages/JobPage.tsx +73 -0
- touchstone_llm-0.1.0/ui/src/pages/NewRunPage.tsx +338 -0
- touchstone_llm-0.1.0/ui/src/pages/NotFoundPage.tsx +11 -0
- touchstone_llm-0.1.0/ui/src/pages/RunPage.tsx +140 -0
- touchstone_llm-0.1.0/ui/src/pages/RunsPage.tsx +123 -0
- touchstone_llm-0.1.0/ui/src/styles.css +117 -0
- touchstone_llm-0.1.0/ui/tsconfig.json +18 -0
- touchstone_llm-0.1.0/ui/vite.config.ts +16 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copy this file to .env and fill in only the keys you use.
|
|
2
|
+
# .env is in .gitignore, so your keys stay on your machine.
|
|
3
|
+
# touchstone never prints or logs these values.
|
|
4
|
+
|
|
5
|
+
# https://console.groq.com/keys
|
|
6
|
+
GROQ_API_KEY=
|
|
7
|
+
|
|
8
|
+
# https://aistudio.google.com/apikey
|
|
9
|
+
GEMINI_API_KEY=
|
|
10
|
+
|
|
11
|
+
# https://openrouter.ai/keys
|
|
12
|
+
OPENROUTER_API_KEY=
|
|
13
|
+
|
|
14
|
+
# Ollama runs locally and needs no key. Change this only if Ollama is not on the default port.
|
|
15
|
+
OLLAMA_BASE_URL=http://localhost:11434
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Secrets: never commit API keys
|
|
2
|
+
.env
|
|
3
|
+
.env.*
|
|
4
|
+
!.env.example
|
|
5
|
+
|
|
6
|
+
# Python
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
.mypy_cache/
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov/
|
|
19
|
+
|
|
20
|
+
# touchstone local data
|
|
21
|
+
.touchstone/
|
|
22
|
+
runs/
|
|
23
|
+
|
|
24
|
+
# Frontend
|
|
25
|
+
ui/node_modules/
|
|
26
|
+
ui/dist/
|
|
27
|
+
src/touchstone_llm/server/static/
|
|
28
|
+
|
|
29
|
+
# OS / editors
|
|
30
|
+
.DS_Store
|
|
31
|
+
Thumbs.db
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
|
|
35
|
+
# Filled review sheets (may contain reviewer names)
|
|
36
|
+
datasets/review/
|
|
37
|
+
|
|
38
|
+
# Local editor/agent config
|
|
39
|
+
.claude/
|
|
Binary file
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-11-19
|
|
9
|
+
|
|
10
|
+
First public release (alpha). Questions are still drafts under review, so no official results are published.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Two-step start for users: `pip install "touchstone-llm[ui]"` then `touchstone ui`.
|
|
14
|
+
- Draft questions (150, 25 per task) ship inside the package as a separate "drafts" set. They are used only on request (`--drafts`, or "Use draft questions" in the UI), and every result made with them is marked as a practice run.
|
|
15
|
+
- API keys can be pasted into the web UI. They are saved only on this computer in `~/.touchstone/.env` (owner-only permissions where supported), never shown again, and never logged.
|
|
16
|
+
- Web UI redesign: warm beige and navy theme, clear buttons, even spacing, and plain-language help on every page (how-it-works steps, hints under each option, glossary, friendly topic names).
|
|
17
|
+
- Project scaffold: packaging, CLI entry point with `--version`, lint/type/test tooling, CI, and community files.
|
|
18
|
+
- `RunConfig` with fixed defaults (temperature 0, seed 42) and `provider/model` parsing.
|
|
19
|
+
- API key loading from env or `.env`, with step-by-step messages when a key is missing and masking of keys in any shown text.
|
|
20
|
+
- Model backends: Groq, OpenRouter and Ollama (one OpenAI-compatible client), Gemini (REST), and an offline `mock` backend. Plugins can add providers via the `touchstone_llm.backends` entry point.
|
|
21
|
+
- Client-side rate limiting and retries with backoff for free tiers; clear errors for retired model ids, rejected keys and an unreachable Ollama server.
|
|
22
|
+
- Rule-based scorers: MCQ answer parser (many answer styles, ambiguous answers marked "unparsed"), numeric answer extraction (Devanagari digits, Indian digit grouping), dependency-free chrF verified against sacreBLEU, and instruction rule checks.
|
|
23
|
+
- Task framework with the six v1 tasks and a `touchstone_llm.tasks` entry point for plugins. Items are validated on load: CC-BY-4.0 only, at least two reviewers besides the author, unique ids.
|
|
24
|
+
- Dataset review workflow (`python -m touchstone_llm.review check|export|import|promote`) with CSV sheets for non-technical reviewers.
|
|
25
|
+
- Batch 1 drafts: 10 pending items per task (60 total), awaiting human review; none are scored yet.
|
|
26
|
+
- `touchstone run`: runs tasks one sample at a time, prints a score table (score, unparsed rate, latency, settings, date) and saves the full result JSON. Any failed call stops the run; replies are cached in `.touchstone/cache.sqlite`, so the same command resumes.
|
|
27
|
+
- `touchstone list-tasks` and `touchstone list-models <provider>` (live model ids from the provider).
|
|
28
|
+
- `--data-dir` and `--allow-unreviewed` for trying draft items; such runs are clearly marked "UNREVIEWED".
|
|
29
|
+
- `contains_any` rule check; dataset test that trivial replies ("A", "ok", "I don't know.") never pass an instruction item.
|
|
30
|
+
- Reports: every run also writes a self-contained HTML page (offline, light/dark, all prompts and outputs, "only wrong items" filter) and a Markdown summary. Model output is HTML-escaped. `touchstone report <result.json>` rebuilds them.
|
|
31
|
+
- `touchstone reproduce <result.json>`: reruns the exact config and checks that prompts and settings are identical, then compares scores and outputs.
|
|
32
|
+
- `touchstone ui` (optional `[ui]` extra): local FastAPI server on 127.0.0.1 with a JSON API for status, live model lists, saved runs, reports, and background runs with live progress (SSE). Host and Origin checks block DNS rebinding and cross-site requests; API keys are only reported as set or not set.
|
|
33
|
+
- Web UI (React, built into the wheel so users need no Node): Runs list, New run (live model list, key status, draft toggle, fixed settings), live progress, run results with a "touchstone" hero (mean score, gold streak bars, strongest/hardest task with ties shown as ties, toughest item), item explorer with filters, Compare (up to 3 runs, colorblind-validated colors, value labels and table view, warnings when settings, items or dates differ), and About. Light and dark themes, self-hosted fonts with Devanagari, reduced-motion support.
|
|
34
|
+
- CI job that builds the UI and wheel, checks that no `.env` or unreviewed data ships, and smoke-tests a clean install.
|
|
35
|
+
- Full README (quickstart, tasks, fairness and reproducibility, limitations, data and safety, related work with verified citations), `CITATION.cff`, and a tag-triggered release workflow using PyPI Trusted Publishing (TestPyPI first).
|
|
36
|
+
- Packaging fix: the built web UI now ships in the sdist too, so wheels built from the sdist include it; CI builds the same way as the release.
|
|
37
|
+
- Design system for the web UI in `design-system/touchstone/MASTER.md` (generated with ui-ux-pro-max, adapted for Devanagari and neutral comparisons).
|
|
38
|
+
- Result schema (`RunResult`) that saves every prompt, output, score and setting as readable UTF-8 JSON.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use touchstone, please cite it as below."
|
|
3
|
+
title: "touchstone: small, reproducible LLM evaluation in Hindi and Hinglish"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: "Sharma"
|
|
7
|
+
given-names: "Harshita"
|
|
8
|
+
license: Apache-2.0
|
|
9
|
+
version: "0.1.0"
|
|
10
|
+
date-released: "2026-11-19"
|
|
11
|
+
repository-code: "https://github.com/harshita2012sharma-max/Touchstone"
|
|
12
|
+
keywords:
|
|
13
|
+
- llm
|
|
14
|
+
- evaluation
|
|
15
|
+
- benchmark
|
|
16
|
+
- hindi
|
|
17
|
+
- hinglish
|
|
18
|
+
- indic
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Our Pledge
|
|
6
|
+
|
|
7
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
8
|
+
|
|
9
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
10
|
+
|
|
11
|
+
## Our Standards
|
|
12
|
+
|
|
13
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
14
|
+
|
|
15
|
+
* Demonstrating empathy and kindness toward other people
|
|
16
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
17
|
+
* Giving and gracefully accepting constructive feedback
|
|
18
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
19
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
20
|
+
|
|
21
|
+
Examples of unacceptable behavior include:
|
|
22
|
+
|
|
23
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
24
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
25
|
+
* Public or private harassment
|
|
26
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
28
|
+
|
|
29
|
+
## Enforcement Responsibilities
|
|
30
|
+
|
|
31
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
32
|
+
|
|
33
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
38
|
+
|
|
39
|
+
## Enforcement
|
|
40
|
+
|
|
41
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement privately through this repository's GitHub "Report a vulnerability" form (Security tab), or by a direct message to the maintainer on GitHub. Please do not report conduct issues in public issues. All complaints will be reviewed and investigated promptly and fairly.
|
|
42
|
+
|
|
43
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
44
|
+
|
|
45
|
+
## Enforcement Guidelines
|
|
46
|
+
|
|
47
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
48
|
+
|
|
49
|
+
### 1. Correction
|
|
50
|
+
|
|
51
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
52
|
+
|
|
53
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
54
|
+
|
|
55
|
+
### 2. Warning
|
|
56
|
+
|
|
57
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
58
|
+
|
|
59
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
60
|
+
|
|
61
|
+
### 3. Temporary Ban
|
|
62
|
+
|
|
63
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
64
|
+
|
|
65
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
66
|
+
|
|
67
|
+
### 4. Permanent Ban
|
|
68
|
+
|
|
69
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
70
|
+
|
|
71
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
72
|
+
|
|
73
|
+
## Attribution
|
|
74
|
+
|
|
75
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
76
|
+
|
|
77
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
78
|
+
|
|
79
|
+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
|
80
|
+
|
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
|
82
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
83
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
84
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
85
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Contributing to touchstone
|
|
2
|
+
|
|
3
|
+
Thank you for helping! Please read the [Code of Conduct](CODE_OF_CONDUCT.md) first.
|
|
4
|
+
|
|
5
|
+
## Development setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m venv .venv
|
|
9
|
+
# Windows: .venv\Scripts\activate macOS/Linux: source .venv/bin/activate
|
|
10
|
+
pip install -e ".[dev]"
|
|
11
|
+
ruff check . && ruff format --check . && mypy && pytest
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Tests never call real APIs. Use the mock backend.
|
|
15
|
+
|
|
16
|
+
## Adding dataset items
|
|
17
|
+
|
|
18
|
+
Every item must be **written by you**. Do not copy from exams, books, websites or other datasets. By submitting an item you agree to license it under CC-BY-4.0.
|
|
19
|
+
|
|
20
|
+
Each item needs **at least two reviewers other than its author**, who are fluent in Hindi or Hinglish. Items with fewer reviewers stay in `data/pending/` and are not scored.
|
|
21
|
+
|
|
22
|
+
### Reviewer checklist
|
|
23
|
+
|
|
24
|
+
- [ ] Factually correct, with exactly one correct answer
|
|
25
|
+
- [ ] Natural Hindi or Hinglish, as people really write it
|
|
26
|
+
- [ ] Neutral: no religion comparisons, caste, politics, "which group is better" questions, or regional stereotypes
|
|
27
|
+
- [ ] No sexual, hateful or offensive content
|
|
28
|
+
- [ ] Not copied from any existing source
|
|
29
|
+
|
|
30
|
+
## Wording rules
|
|
31
|
+
|
|
32
|
+
Use neutral language in code, docs and results. Never claim a model is "best" or "most accurate"; report numbers with their settings and sample size.
|
|
33
|
+
|
|
34
|
+
## Pull requests
|
|
35
|
+
|
|
36
|
+
- Keep each PR small and focused.
|
|
37
|
+
- Add or update tests.
|
|
38
|
+
- Add a line to `CHANGELOG.md` under "Unreleased".
|
|
39
|
+
- Never commit API keys or `.env` files.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Datasets
|
|
2
|
+
|
|
3
|
+
## Items written for touchstone
|
|
4
|
+
|
|
5
|
+
| Task | Source | License | Location |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| All v1 tasks | Written by touchstone contributors, each item reviewed by at least two other people | CC-BY-4.0 | `src/touchstone_llm/tasks/data/` |
|
|
8
|
+
|
|
9
|
+
No item is copied from exams, books, websites or other datasets.
|
|
10
|
+
|
|
11
|
+
**How items are made.** Some first drafts were written with help from an AI assistant (Claude). Every item is then edited and fact-checked by its human author and approved by at least two other human reviewers before it ships. Items waiting for review live in `datasets/pending/`. They also ship inside the package as a separate **drafts** set so new users have something to try, but they are used only when the user asks for them, and every result made with them is marked as a practice run. Official results use reviewed items only. See [datasets/README.md](datasets/README.md) for the review process.
|
|
12
|
+
|
|
13
|
+
## External datasets
|
|
14
|
+
|
|
15
|
+
None yet. Any external dataset added later must have an open license (CC-BY, CC0, Apache-2.0 or MIT) and will be listed here with its license and a link. Data under non-commercial or unclear licenses is never stored in this repository; if supported at all, it is downloaded at runtime with clear attribution.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Limitations
|
|
2
|
+
|
|
3
|
+
Please read this before using any touchstone result.
|
|
4
|
+
|
|
5
|
+
- **Small dataset.** v1 has about 25 items per task. Small differences between models are often noise.
|
|
6
|
+
- **Hindi is not all of India.** India has many languages and dialects. Good results here say nothing about other Indian languages or about every variety of Hindi.
|
|
7
|
+
- **Code-mixed text varies.** Hinglish has no standard spelling, so rule-based scoring can miss valid answers.
|
|
8
|
+
- **Translation scores are rough.** chrF compares against one or two reference translations and can penalise correct paraphrases.
|
|
9
|
+
- **API models change.** Providers can update a model behind the same name. Every result records the test date and model id, but older results may not be repeatable.
|
|
10
|
+
- **Answer format affects scores.** If a model's answer cannot be parsed, the item counts as wrong. Reports show this "unparsed" rate separately.
|
|
11
|
+
- **Numeric answers.** touchstone takes the first number after the last "Answer"/"उत्तर" marker, or else the last number in the reply. A model that reasons correctly but writes another number last can be scored wrong.
|
|
12
|
+
- **Instruction following is strict.** An answer scores 1 only if every rule check passes; partial success scores 0 (the report shows which checks failed).
|
|
13
|
+
- **Seeds are best effort.** touchstone always sends temperature 0 and seed 42, but some providers ignore the seed, so repeated runs can still differ slightly.
|
|
14
|
+
- **English instructions.** v1 prompt templates give format instructions in English (the content is in Hindi or Hinglish). Models that struggle with English instructions may be under-scored.
|