Skip to content

Latest commit

 

History

History
263 lines (210 loc) · 6.69 KB

File metadata and controls

263 lines (210 loc) · 6.69 KB

Contributing to Agentic Retrieval Strategy

We're excited that you're interested in contributing to the Agentic Retrieval Strategy project! This document outlines how to contribute effectively.

🚀 Getting Started

Prerequisites

  • Python 3.8+ (recommended: 3.12+)
  • Ollama installed and running
  • Git for version control

Development Setup

# Fork and clone the repository
git clone https://github.com/yourusername/agentic-retrieval-strategy.git
cd agentic-retrieval-strategy

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# .venv\Scripts\activate   # Windows

# Install development dependencies
pip install -r requirements.txt
pip install pytest black flake8  # Development tools

# Run tests to ensure setup works
python -m pytest tests/

🎯 Ways to Contribute

1. Bug Reports

  • Use GitHub Issues with the "bug" label
  • Include system information (Python version, OS, Ollama version)
  • Provide minimal reproduction steps
  • Include error messages and logs

2. Feature Requests

  • Use GitHub Issues with the "enhancement" label
  • Describe the use case and expected behavior
  • Consider implementation complexity and project scope

3. Code Contributions

New Search Strategies

# In MultiStrategyRetriever class
def your_custom_strategy(self, query, documents):
    """
    Implement your custom retrieval strategy
    
    Args:
        query (str): Search query
        documents (list): Document corpus
        
    Returns:
        list: Ranked document results
    """
    # Your implementation here
    return ranked_results

New Evaluation Metrics

def custom_evaluation_metric(response, reference, context):
    """
    Implement custom evaluation logic
    
    Returns:
        float: Score between 0.0 and 1.0
    """
    # Your evaluation logic
    return score

New Model Support

# Add to MODELS dictionary in configuration
'YOUR_MODEL': {
    'api_url': 'http://localhost:11434/api/generate',
    'model_name': 'your-model-name',
    'description': 'Model description'
}

4. Documentation

  • Improve README clarity
  • Add code examples
  • Translate to other languages
  • Create tutorial content

5. Testing

  • Add unit tests for new features
  • Improve test coverage
  • Add integration tests
  • Performance benchmarking

📋 Development Guidelines

Code Style

  • Follow PEP 8 Python style guide
  • Use Black for code formatting: black .
  • Use flake8 for linting: flake8 .
  • Add type hints where appropriate

Commit Messages

Use conventional commit format:

type(scope): description

Examples:
feat(retrieval): add neural search strategy
fix(evaluation): correct confidence calculation
docs(readme): update installation instructions
test(phase3): add multi-strategy unit tests

Branch Naming

  • feature/description for new features
  • fix/description for bug fixes
  • docs/description for documentation
  • test/description for testing improvements

Pull Request Process

  1. Create Feature Branch

    git checkout -b feature/your-feature-name
  2. Make Changes

    • Write code following project conventions
    • Add/update tests as needed
    • Update documentation
  3. Test Your Changes

    python -m pytest tests/
    python phase3_agentic_rag.py  # Integration test
  4. Submit Pull Request

    • Use descriptive title and description
    • Reference related issues
    • Include screenshots/results if applicable
    • Request review from maintainers

🧪 Testing Guidelines

Unit Tests

# tests/test_retrieval_strategies.py
def test_bm25_strategy():
    retriever = MultiStrategyRetriever()
    results = retriever.bm25_search("query", documents)
    assert len(results) > 0
    assert all(isinstance(r, dict) for r in results)

Integration Tests

# tests/test_end_to_end.py
def test_phase3_evaluation():
    # Test complete Phase 3 pipeline
    results = run_phase3_evaluation(test_queries, test_corpus)
    assert 'mistral' in results
    assert 'phi4' in results

Performance Tests

  • Benchmark new features against baseline
  • Document performance impact
  • Include memory and time complexity analysis

📊 Research Contributions

Academic Research

  • Novel retrieval strategies
  • Improved confidence metrics
  • Comparative studies with additional models
  • Domain-specific adaptations

Industry Applications

  • Enterprise deployment guides
  • Integration with existing systems
  • Scalability improvements
  • Production optimizations

Data Contributions

  • Domain-specific datasets
  • Multilingual corpora
  • Synthetic evaluation data
  • Ground truth annotations

🎯 Priority Areas

High Priority

  • Additional LLM model support (GPT-4, Claude, Gemini)
  • Real-time evaluation dashboard
  • Distributed evaluation support
  • Advanced confidence algorithms

Medium Priority

  • Multimodal retrieval strategies
  • Graph-based knowledge representation
  • Few-shot strategy learning
  • Human evaluation integration

Low Priority

  • GUI interface
  • Cloud deployment automation
  • Mobile app integration
  • Blockchain-based evaluation

🤝 Community

Communication Channels

  • GitHub Issues: Technical discussions and bug reports
  • GitHub Discussions: General questions and ideas
  • Discord: Real-time community chat (coming soon)

Code of Conduct

We follow the Contributor Covenant code of conduct. Please be respectful and inclusive in all interactions.

Recognition

Contributors will be acknowledged in:

  • README.md contributors section
  • Release notes for significant contributions
  • Academic publications using the framework

📚 Resources

Learning Materials

External Resources

🚀 Release Process

Version Numbering

We use semantic versioning (MAJOR.MINOR.PATCH):

  • MAJOR: Breaking changes
  • MINOR: New features (backward compatible)
  • PATCH: Bug fixes

Release Checklist

  • Update version numbers
  • Update CHANGELOG.md
  • Run full test suite
  • Update documentation
  • Create GitHub release
  • Announce in community channels

Thank you for contributing to Agentic Retrieval Strategy! Together, we're advancing the state of RAG evaluation and agentic AI systems.

For questions about contributing, please open an issue or contact the maintainers.