# Chat Interface Usage Guide ## 🎯 **New Chat Features** Your Policy Analysis application now has a conversational interface! Here's what you can do: ### 💬 **How to Use the Chat** 1. **Ask Your First Question** ``` "What are Kenya's renewable energy policies?" ``` 2. **Follow Up with Related Questions** ``` "What penalties exist for non-compliance?" "How does this relate to environmental protection?" "Can you explain more about the licensing requirements?" ``` 3. **Reference Previous Responses** ``` "What does this mean in practice?" "Can you elaborate on the point about penalties?" "How do these regulations compare to what you mentioned earlier?" ``` ### 🔄 **Conversation Flow Example** **You:** "What are Kenya's energy policies regarding renewable sources?" **Assistant:** *[Provides detailed information about renewable energy policies with quotes and sources]* **You:** "What are the penalties for not following these policies?" **Assistant:** *[Builds on the previous context and explains penalties specifically]* **You:** "How do I apply for a renewable energy license?" **Assistant:** *[Continues the conversation with licensing information]* ### ⚙️ **Advanced Features** - **📊 Sentiment Analysis**: Toggle on/off to analyze the tone of policy documents - **🔍 Coherence Analysis**: Toggle on/off to check document relevance and consistency - **💾 Chat History**: The assistant remembers your conversation for better context - **📋 Copy Responses**: Click the copy button on any response - **🔗 Share Responses**: Share interesting responses using the share button ### 🎨 **Interface Elements** - **Chat Bubbles**: User messages (👤) and assistant responses (🤖) - **Settings Panel**: Control sentiment and coherence analysis - **Clear Chat**: Start a fresh conversation - **Analysis Status**: See which features are currently enabled ### 💡 **Tips for Better Conversations** 1. **Be Specific**: Ask about particular aspects of policies 2. **Build Context**: Ask follow-up questions that reference previous answers 3. **Use Natural Language**: Talk as you would to a human expert 4. **Reference Sources**: Ask for more details about quoted sources ### 📝 **Example Conversation Starters** **Policy Research:** - "What are the main objectives of Kenya's water management policies?" - "Tell me about environmental compliance requirements" **Follow-up Questions:** - "What does this mean for small businesses?" - "Can you explain the implementation process?" - "What are the timelines mentioned?" **Comparative Questions:** - "How does this compare to energy policies?" - "Are there similar requirements in other sectors?" ### 🚀 **Getting Started** 1. Start the application: `python app.py` 2. Open your browser to the provided URL 3. Begin with a general question about Kenya policies 4. Use follow-up questions to dive deeper 5. Toggle analysis features as needed ### 🔧 **Settings Explained** - **Sentiment Analysis ON**: Get insights into the tone and intent of policy text - **Coherence Analysis ON**: Verify that retrieved documents are relevant and consistent - **Both OFF**: Faster responses with just policy content and analysis --- **Note**: The chat maintains context from your conversation, so each response builds on what was discussed earlier, making it feel more natural and helpful!