I build research-level tasks that test frontier AI models: formal proofs in Lean 4, scientific computing, and terminal-agent tasks. Each one ships with a reference solution, a reproducible Docker environment and a verifier that rejects forged or incomplete work.
Currently with AfterQuery, Turing and Mindrift. Based in Layyah, Pakistan, UTC+5.
Release checks I run before submitting a task
$ python tools/preflight.py lean-task/✓filestask.toml, instruction.md, environment, solution, tests✓instructionevery output path named, no grading hints✓buildLean toolchain and Mathlib pinned to exact commits✓oraclereference proof checks: reward 1✓no-opempty submission: reward 0✓statementcompared with a sealed copy✓axioms[propext, Classical.choice, Quot.sound]✓forgerysorry or a new axiom: reward 0✓isolationagent processes stopped before gradingall checks passed, ready to submit
$ python tools/preflight.py compute-task/✓filestask.toml, instruction.md, environment, solution, tests✓instructionunits, precision and output format stated✓buildbase image and packages pinned✓oraclereference solution: reward 1✓no-opdoing nothing: reward 0✓gradingexact value, or a stated tolerance✓determinismsame result on every run✓workerssized from the container CPU limit✓isolationtests copied in only at grading timeall checks passed, ready to submit
9,410maths solutions written or reviewed at Photomath
1,000+lines of Lean 4 in my longest reference proofs, all kernel-checked
3AI training and evaluation companies I work with now
7 yearsteaching mathematics and physics before AI work
What I can build for your team
Hard tasks with answers a machine can check. I handle the mathematics, the code and the packaging, and I calibrate difficulty against frontier models.
⊢
Formal mathematics in Lean 4
Research-level statements in combinatorics, graph theory, additive number theory and discrete geometry, with complete reference proofs checked by the Lean kernel.
Reference proofs in Lean 4 with Mathlib
A sealed statement the submission can’t change
An axiom audit that rejects sorry and new axioms
Lean 4
Mathlib
Proof engineering
Frama-C (ACSL)
∑
Scientific-computing tasks
Problems graded on exact or tightly bounded numerical results, from numerical methods and simulation to exact and symbolic computation.
Deterministic Python reference solutions
Hidden pytest tests with stated tolerances
Exact units, precision and output format in the spec
Python
NumPy
SciPy
SymPy
pytest
>_
Terminal-agent tasks
Tasks in the Terminal-Bench and Harbor format: a written instruction, a Docker environment, a reference solution and automated tests that grade the agent’s result.
Reproducible environments with pinned versions
Verifiers isolated from the agent’s code
Repository validation: builds, and tests pass and fail as specified
Docker
Harbor
Terminal-Bench
Git
Bash
✓
Evaluation, QA and red teaming
Careful review of what models and agents actually did, under rubrics that keep scoring consistent across reviewers.
Rubrics, golden answers and reviewer guidelines
Function-calling and tool-call sequence evaluation
Agent trajectory review: where the reasoning breaks
LLM evaluation
Red teaming
RLHF data
Computer-use agents
Also: front-end development
Responsive sites and small web apps in React and JavaScript, built for accessibility, performance and every browser. This site is hand-coded.
Client tasks are confidential, so here is the shape every task of mine follows, with a public example problem. Pick a file to see what I check in it.
count-tilings/
environment/
solution/
tests/
Lean tasks add
Every task also passes my preflight script and a scan for blocked terms before it’s submitted.
instruction.md
Count the domino tilings of the 12 × 12 square.
Each domino covers two edge-adjacent cells, and
the dominoes cover every cell exactly once.
Write the exact count to `/app/answer.txt` as a
base-10 integer, with no other text.
The instruction
What the agent reads. It has to be complete, exact and written by hand.
Every output path appears in backticks
States the exact format, so nothing is left to guess
Says nothing about how it will be graded
No headings, no first-person preamble, no repeated requirements
The world the agent works in. It must build the same way every time.
Base image pinned by digest, packages by exact version
Every download checked against a checksum
No solution or tests inside the image
solution/solve.sh
#!/bin/bash
set -euo pipefail
python3 "$(dirname "$0")/count.py" > /app/answer.txt
The reference solution
Proof that the task can be solved, run by the platform as an oracle.
Scores 1 on every attempt
Exact integer arithmetic where the answer is exact
Worker pools sized from the container’s CPU limit, never os.cpu_count()
tests/test.sh
#!/bin/bash
mkdir -p /logs/verifier
echo 0 > /logs/verifier/reward.txt
if pytest --ctrf /logs/verifier/ctrf.json \
/tests/test_outputs.py -rA; then
echo 1 > /logs/verifier/reward.txt
fi
The verifier entry point
Runs after the agent finishes and writes the reward.
The reward starts at 0, so a crash can’t pass
pytest and pytest-json-ctrf pinned
Doing nothing scores 0
tests/test_outputs.py
from pathlib import Path
EXPECTED = int(Path("/tests/expected.txt").read_text())
deftest_answer_is_exact():
text = Path("/app/answer.txt").read_text().strip()
assert text.isdigit(), "answer must be an integer"assert int(text) == EXPECTED
The tests
Check the result, not the method, and accept nothing vague.
For proofs, passing the kernel isn’t enough. The proof must rest on standard axioms only.
Any sorryAx or new axiom scores 0
The statement comes from a sealed copy, so a submission can’t change what it proves
Checked in a clean build after the agent’s processes have stopped
Experience
Five years of STEM solution and AI evaluation work, after seven years of teaching. Every role since 2021 is remote.
2026 to nowIndependent contractor
Mathematics and Scientific Computing Expert, Benchmark Task Author
AfterQuery
Author approved benchmark tasks that measure how frontier models reason on research-level problems, in formal mathematics (Lean 4, Mathlib), scientific computing and deductive verification of C code.
Write complete reference proofs, from hundreds to thousands of lines of Lean 4 each, all checked by the Lean kernel.
Package each task as a reproducible Docker environment with a sealed specification, a pytest verifier and, for proofs, an axiom audit.
Calibrate difficulty so low-effort runs fail and strong agents solve only part of the trials, then read agent trajectories to find where the reasoning breaks.
Every approved task passed automated validation and human expert review.
2026 to nowIndependent contractor
Software Engineer, Python (LLM Evaluation and Repository Validation)
Turing
Confirm that repositories build and run in a clean environment, and that their tests pass and fail as specified.
Create terminal-agent benchmark tasks in the Terminal-Bench format, and scientific-computing tasks with deterministic reference solutions.
Contribute to benchmarks for computer-use agents, simulated company workflows and context learning, and red-team model outputs in code, reasoning and tool use.
2025 to nowIndependent contractor
STEM AI Trainer and Evaluation Specialist
Mindrift (Toloka)
Create and quality-check deterministic STEM tasks in mathematics, statistics, physics, chemistry, computer science, data science, machine learning and engineering, with Python reference solutions.
Design and review agent evaluation cases: gold final answers, expected function calls and tool-call sequences, and trajectory review.
Work as verifier and QA reviewer under detailed rubrics, and write reviewer instructions that keep scoring consistent.
Nov 2021 to Jan 2025Independent contractor
Math and STEM Expert (LaTeX)
Photomath Expert Marketplace
Wrote 2,811 step-by-step solutions and reviewed 6,599 by January 2024, in algebra, geometry, trigonometry, calculus and related physics and chemistry.
Found subtle reasoning and calculation errors in other experts’ work, and rebuilt incomplete problems into defensible solution paths.
2024 to nowSelf-employed and contract
Front-End Developer
Self-employed, and GenDum Fix Tech Agency (Web and UI Engineer, 2025)
Build responsive websites and small web apps in HTML, CSS, JavaScript and React, from design to deployment.
Turn design requirements into production interfaces, and fix browser, layout and visual-consistency defects.
2014 to 2021Punjab, Pakistan
Mathematics and Physics Teacher
Independent and academy teaching
Taught secondary and intermediate students for seven years, with reasoning ahead of memorized procedure.
Skills
The tools and fields I use in client work.
AI evaluation and benchmarks
Benchmark task design
LLM evaluation
Terminal-Bench format
Repository validation
Golden solutions
Rubric design
Agent trajectory review
Tool-call evaluation
Computer-use agents
Context learning
Red teaming
RLHF data
QA
Formal mathematics and verification
Lean 4
Mathlib
Proof engineering
Formal verification
Frama-C (ACSL)
LaTeX
Scientific computing
Numerical methods
Simulation
Exact and symbolic computation
Reproducible reference solutions
Mathematics
Combinatorics
Graph theory
Number theory
Real and complex analysis
Linear algebra
Abstract algebra
Probability and statistics
Discrete mathematics
Topology
Programming and tools
Python
NumPy
SciPy
SymPy
Matplotlib
pytest
Docker
Git and GitHub
Claude Code
Codex
Multi-agent coding workflows
Front end
JavaScript
React
HTML and CSS
Accessibility
Performance
SEO
WordPress
Chrome extensions (MV3)
Projects
Tools I built for my own work, and sites for clients.
Annotation UI browser extension
JavaScript, Chrome Manifest V3
Expands and collapses accordion sections inside cross-origin iframes on an annotation platform, which removes repetitive clicks for reviewers.
GK with Faisal
Full-stack web app
A multiple-choice question platform with subject and topic filters, pagination, Urdu typography, a JSON admin workflow and a backend API deployed on Render.
A mathematics degree, and a habit of studying past it.
Education
BS Mathematics, 2017 to 2021
University of Education, Lahore. CGPA 3.40 out of 4.00.
Continuing study since 2021
Formal proof in Lean 4, software engineering, classical Arabic and Islamic logic.
Research
Vastness without Encompassment
A Cantorian analysis of the ʿilm al-ghayb controversy in Sunni kalām. A 2026 manuscript connecting set theory, philosophy of religion and Sunni theology.
Recognition and languages
Photomath Expert Certificate, January 2024
2,811 solutions written and 6,599 reviewed.
Punjab Youth Festival essay writing
2nd place across Punjab.
Languages
Urdu (fluent), English (professional), Arabic (learning).
Tell me about the work.
Benchmark tasks, a Lean 4 project, scientific-computing problems, evaluation and QA, or a website. Send a short note about the scope and timeline.