The Rule-based Retrieval package is a Python package that enables you to create and manage Retrieval Augmented Generation (RAG) applications with advanced filtering capabilities. It seamlessly integrates with OpenAI for text generation and Pinecone for efficient vector database management.
- Python 3.10 or higher
- OpenAI API key
- Pinecone, Milvus or Qdrant credentials
You can install the package directly from PyPI using pip:
pip install rule-based-retrieval
Alternatively, you can clone the repo and install the package:
git clone [email protected]:whyhow-ai/rule-based-retrieval.git
cd rule-based-retrieval
pip install .
For a developer installation, use an editable install and include the development dependencies:
pip install -e .[dev]
For ZSH:
pip install -e ".[dev]"
If you want to install the package directly without explicitly cloning yourself run
pip install git+ssh://[email protected]/whyhow-ai/rule-based-retrieval
Documentation can be found here.
To serve the docs locally run
pip install -e .[docs]
mkdocs serve
For ZSH:
pip install -e ".[docs]"
mkdocs serve
Navigate to http://127.0.0.1:8000/ in your browser to view the documentation.
Check out the examples/
directory for sample scripts demonstrating how to use the Rule-based Retrieval package.
whyhow_rbr
offers different ways to implement Rule-based Retrieval through two databases and down below are the documentations(tutorial and example) for each implementation:
We welcome contributions to improve the Rule-based Retrieval package! If you have any ideas, bug reports, or feature requests, please open an issue on the GitHub repository.
If you'd like to contribute code, please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with descriptive messages
- Push your changes to your forked repository
- Open a pull request to the main repository
This project is licensed under the MIT License.
WhyHow.AI is building tools to help developers bring more determinism and control to their RAG pipelines using graph structures. If you're thinking about, in the process of, or have already incorporated knowledge graphs in RAG, we’d love to chat at [email protected], or follow our newsletter at WhyHow.AI. Join our discussions about rules, determinism and knowledge graphs in RAG on our newly-created Discord.