Skip to main content

A small library to chunk large files into smaller arrays that can be used for generating RAG embeddings

Project description

chunking4rag

This repo will have various chunking strategies one can build in order to get best performance out of RAG framework The strategies discussed in this repo are:

  1. Fixed length chunking

  2. Keyword chunking

  3. Adaptive chunking

  4. Sliding window

  5. Paragraph chunking

  6. Sentence chunking

To install this library

Run the following command

pip install chunking4rag

To start with contribution to the project

  1. Clone the repository using git

  2. Create a virtual environment using uv

uv create chunking4rag
  1. Activate the virtual environment
source .venv/bin/activate
  1. Install the dependencies by running
uv install -r requirements.txt
  1. Run tests to make sure everything is working fine
python chuking_tests.py

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

chunking4rag-0.0.4.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chunking4rag-0.0.4-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file chunking4rag-0.0.4.tar.gz.

File metadata

  • Download URL: chunking4rag-0.0.4.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chunking4rag-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7bc2b019563930095a6818345ac726ceb5dbbe487923d63cdc8523f00d609ed9
MD5 f92fa2af87743ecd0fa245b83c14d981
BLAKE2b-256 abdf585d7a9b00d675b4709d83e0c81ae3fdbb3a3b62c2dcd6f8b97012f03bc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for chunking4rag-0.0.4.tar.gz:

Publisher: python-publish.yml on harpreetset1/chunking4rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chunking4rag-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: chunking4rag-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chunking4rag-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44bd25332f97225f85b78c70a930ab0c568085d39689568f5d2b79fbb22d0530
MD5 2f90cd928b3db657c4a990518b884c16
BLAKE2b-256 3e0962fc007d283cd109240662cabe4da5ca28b21d438b784b39be4be6426c7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chunking4rag-0.0.4-py3-none-any.whl:

Publisher: python-publish.yml on harpreetset1/chunking4rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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