I will evaluate and fix your rag chatbot hallucinations and retrieval accuracy

M
mahmoudrfaey
M
mahmoudrfaey
Mahmoud Refaey

About this gig

Your RAG chatbot looked fine in the demo. Then real users started asking real questions, and now it gives wrong answers with full confidence.


Usually the model isn't the problem. It's retrieval, chunking, or text that came out of OCR broken. I find out which one, with numbers instead of guesses.


This is the work I know best. On a banking chatbot over scanned PDFs at GBG, we measured faithfulness at 79%. After fixing OCR and adding hybrid search, reranking and query rewriting, it reached 97%, and correctness went from 61% to 85% (DeepEval, LLM as judge).


How it works:

1. I build a test set from your documents and real user questions

2. I score faithfulness, correctness and retrieval quality

3. I trace each failure to its cause: parsing, chunking, search, ranking or prompt

4. You get a fix plan, or I make the fixes and score it again


You get a short report with before and after numbers on the same test set. I don't promise a specific number, since it depends on your data.


Works with LangChain, LlamaIndex or plain Python pipelines, in any language your documents are in.


Send me a few examples of bad answers. That's often enough for me to tell you where I'd look first.

Get to know Mahmoud Refaey

Mahmoud Refaey

AI Engineer building RAG systems, LLM agents and Arabic NLP

  • FromEgypt
  • Member sinceNov 2024
  • Languages

    English, Arabic
I build LLM apps that work on real, messy data: RAG chatbots over your documents, LangGraph agents, and Text-to-SQL tools that let your team query a database in plain language. Much of my work is in Arabic. At GBG I helped take an Arabic banking RAG chatbot from 79% to 97% faithfulness, mostly by fixing OCR on scanned PDFs and improving retrieval. Stack: Python, FastAPI, LangGraph, Azure OpenAI, Qdrant, PostgreSQL, Docker, LoRA fine-tuning. Tell me what you're building and I'll tell you how I'd approach it.

My Portfolio