policy-analysis / CHAT_GUIDE.md
kaburia's picture
updated app
5d99375
# 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!