Thank you for your interest in contributing to SaralPolicy! We welcome contributions from the community to help make insurance documents more understandable for everyone.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
We are committed to providing a welcoming and inclusive environment for all contributors, regardless of background or identity.
- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check existing issues to avoid duplicates.
When submitting a bug report, include:
- Clear description of the issue
- Steps to reproduce the behavior
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment details (OS, Python version, Ollama version)
- Relevant log output
Enhancement suggestions are welcome! Please provide:
- Clear use case and motivation
- Detailed description of the proposed feature
- Examples of how it would work
- Any alternative solutions considered
- Fork the repository and create your branch from
main - Make your changes following our coding standards
- Add tests for any new functionality
- Update documentation as needed
- Ensure all tests pass before submitting
- Submit a pull request with a clear description
- Python 3.9 or higher
- Ollama installed and running
- Git for version control
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/SaralPolicy.git cd SaralPolicyNote: Replace
YOUR-USERNAMEwith your GitHub username after forking. -
Create virtual environment:
python -m venv venv venv\Scripts\activate # Windows # source venv/bin/activate # Linux/Mac
-
Install dependencies:
cd backend pip install -r requirements.txt -
Setup Ollama models:
ollama pull gemma2:2b ollama pull nomic-embed-text
-
Index IRDAI knowledge base:
python scripts/index_irdai_knowledge.py
-
Run tests:
python -m pytest tests/
-
Update your fork with the latest from main:
git fetch upstream git merge upstream/main
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "feat: add your feature description"
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request with:
- Clear title describing the change
- Detailed description of what and why
- References to related issues
- Screenshots/GIFs if UI changes
- Test results
-
Wait for review - maintainers will review and provide feedback
We follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Adding or updating testsrefactor:Code refactoringstyle:Formatting changeschore:Maintenance tasks
Examples:
feat: add document comparison feature
fix: resolve ChromaDB connection timeout
docs: update RAG implementation guide
test: add integration tests for Q&A endpoint
- Follow PEP 8 style guide
- Use type hints where appropriate
- Write docstrings for functions and classes
- Keep functions small and focused
- Use meaningful variable names
Example:
def analyze_policy(text: str, policy_type: str) -> Dict[str, Any]:
"""
Analyze insurance policy document using RAG.
Args:
text: Policy document text
policy_type: Type of insurance (health/motor/life)
Returns:
Dictionary containing analysis results
"""
# Implementation
pass- Keep related code in appropriate service files
- Use modular design patterns
- Avoid circular dependencies
- Follow existing project structure
- Use specific exception types
- Provide helpful error messages
- Log errors appropriately
- Handle edge cases gracefully
- Write tests for all new features
- Update tests when modifying existing code
- Ensure 100% of critical path is tested
- Include both unit and integration tests
# Run all tests (Recommended)
python -m pytest tests/
# Run specific integration test
python -m pytest tests/test_rag_citations.py- Aim for high test coverage on critical components
- Test happy paths and error scenarios
- Include edge cases
- Mock external dependencies (Ollama API)
- Code comments for complex logic
- Docstrings for functions and classes
- README updates for new features
- API documentation for new endpoints
- User guides for significant changes
- Use clear, concise language
- Include code examples
- Add screenshots for UI changes
- Keep documentation up-to-date with code
We especially welcome contributions in these areas:
- Additional IRDAI regulatory knowledge documents
- Support for more insurance types (travel, property, etc.)
- Enhanced Hindi translation capabilities
- Performance optimizations
- Additional test coverage
- UI/UX improvements
- Additional evaluation metrics
- Better error handling and logging
- Documentation improvements
- Integration with more LLM models
- Mobile app support
- Additional language support (regional languages)
- Advanced analytics dashboard
- Export features (PDF, CSV)
- Browser extensions
If you discover a security vulnerability, please email vikassahani17@gmail.com instead of using the issue tracker. Security issues will be handled privately and fixed before public disclosure.
- GitHub Issues: For bugs and feature requests
- Email: vikassahani17@gmail.com
- LinkedIn: Vikas Sahani
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to SaralPolicy! 🙏
Your efforts help make insurance more transparent and understandable for millions of people.