Aymen Rahmani
Portrait of Aymen Rahmani
Aymen RahmaniLLM and agents engineer, final-year student at ESPRIT

I build LLM systems and measure them before I trust them.

I'm looking for a 4–6 month end-of-studies internship (PFE) in Europe from February 2027, in RAG, agents or LLM evaluation. Every number on this page carries a numbered marker. The evidence register at the bottom says where it comes from, including the ones I can't show publicly.

Release check on this candidateThe same kind of gate I put in front of my own systems.
CheckMeasuredSourceResult
RetrievalRecall@5 from 0.73 to 0.94 after tuning1Pass
Answer quality0.93 correct against a 0.81 baseline, 60 questions1Pass
Prompt injection0 of 240 attacks succeeded1Pass
Grounding0 invalid citations, 7 of 7 correct refusals2Pass
Faithfulness0.918 against a 0.90 target, 77 claims2Pass
Cross-document recall0.63. Conflict questions still miss the second document2Fail
ALLOW

One open item, listed above. Available February 2027 for 4 to 6 months, open to relocating in Europe.

The failing row stays in. A gate that never says no isn't a gate.

Selected work

Four systems, each with its results and what went wrong.

A regulatory RAG assistant on Azure, with a CI gate on answer quality

Personal project, deployed, 2026. Covers the GDPR, the EU AI Act, NIS2 and DORA.

Three pipelines sit behind one streaming API: hybrid RAG (BM25 plus dense, fused with RRF), GraphRAG and agentic RAG. All three are scored on the same 60 questions, so the choice of default is a measurement and not a preference.1

  • Every pull request is evaluated. CI runs lint, 139 tests, Terraform validation and a live evaluation. If answer quality drops below the threshold the merge is blocked. Deploys need approval and roll back automatically.
  • Security was tested, not assumed. Token auth, document-level security trimming and PII masking. Injection through retrieved passages succeeded 1.4% of the time on a plain prompt and 0 of 240 times against the agent.
  • Costs are known. OpenTelemetry traces every request. The agent costs about $3.54 per 1,000 requests and takes 12.4 s at the median, against about $2 and 3.9 s for the baseline.

What didn't work

  • The knowledge graph didn't help. The agent never called its graph tool and GraphRAG only matched the baseline.
  • The router didn't pay for its extra cost, so the agent is the default.
  • The judge is the same model as the generator, so absolute scores are optimistic. Trends matter more.

Built with Python, FastAPI, Azure AI Search, Azure OpenAI, Container Apps, Terraform, GitHub Actions with OIDC, OpenTelemetry, pytest

Answer correctness by pipeline

60 questions, scale 0 to 1

Hybrid RAG0.81
GraphRAG0.82
Router0.90
Agentic RAG, the default0.93

Retrieval after tuning

Chunking, hybrid fusion and reranking, over 40+ runs

Recall@50.73 to 0.94
beforeafter

FuelCell-RAG: German and English answers that cite the page, table cell or CAD part

Personal project, 2026. Datasheets, parameter sheets, requirement specs and STEP assemblies.

Engineers work across datasheets, Excel parameter lists, requirements and CAD, in two languages and several versions. A wrong or outdated value costs time. So every statement in an answer carries its source, and the system says "not found" when the documents don't contain the answer.2

  • Exact labels by construction. Three fictional fuel cell systems are defined once in YAML. Generators turn them into documents and record where each value appears, which gives exact gold sources for 70 questions (25 in German) over 196 documents.
  • A judge I checked. Faithfulness is scored claim by claim by a model from a different family than the one answering. Against independent labels the judge agreed on 72 of 75 claims and was never more lenient.
  • Found the bottleneck. Under 10 users, retrieval p95 went from 18 s to 4.9 s once I measured that reranking took almost all of the time.
  • Operations. Langfuse traces, Prometheus metrics, an audit log, a Redis response cache and a CI evaluation gate.

What didn't work

  • Cross-document recall is 0.63. A conflict question only counts when the conflicting requirement is retrieved, and plain ranking often misses it.
  • A German question about an English slide deck is wrongly refused.
  • The data is mostly synthetic and the labels come from models, not people. Answer latency under load is not measured.

Built with Python, FastAPI, Qdrant, bge-m3 and bge-reranker-v2-m3, Docling, LiteLLM, Langfuse, Postgres, Redis, Docker

The FuelCell-RAG chat screen: a question in German, an answer giving a design lifetime of 25,000 hours with numbered citations, and the cited datasheet page beside it.
A German question, a cited answer, and the source page next to it. The numbered markers on this portfolio borrow from this screen.

Measured on the 70-question set

Scale 0 to 1

Recall@50.921
Value and unit correct0.927
Citation precision0.956
Faithfulness0.918
Cross-document recall0.63

CrisisLink: flood triage from a photo, a voice note or a location

Team of 6, ESPRIT final-year project, September 2026 to now. I own the triage orchestrator.

A citizen sends a Telegram bot a photo, a voice note in Tunisian Derja, French or English, a text or a GPS location. Agents estimate the water depth, extract who is in danger, retrieve the official flood protocols and grade the incident from P1 to P4. The ticket goes to a dispatcher board and back to the citizen in their own language.3

  • The model can't lower a priority. The last step is deterministic code. The safety rules can only raise a grade, and unclear cases go to a human.
  • Protocol retrieval: Hit@3 0.95 and MRR 0.935 with structure-aware chunks on Qdrant.
  • Vision: a second prompt version cut depth under-estimation from 55% to 29% of photos, and the error on severe floods from 23 cm to 5 cm.
  • Distress extraction: 8 of 8 labelled voice and text cases.

What didn't work

  • The first version was a fixed 53-node pipeline. It was rebuilt around an orchestrator that decides which agents to call.
  • The test sets are small, and free-tier rate limits forced a fallback provider for three of the agents.

Built with n8n, Telegram, Groq (Qwen vision, gpt-oss, Whisper), Gemini, Qdrant, Python

Who decides what

One message in, one graded ticket out

Telegram messagephoto, voice note, text or GPS
Triage orchestratorreads the message and calls the agents it needs, in parallel when possible
Vision agentwater depth from the photo
Distress agentwho is in danger, from voice or text
Protocol agentofficial guidance, retrieved
Safety officerfixed rules, can only raise priority
Ticket, P1 to P4to the dispatcher and back to the citizen

A release gate that turns tests and security scans into one decision

My agent in a 6-person autonomous DevOps and MLOps platform, September 2026 to now.

Before a release, someone has to read the test report, the coverage, the linter, the CVE scan and the secrets scan, then decide. My agent collects all of it and returns one verdict with the reasons.4

  • Inputs: tests and coverage, lint (ruff), dependency audit, CVEs (Trivy), secrets (Gitleaks) and SonarQube findings.
  • Scans decide, the LLM explains. The optional rationale is written after the verdict and can never change it.
  • Two ways in. It runs in GitHub Actions, and it is exposed as an MCP server so the platform's other agents can ask for a verdict.

Built with Python, MCP, GitHub Actions, pytest, Trivy, Gitleaks, SonarQube, Docker. The wider platform uses LangGraph, Kafka and gRPC.

The public prototype sits on an open-source fraud-detection project by Mohit Gupta. My part is the gate, its tests, the CI and the Docker hardening.

How the gate decides

The worst finding wins

  • BLOCKa failing test, a leaked secret or a critical CVE
  • WARNa coverage drop, lint issues or medium CVEs
  • ALLOWevery check green

Research

An independent study, archived with a DOI.

What does "31× faster" mean on a laptop GPU?

NCM Lab, 2026. A benchmark of Next-Concept Models against autoregressive models on an RTX 3050 with 6 GB.

Next-Concept Modeling writes text coarse to fine instead of one token at a time, and is reported to be up to 31× faster. I rebuilt a toy version from scratch, validated the official checkpoints against the paper, then ran 8 experiments that push it until it breaks. I wrote my predictions down before each run and graded them afterwards.5

QuestionWhat I measured
31× against what?A diffusion model on an H100 with 1,024-token outputs, not the GPT-style models most people use.
Faster than a same-size autoregressive model?Roughly a tie at batch 1. At batch 32 the autoregressive model is 2 to 10× faster.
Does the speed help RAG?No. Compressing retrieved context with NCM cut accuracy from 87.5% to 10%.
Does it help an agent?No. The LLM takes 91 to 97% of the time and made the same planning mistake in 11 of 11 runs.

Translation quality as inputs get longer

BLEU, higher is better

24.7 16.3 31.5 small AR translator 0.04 NCM short long inputs
NCM's fixed canvas caps every output at about 23 words, so longer inputs simply get cut off.

Experience

Two internships. The code belongs to the companies, so the evidence here is private.

Computer vision intern, Supra Services & Technology

June to August 2026, Tunis. Automated optical inspection of printed circuit boards.

A dual-engine inspection system: a supervised detector (RT-DETR-L) for known defects and an unsupervised model (PatchCore) that flags anything it has never seen.6

  • Replaced the CIoU box loss with EIoU plus NWD, which suits sub-millimetre defects. Strict localisation rose by 24 points.
  • SIFT and RANSAC align each board to a golden template. Eigen-CAM heatmaps show the operator what the model looked at.
  • Served at 30 FPS through ONNX and a FastAPI service with REST and WebSocket endpoints.

Built with PyTorch, RT-DETR, PatchCore (Anomalib), OpenCV, ONNX, FastAPI

Old box loss against the new one

Scale 0 to 100%

mAP50:9553.6 to 77.8%
mAP7551.9 to 58.6%
mAP5097.7 to 96.9%
Loose detection dipped by 0.8 points while strict localisation improved a lot. For measuring defects, that was the right trade.

Machine learning intern, Web Media International

July to August 2025, Tunisia. Email validation at scale.

A classifier that sorts email addresses into valid, risky and bounce before a campaign is sent, trained on large volumes of text data.7

  • XGBoost tuned with cross-validation to 91% F1 and 90% accuracy.
  • Deployed as a FastAPI microservice called by the company's Spring Boot and MySQL backend.

Built with Python, XGBoost, scikit-learn, FastAPI, Spring Boot, MySQL

In progress

Unfinished work, shown with the week it's in. Results appear when there are results.

E-Invoice Converter

Turns a German PDF invoice into a valid XRechnung 3.0 or ZUGFeRD 2.3 e-invoice, checked by the official validators.8

So far: the KoSIT validator accepts 300 of 300 generated files. Line items are fully correct on 83% of documents against a 90% target, so not there yet.

View the repository

Data-cleaning RL agent

An agent cleans messy German business tables by writing pandas code. The reward reruns its code on a hidden copy, so hand-patched cells don't count.10

So far: the environment and sandbox: 20 table types, 21 kinds of corruption, each with a reference fix that the tests verify. No training results yet.

View the repository

DB delay prediction

Predicts how late a Deutsche Bahn long-distance train will be 15 to 90 minutes ahead, scored against DB's own forecast from the same moment.9

So far: a collector polling 40 stations, with every raw response kept and an alert when uptime drops below 99%. No model yet.

View the repository

More projects

  • Lead pipeline for Berlin property managers

    A hiring case study. Finds every firm that public sources list, reads each website with an LLM, and scores it on six KPIs. Any number, name or email that isn't in the source text is dropped.11

    1,335 firms, 2,213 sourced evidence rows. In the second QA round, 31 of 32 sampled tiers were plausible.

    Code
  • DriftScope, a data-drift MCP server

    Gives an agent a Kolmogorov-Smirnov test and a PSI calculation as tools, plus a drift policy to read.12

    An agent answers "has this feature drifted?" with a test, not a guess.

    Code
  • NEXUS FX, multi-agent FX market analysis

    Team lead of 6. Macro, technical, sentiment and flow agents feed a decision layer. Data in PostgreSQL, runs tracked in MLflow.13

    Signal model ROC-AUC 0.906. Not deployed after an honest backtest.

    Demo video
  • Nexus Med Center, medical imaging services

    Chest X-ray triage with DenseNet-201, a report draft, and CT, dermatology and endoscopy modules behind FastAPI.14

    Grad-CAM on every prediction, so a clinician can check what the model looked at.

    Demo video
  • AI-generated image detection

    A Vision Transformer trained on CIFAKE (120,000 images), combined with error-level analysis and CLIP zero-shot scores.15

    93.3% accuracy on the CIFAKE test split.

    Code
  • Breast cancer diagnosis study

    11 models compared across 6 hypotheses on scaling, PCA, SMOTE and feature selection, then explained with SHAP.16

    Linear SVM on 7 features: F1 0.95, ROC-AUC 0.995.

    Code

Background

Education

ESPRIT School of Engineering
2024 to 2027
Engineering degree (master's level), Software and Data Science. Fourth year: 15.22/20, ranked 6th of 36, passed with honours.17
Higher Institute of Computer Science (ISI)
2021 to 2024
Bachelor's degree (licence) in Embedded Systems.
MASSAI AI Summer School
Jun 2025
Mediterranean and African Summer School on AI, at ESPRIT, 30 hours.

Languages

English
C1
Certificate of English Language, Imperial English UK, Oct 2025
French
B2
German
B1 to B2
TestDaF, Goethe-Institut, Jul 2024
Arabic
Native

What I work with

LLMs and agents
LangChain, LangGraph, MCP, hybrid RAG, GraphRAG, agentic RAG, tool calling, n8n, Ollama
Evaluation and safety
Recall@k, MRR, faithfulness, LLM-as-a-judge, CI eval gates, prompt-injection testing, PII masking
ML and data
Python, PyTorch, Transformers, scikit-learn, XGBoost, pandas, SQL, PostgreSQL, Qdrant
Deployment
FastAPI, Docker, GitHub Actions, Azure, Terraform, OpenTelemetry, Langfuse, MLflow, Kafka

Certifications

All 23, grouped by issuer, with the LLM and agent work first. The two language certificates are under Languages. Credential IDs can be checked on LinkedIn.

Anthropic, Claude Academy

Introduction to Model Context Protocol
Nov 2026
Claude Code 101
Nov 2026
Building effective human-agent teams
Nov 2026
Claude with Amazon Bedrock
Nov 2026
Claude on Google Cloud
Nov 2026

NVIDIA Deep Learning Institute

Evaluation and Light Customization of Large Language Models
Jun 2025
Building LLM Applications with Prompt Engineering
Jun 2025
Rapid Application Development with LLMs
Jun 2025
Building Transformer-Based NLP Applications
Jun 2025
Fundamentals of Deep Learning
Feb 2026
Applications of AI for Anomaly Detection
Oct 2026

365 Data Science

Evaluating AI Agents: From Metrics to Real-World Impact
Nov 2026
Intro to AI Agents and Agentic AI
Nov 2026
AI Model Deployment on AWS
Nov 2026

Amazon Web Services

AWS Certified Machine Learning Engineer, Associate
exam Dec 2026
In preparation, not yet earned.
AWS Academy Cloud Foundations
Nov 2026

IBM

Data Science 101
Oct 2025
Data Science Foundations
Oct 2025
Data Science Methodology
Oct 2025
Data Science Tools
Oct 2025

Kaggle

Intro to Machine Learning
Oct 2025
Python
Sep 2025

Evidence register

Where each numbered marker leads. Private sources are marked as private.

  1. 1
    Azure_RAG

    Pipeline comparison, retrieval tuning, injection tests, CI gate and costs. See the README, docs/experiments.md and docs/security.md. github.com/Aymenrahmanii/Azure_RAG

  2. 2
    FuelCell-RAG

    Results table from run 2026-11-01-2214-answer-v5-corpus196, with every saved run under eval/runs. Repository and technical report

  3. 3
    CrisisLink-5DS

    Workflows, prompts, retrieval benchmarks and the technical report in docs. github.com/Aymenrahmanii/CrisisLink-5DS

  4. 4
    Security and Quality release gate

    The agent, its MCP server and tests. Fraud_Detection_MLOps/agent3_security_quality

  5. 5
    NCM Lab

    12-page report, 8 experiments and every model output. doi.org/10.5281/zenodo.23837502 and repository

  6. 6
    Supra Services & Technology internship

    Company code and data, private. Figures from my internship report. I can walk through the design and results in an interview.

  7. 7
    Web Media International internship

    Company code and data, private. Figures from my internship report.

  8. 8
    E-Invoice Converter

    Validator results and the week 3 extraction baseline. github.com/Aymenrahmanii/E-invoice_Converter

  9. 9
    DB delay prediction

    Collector, schedule and health checks. github.com/Aymenrahmanii/DB_Delay_Prediction

  10. 10
    Data-cleaning RL agent

    Task generator, corruptions and environment. github.com/Aymenrahmanii/Data_Cleaning_RL_Agent

  11. 11
    Berlin lead pipeline

    Pipeline, scoring model and both QA rounds. The lead sheet itself is not public because it holds real people's business contacts. github.com/Aymenrahmanii/Study_Case

  12. 12
  13. 13
    NEXUS FX

    Demo video and the team repository

  14. 14
    Nexus Med Center

    Demo video

  15. 15
  16. 16
    Breast cancer diagnosis study

    github.com/Aymenrahmanii/ML_Breast_Cancer

  17. 17
    ESPRIT transcript

    Available on request.

If your team builds with LLMs and wants them measured, I'd like to talk.

I'm looking for a 4–6 month end-of-studies internship from February 2027, in Europe or Tunisia. I handle the internship agreement with ESPRIT and the intern visa myself.

LinkedInin/aymen-rahmanii
GitHubAymenrahmanii
AvailableFebruary 2027, 4 to 6 months
Based inAriana, Tunisia
Open toRelocating in Europe
CVaymenrahmanii.github.io/cv