RAG-CFE: Retrieval-Augmented LLMs for Counterfactual Explanations

Published:

Designed an end-to-end RAG framework that combines DiCE-generated counterfactual candidates with LLM-based refinement to improve feasibility, plausibility, and actionability of recourse recommendations. Integrated retrieved domain evidence with LLM-assisted refinement, producing structured JSON outputs with natural-language justifications. Evaluated the system against a DiCE baseline on validity, proximity, sparsity, feasibility, and plausibility.

Tools: Gemini 2.5 Flash, DiCE, RAG, prompt engineering

Code: github.com/zkhotanlou/RAG_Counterfactual_Explanation