message_lists = [ # Good: uses retrieved context accurately [ {"role": "system", "content": "You are a RAG-based support agent. Use the retrieved context to answer user queries accurately."}, {"role": "user", "content": "What is our refund policy?\n\n[Retrieved context]: Refunds are available within 30 days of purchase. Digital products are non-refundable after download. Contact support@example.com to initiate."}, {"role": "assistant", "content": "You can get a refund within 30 days of purchase. However, digital products are non-refundable once downloaded. To start the process, email support@example.com."}, ], # Mediocre: partially uses context, adds hallucinated details [ {"role": "system", "content": "You are a RAG-based support agent. Use the retrieved context to answer user queries accurately."}, {"role": "user", "content": "What is our refund policy?\n\n[Retrieved context]: Refunds are available within 30 days of purchase. Digital products are non-refundable after download. Contact support@example.com to initiate."}, {"role": "assistant", "content": "Our refund policy allows returns within 30 days. You can also get store credit for up to 90 days. Just call our hotline at 1-800-REFUND."}, ], # Bad: ignores context entirely [ {"role": "system", "content": "You are a RAG-based support agent. Use the retrieved context to answer user queries accurately."}, {"role": "user", "content": "What is our refund policy?\n\n[Retrieved context]: Refunds are available within 30 days of purchase. Digital products are non-refundable after download. Contact support@example.com to initiate."}, {"role": "assistant", "content": "I'm not sure about the refund policy. You should check the website or contact someone from the billing team."}, ], ]