[Paper Review] From RAG to QA-RAG: Integrating Generative AI for Pharmaceutical Regulatory Compliance Process
QA-RAG extends Retrieval Augmented Generation by incorporating a fine-tuned LLM answer into dual-track retrieval, improving context relevance and final answer quality for pharmaceutical regulatory guidance.
Regulatory compliance in the pharmaceutical industry entails navigating through complex and voluminous guidelines, often requiring significant human resources. To address these challenges, our study introduces a chatbot model that utilizes generative AI and the Retrieval Augmented Generation (RAG) method. This chatbot is designed to search for guideline documents relevant to the user inquiries and provide answers based on the retrieved guidelines. Recognizing the inherent need for high reliability in this domain, we propose the Question and Answer Retrieval Augmented Generation (QA-RAG) model. In comparative experiments, the QA-RAG model demonstrated a significant improvement in accuracy, outperforming all other baselines including conventional RAG methods. This paper details QA-RAG's structure and performance evaluation, emphasizing its potential for the regulatory compliance domain in the pharmaceutical industry and beyond. We have made our work publicly available for further research and development.
Motivation & Objective
- Address the inefficiency of navigating extensive pharmaceutical regulatory guidelines (FDA/ICH).
- Propose a QA-RAG chatbot that fuses a fine-tuned LLM answer with user queries for improved retrieval.
- Demonstrate that QA-RAG outperforms conventional RAG baselines in context retrieval and answer generation.
- Showcase the model's potential applicability beyond pharma to other domain-specific regulations.
Proposed method
- Use dense document embeddings (embedding model: LLM-Embedder) and FAISS for scalable similarity search over 1,404 FDA/ICH guideline documents processed with OCR (chunked with 10,000 char size, 2,000 char overlap).
- Implement dual-track retrieval: retrieve documents using both the user query and a hypothetical answer generated by a fine-tuned LLM (FDA Q&A data).
- Fine-tune two LLMs (ChatGPT 3.5-Turbo and Mistral-7B) on FDA FAQ data; compare with GPT-4 via BertScore; select ChatGPT 3.5-Turbo for best precision/recall balance.
- Apply a reranker (BGE reranker) to rank retrieved documents by relevance to the query and final answer generation stage.
- Generate final answers with a ChatGPT-3.5-Turbo final-answer agent using few-shot prompts.
- Evaluate using LLMs-as-judges framework (Ragas for context retrieval, BertScore for answer quality).
Experimental results
Research questions
- RQ1Can a QA-focused RAG variant improve retrieval precision and recall for regulatory guidelines in pharma?
- RQ2Does incorporating a fine-tuned LLM's hypothetical answer into retrieval improve final answer quality compared to traditional RAG and HyDE-style methods?
- RQ3What is the impact of the fine-tuned LLM vs a general LLM on context retrieval and answer generation in regulated domains?
Key findings
- QA-RAG achieves higher context precision (0.717) and context recall (0.328) than major baselines.
- In answer generation, QA-RAG attains precision 0.551, recall 0.645, and F1 0.591, outperforming baselines.
- Using the fine-tuned LLM’s hypothetical answer substantially boosts retrieval relevance over question-only or HyDE baselines.
- Ablation shows the hypothetical answer component greatly enhances context precision; combining question and hypothetical answer yields strongest performance.
- Fine-tuned LLMs (ChatGPT 3.5-Turbo) outperform other variants in this domain, validating domain-adaptive fine-tuning for regulatory tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.