PhD Applicant — Trustworthy Generative AI

Babar Ali Shah

On retrieval, abstention, and knowing when a language model should say "I don't know."

01About

I'm a machine learning research engineer based in Dublin, working on retrieval-augmented generation and the problem of answerability — when a system has enough grounding to answer, and when it should abstain instead of guessing. Over the past three years I've built RAG pipelines end to end, from chunking and hybrid retrieval through to evaluation and deployment, and I've worked under contract on evaluation, red-teaming, and dataset-design projects that fed into training programs at Amazon, Google, and Salesforce.

I'm applying to PhD programmes to study this more rigorously: what determines whether a query is answerable from a given knowledge base, and how retrieval-side design choices — chunking, hybrid search, reranking — can be used to predict and improve that boundary, rather than discovering it by trial and error in production.

02Research Questions

The questions below have shaped my work so far, in roughly the order I encountered them.

"
To what extent do retrieval-side design choices — chunking, hybrid search, reranking — determine the answerability of a query in a heterogeneous knowledge base?
Independent research, modular RAG systems, 2026
"
Under what conditions should a production LLM withhold a response, rather than generate an uncertain or hallucinated answer?
Contract research for Amazon Nova, via Turing, 2025
"
What are the systematic failure modes of frontier language models under adversarial input perturbation?
Contract research for Amazon Nova, via Turing, 2025
"
How reliably do language model agents plan and execute multi-step tool use under ambiguous constraints?
Contract research for Salesforce Tau-Bench, via Turing, 2025–26

03Selected Projects

RAG Stack — a fully local retrieval-augmented generation system Code Live demo
Ollama · sentence-transformers · FAISS · FastAPI · Streamlit · Docker

A document question-answering system that runs entirely on local infrastructure, with no paid APIs. The part most relevant to my research interests is the guardrail in the query pipeline: if similarity-search confidence falls below a threshold, the system returns "I don't know" instead of forcing an answer — a direct, if simple, engineering answer to the abstention question above.

  • PDF ingestion, overlapping-window chunking, persistent FAISS index
  • Context-grounded generation with source citations (file, page, snippet)
  • Similarity-threshold guardrail for low-confidence queries
  • Containerised with Docker; deployed as a public demo on Hugging Face Spaces
Modular RAG ablations — chunking, retrieval, and reranking
Hybrid BM25 + dense retrieval · cross-encoder reranking · Google Gemini API

A self-directed study varying chunking strategy, embedding model, retrieval architecture, and reranking method independently, to isolate their effect on retrieval quality and downstream answer faithfulness. Hybrid retrieval consistently outperformed single-modality retrieval on corpora with high vocabulary mismatch — the empirical basis for the manuscript below.

04Publications

What Improves RAG? A Controlled Ablation Study of Retrieval Augmentation Strategies in Biomedical Question Answering
Shah, B.A. (2026). Zenodo · preprint, not peer-reviewed · DOI: 10.5281/zenodo.21101145

A systematic ablation across five retrieval configurations and eight retrieval metrics on biomedical question answering, showing where hybrid retrieval and neural reranking help, and where keyword-expansion strategies degrade semantic retrieval baselines.

05Applied Research Experience — contract work via Turing

Turing is a talent and data-training platform that places contractors on evaluation, red-teaming, and dataset-design projects for AI labs. The following roles were performed under contract, not as a direct research collaboration with the named companies.

LLM Abstention & Answerability Evaluation2025
Contract project for Amazon Nova, via Turing
  • Built a corpus of multi-turn dialogues annotated with target abstention responses, marking the boundary between answerable and unanswerable queries.
  • Designed evaluation criteria for instruction-following precision and selective abstention, aligned with benchmarks such as UAEval4RAG and FollowBench.
  • Observed that models' refusal behaviour degraded under multi-turn pressure without explicit re-anchoring — a failure mode with direct implications for safe deployment.
Adversarial Robustness & Red-Teaming2025
Contract project for Amazon Nova, via Turing
  • Ran systematic adversarial evaluations of reasoning, coherence, and safety failure modes, including context leakage and instruction-override.
  • Developed a taxonomy of failure categories (hallucination, instruction drift, safety evasion, bias amplification) used to guide iterative model improvement.
Agentic Reasoning & Tool-Use Benchmarking2025 – 2026
Contract project for Salesforce (Tau-Bench), via Turing
  • Designed structured evaluation tasks, medium to expert difficulty, for multi-step agent reasoning in a banking domain, contributing to the Tau-Bench evaluation framework.
  • Modelled end-to-end agentic task flows to stress-test tool-use calibration under ambiguous constraints.
Multimodal Bias Evaluation & SFT Dataset Design2024
Contract project for Google Gemini, via Turing
  • Built multimodal evaluation frameworks assessing model outputs for bias and alignment across text, image, and structured inputs.
  • Designed supervised fine-tuning datasets for multi-step function-calling trajectories.

06Professional Experience

ML Research & Fine-Tuning EngineerMar 2024 – Jan 2026
Turing · Remote (Palo Alto, CA)
  • Led SFT and RLHF workflows; automated training pipelines, cutting training time by 35%.
  • Curated domain-specific datasets across multiple client programmes, improving benchmark accuracy by 25%.
Software Development EngineerAug 2023 – Feb 2024
Techfision · Remote (Brooklyn, NY)
  • Built "Kaarka," an AI-powered real estate app with recommendation algorithms and user analytics.
Software EngineerAug 2022 – Jul 2023
The Right Software · Remote (Stockholm, Sweden)
  • Improved API task success rate by 20% through performance profiling and endpoint optimisation.
Associate Software EngineerJul 2020 – Jul 2022
Micromerger · Islamabad
  • Architected Airflow ETL pipelines migrating multi-GB MySQL data to ClickHouse at 99.9% reliability.

07Education

B.Sc. Computer Science (Upper Second / 2:1)2016 – 2020
International Islamic University, Islamabad

Capstone: comparative evaluation of machine learning architectures for temporal forecasting, using cross-validation and statistical performance metrics.

08Skills

Research & Evaluation
Experimental design, ablation studies, benchmark construction, annotation protocols, retrieval evaluation, error analysis, adversarial testing
RAG & Retrieval
FAISS, BM25, hybrid search, query rewriting, cross-encoder reranking, chunking strategies, multi-source ingestion
LLM Alignment
RAGAS, SFT, RLHF, red-teaming, safety benchmarking, hallucination mitigation
Engineering
Python, SQL, JavaScript, Docker, GCP, AWS, Hugging Face Transformers, Ollama, Airflow, PostgreSQL, MongoDB, ClickHouse

09References

Available on request:

  • Dr. Jamal Abdul Nasir — Assistant Professor, School of Computer Science, University of Galway
  • Dr. Shehzad Ashraf Chaudhry — Professor of Computing and Information Systems, Abu Dhabi University
  • Mr. Zulqarnain Hashmi — Faculty, Dept. of Computer Information Technology, International Islamic University