Clear Sky Science · en
RAGMail: a cloud-based retrieval-augmented framework for reducing hallucinations in LLM text generation
Smarter Outreach in a Crowded Job Market
Sending a cold email to a recruiter can feel like shouting into the void. Many job seekers now turn to AI tools to help draft these messages, but generic or inaccurate emails can hurt more than help. This paper presents RAGMail, a cloud-based system designed to write tailored, fact-checked cold emails by combining large language models with live information about a job posting and a candidate’s resume. The goal is simple: save time for applicants while producing messages that are both personal and trustworthy.

Why Ordinary AI Emails Go Wrong
Modern language models are remarkably good at sounding fluent, but they often “hallucinate” — confidently inventing skills, experiences, or job details that are not actually true. For a job seeker, that might mean an email claiming experience with a tool they have never used or referring to responsibilities not mentioned in the job ad. Such mistakes can quickly undermine credibility. The authors explain that these errors show up even in advanced systems, and that simply training bigger models does not reliably solve the problem. What is needed is a way to ground the model’s writing in real, verifiable information.
Feeding the System Real-World Context
RAGMail tackles this by treating the job posting and the resume as the single source of truth. The system automatically scrapes job descriptions from career websites and parses uploaded resumes, turning both into structured data: lists of skills, projects, experience, and requirements. A retrieval module then searches these sources to find the most relevant overlaps between what the employer wants and what the candidate offers. This matched context is fed directly into the language model before it starts writing, so the email is guided by current, job-specific information rather than vague memory from past training.
Checking the Facts Before Hitting Send
Beyond simply retrieving context, RAGMail introduces a scoring method called Factualness Evaluation via Weighting LLMs, or FEWL. After an email draft is generated, the system compares each important claim in the message against the structured facts extracted from the resume and job ad. Details about skills and work history are weighted more heavily than polite phrasing or closing lines. Segments that do not match the underlying data are flagged and adjusted through iterative refinement, nudging the email closer to the verified “ground truth.” The authors also cross-check their approach against other fact-checking tools and human reviewers, finding that FEWL closely tracks human judgments of whether an email is both accurate and relevant.

Built for Real-World, Cloud-Scale Use
To make this practical for many users at once, RAGMail is deployed as a cloud-native service. A web interface lets job seekers upload resumes and paste job links from any device, while the back end runs on managed servers with elastic scaling. The system stores vector representations of resumes and job ads in a cloud database, monitors performance and error rates, and automatically adjusts how much information it retrieves when traffic is high, all while encrypting sensitive personal data and enforcing strict access controls. This design keeps response times low and protects user privacy, even as usage grows.
What the Results Mean for Job Seekers
In tests comparing several setups, the full RAGMail pipeline — combining resume data, retrieval, and factual weighting — produced emails that were markedly more accurate and more personalized than those from a plain language model. Measured hallucinations dropped, factual scores rose by nearly half, and personalization ratings improved as well. For everyday users, this translates into outreach messages that better reflect their true background and the specific role they are targeting. Rather than replacing human judgment, RAGMail acts as a careful assistant: it drafts messages that are grounded in reality, tuned to each opportunity, and delivered through a secure, scalable cloud platform.
Citation: Sanyal, P., Rathore, K. & Arjunan, R.V. RAGMail: a cloud-based retrieval-augmented framework for reducing hallucinations in LLM text generation. Sci Rep 16, 7925 (2026). https://doi.org/10.1038/s41598-026-38913-w
Keywords: cold email automation, retrieval-augmented generation, LLM hallucinations, cloud AI platforms, personalized job outreach