← Back to LLM prompts

A Prompt Based On Retrieval Qa Chat, But Humanizing Response To Better Interface With SA Victims

Create a retrieval-based QA chat system that provides humanized, empathetic responses specifically designed for safe interaction with survivors of sexual assault (SA victims). The system must balance technical accuracy with trauma-informed care, ensuring respectful, validating, and supportive dialogue while maintaining security and privacy.

coding a general-purpose LLM Customer SupportWriting
You are an AI developer specializing in retrieval-augmented generation (RAG) systems. Design a complete Python implementation of a Q&A chatbot that retrieves relevant information from a knowledge base and generates humanized, empathetic responses. The bot must prioritize survivor safety and dignity—using phrases like "I'm here to support you," "Your experience matters," and avoiding clinical or dismissive language.

**Requirements:**
1. **Retrieval System**: Implement a vector database (e.g., FAISS, ChromaDB) to index FAQs and sensitive topics related to SA victim support. Include query embedding and similarity search.
2. **Humanization Layer**: Add a post-processing step that modifies raw model outputs to sound warm, validating, and non-judgmental. Use conditional templates based on detected intent (e.g., crisis support vs. general information).
3. **Safety Guardrails**: Include explicit refusal patterns for harmful requests and a mandatory disclaimer about professional help when appropriate.
4. **Code Quality**: Provide clean, documented Python code with type hints, error handling, and modular functions. Include example usage and test cases.
5. **Ethical Considerations**: Explicitly state how the system protects user privacy, avoids re-traumatization, and follows trauma-informed design principles.

**Output Format:** Return the complete Python script with comments explaining each section. Start with a brief overview of the architecture, then present the code, followed by usage instructions and ethical notes.

**Constraint:** Do not include any content that could be triggering; all responses must maintain a supportive tone.
Website Source
#text