Skip to main content

Python package for Rule-based Retrieval using RAG

Project description

Rule-based Retrieval

Python Version License PyPI Version Code Style: Black Checked with mypy Whyhow Discord

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.

Installation

Prerequisites

  • Python 3.10 or higher
  • OpenAI API key
  • Pinecone or Milvus API key

Install from PyPI

You can install the package directly from PyPI using pip:

pip install rule-based-retrieval

Install from GitHub

Alternatively, you can clone the repo and install the package:

git clone git@github.com:whyhow-ai/rule-based-retrieval.git
cd rule-based-retrieval
pip install .

Developer 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://git@github.com/whyhow-ai/rule-based-retrieval

Documentation

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.

Examples

Check out the examples/ directory for sample scripts demonstrating how to use the Rule-based Retrieval package.

How to

Demo

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:

Contributing

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:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Make your changes and commit them with descriptive messages
  4. Push your changes to your forked repository
  5. Open a pull request to the main repository

License

This project is licensed under the MIT License.

Support

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 team@whyhow.ai, or follow our newsletter at WhyHow.AI. Join our discussions about rules, determinism and knowledge graphs in RAG on our newly-created Discord.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rule_based_retrieval-0.1.4.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

rule_based_retrieval-0.1.4-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file rule_based_retrieval-0.1.4.tar.gz.

File metadata

  • Download URL: rule_based_retrieval-0.1.4.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for rule_based_retrieval-0.1.4.tar.gz
Algorithm Hash digest
SHA256 354976b6687a64971a15ab586fb8bff9b286d74bace1fc7a1bc19962e24839dd
MD5 60310f9287a02814cc16dd17ebc06302
BLAKE2b-256 78c045823280b95606fec95b5979c8f8e6a07423f3cd6afae89376ae536a1d1d

See more details on using hashes here.

File details

Details for the file rule_based_retrieval-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for rule_based_retrieval-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a97203b89446e94d4218b3af79dbbf4593de10d112381b7a7118f717a2e0546b
MD5 391f7ee5924a88236d46f5ead899b1f6
BLAKE2b-256 3e7bf73245fbbeeb4f7b72891a7ad9cb6ac7a4dac54cf083ed8ec791800485bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page