Enhancing Domain-Specific Retrieval-Augmented Generation: Synthetic Data Generation and Evaluation using Reasoning Models

Aryan Jadon, Avinash Patil, Shashank Kumar
2/21/2025
cs.LGcs.AIcs.CL

Official code: aryan-jadon/Synthetic-Data-Generation-and-Evaluation-using-Reasoning-Models (7 stars, last commit 2025-03-01).

Abstract

Retrieval-Augmented Generation (RAG) systems face significant performance gaps when applied to technical domains requiring precise information extraction from complex documents. Current evaluation methodologies relying on document-level metrics inadequately capture token-resolution retrieval accuracy that is critical for domain-related documents. We propose a framework combining granular evaluation metrics with synthetic data generation to optimize domain-specific RAG performance. First, we introduce token-aware metrics Precision $Ω$ and Intersection-over-Union (IoU) that quantify context preservation versus information density trade-offs inherent in technical texts. Second, we develop a reasoning model-driven pipeline using instruction-tuned LLMs (DeepSeek-R1, DeepSeek-R1 distilled variants, and Phi-4) to generate context-anchored QA pairs with discontinuous reference spans across three specialized corpora: SEC 10-K filings (finance), biomedical abstracts (PubMed), and APT threat reports (cybersecurity). Our empirical analysis reveals critical insights: smaller chunks (less than 10 tokens) improve precision by 31-42% (IoU = 0.071 vs. baseline 0.053) at recall costs (-18%), while domain-specific embedding strategies yield 22% variance in optimal chunk sizing (5-20 tokens). The DeepSeek-R1-Distill-Qwen-32B model demonstrates superior concept alignment (+14% mean IoU over alternatives), though no configuration universally dominates. Financial texts favor larger chunks for risk factor coverage (Recall = 0.81 at size = 20), whereas cybersecurity content benefits from atomic segmentation, Precision $Ω= 0.28$ at size = 5. Our code is available on https://github.com/aryan-jadon/Synthetic-Data-Generation-and-Evaluation-using-Reasoning-Model

View on arXivView PDF

Code Implementations(1)

This repository contains the implementation of our research on optimizing Retrieval-Augmented Generation (RAG) systems for technical domains. Our work addresses the unique challenges of precise information extraction from complex, domain-specific documents by introducing token-aware evaluation metrics and synthetic data generation pipeline.

71Python, Jupyter NotebookFeb 9, 20251 years ago
generative-aillm-evaluationllm-frameworkreasoning-language-modelssynthetic-dataset-generation

Similar Papers

Cite this paper

@article{jadon2025enhancing,
  title  = {Enhancing Domain-Specific Retrieval-Augmented Generation: Synthetic Data Generation and Evaluation using Reasoning Models},
  author = {Aryan Jadon and Avinash Patil and Shashank Kumar},
  year   = {2025},
  eprint = {2502.15854},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.15854v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.15854.svg)](https://codeofpaper.com/paper/2502.15854)

Discussion