A Handbook-Grounded Retrieval-Augmented Generation Chatbot for Family Planning: Comparative Evaluation of Qwen3-4B and Llama-3.1-8B
Abstract
This study presents a handbook-grounded Retrieval-Augmented Generation (RAG) chatbot for evidence-based family planning question answering using the Philippine Family Planning Handbook (2023 Edition) as a closed knowledge source. The system employs page-aware PDF extraction, overlapping chunking, and a hybrid BM25–FAISS retrieval pipeline with cross-encoder reranking to assemble page-attributed evidence. A controlled comparison evaluates Qwen3-4B-Instruct-2507 and Llama-3.1-8B-Instant as generator backends within the identical architecture. Results across ten domain-specific queries show that Qwen3-4B outperforms Llama-3.1-8B in grounding quality and efficiency, achieving higher Faithfulness (4.875 vs. 4.444), perfect Answer and Context Relevancy (5.000 vs. 4.556), improved completeness (3.000 vs. 2.333), and stronger semantic alignment (BERTScore F1: 0.802 vs. 0.796). Safety analysis reveals a 0.0% hallucination rate for Qwen3 compared to 11.1% for Llama, while maintaining correct refusal behavior for out-of-scope queries. Qwen3 also demonstrates substantially lower latency (6.33 s vs. 42.55 s). These results indicate that generator selection significantly affects reliability and efficiency in clinical RAG systems, with Qwen3-4B emerging as the preferred backend for handbook-grounded family planning chatbots.
Read the paper
Related studies
- Animal models of schizophrenia
- Retrieval Augmented Visual Question Answering with Outside Knowledge
- Fine-grained Late-interaction Multi-modal Retrieval for Retrieval Augmented Visual Question Answering
- Understand What LLM Needs: Dual Preference Alignment for Retrieval-Augmented Generation
- Retrieval-Augmented Embodied Agents
- Retrieving, Rethinking and Revising: The Chain-of-Verification Can Improve Retrieval Augmented Generation
Go deeper in Evidence Hub
Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.