This directory contains practical examples and tutorials for using QueryGym in different scenarios.
1. snippets
Quick code snippets demonstrating core QueryGym functionality.
Perfect for:
- Learning the basics
- Quick reference
- Copy-paste solutions
Examples include:
- Loading data from files
- Using format loaders (BEIR, MS MARCO)
- Query reformulation
- Context-based reformulation
- Using search adapters
2. docker
Docker-based examples for containerized workflows.
Perfect for:
- Quick start without installation
- Reproducible environments
- Jupyter notebook development
Includes:
- Ready-to-use
docker-compose.yml(Compose V2 compatible) - Interactive Jupyter notebook
- Quick setup guide
End-to-end retrieval workflows integrating QueryGym with Pyserini.
Perfect for:
- Complete IR experiments
- Indexing and retrieval pipelines
- Evaluation workflows
Includes:
- Building indexes
- Query reformulation + retrieval
- Evaluation with trec_eval
- Complete experiment scripts
cd docker/
docker compose run --rm querygym# Install QueryGym first
pip install querygym
# Run any snippet
cd snippets/
python 01_load_from_file.pycd querygym_pyserini/
# Follow the README for complete setupBeginner:
Intermediate:
- Explore different reformulation methods in snippets
- Run Jupyter notebooks in Docker
Advanced:
- Build complete pipelines with querygym_pyserini
- Integrate with your own retrieval systems
- Documentation: https://querygym.readthedocs.io
- Docker Setup: DOCKER_SETUP.md in the root directory
- API Reference: https://querygym.readthedocs.io/en/latest/api/core/
- GitHub: https://github.com/ls3-lab/QueryGym
- Start simple: Begin with basic snippets before complex workflows
- Use Docker: For quick experimentation without setup hassles
- Check READMEs: Each subdirectory has its own detailed README
- Modify examples: All examples are meant to be adapted to your needs
Have a useful example? We'd love to include it! Please:
- Add it to the appropriate subdirectory
- Include clear comments and documentation
- Test it works with the latest QueryGym version
- Submit a pull request
See the Contributing section in the main README for general contribution guidelines.
- Check the documentation
- Open an issue
- Join discussions on GitHub