Skip to main content

**PurrfectKit** is a Python library for effortless Retrieval-Augmented Generation (RAG) workflows.

Project description

PurrfectMeow Logo

PurrfectKit

Python 3.10–3.13 PyPI Downloads codecov Ruff Docker License

PurrfectKit is a toolkit that simplifies Retrieval-Augmented Generation (RAG) into 5 easy steps:

  1. Suphalak - read content from files
  2. Malet - split content into chunks
  3. WichienMaat - embed chunks into vectors
  4. KhaoManee - search vectors with queries
  5. Kornja - generate answers from vectors

NOTE: Each step is inspired by a unique Thai cat breed, making the workflow memorable and fun.

Quickstart

Prerequisites

  • python
  • tesseract

Installation

pip install purrfectkit

Usage

from purrfectmeow.meow.felis import DocTemplate, MetaFile
from purrfectmeow import Suphalak, Malet, WichienMaat, KhaoManee

file_path = 'test/test.pdf'
metadata = MetaFile.get_metadata(file_path)
with open(file_path, 'rb') as f:
    content = Suphalak.reading(f, 'test.pdf')
chunks = Malet.chunking(content, chunk_method='token', chunk_size='500', chunk_overlap='25')
docs = DocTemplate.create_template(chunks, metadata)
embedding = WichienMaat.embedding(chunks)
query = WichienMaat.embedding("ทดสอบ")
KhaoManee.searching(query, embedding, docs, 2)

License

PurrfectKit is released under the MIT License.

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

purrfectkit-0.2.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

purrfectkit-0.2.2-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file purrfectkit-0.2.2.tar.gz.

File metadata

  • Download URL: purrfectkit-0.2.2.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for purrfectkit-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d401cdb36d7154d639a4d217ee30c70bc868b05cb13a172aa5520206ee56609f
MD5 860cccf60291d25475b4d6fb15735827
BLAKE2b-256 5a9514284b70ec39aa9df01b1810362dd3e30b30460b40a12a07a35f1e868835

See more details on using hashes here.

File details

Details for the file purrfectkit-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for purrfectkit-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8391687543287371f3ae18964492abd52e8d87b224f25c008cdaeb6e8172e91
MD5 b6dce5b31c4b52f476163d541f82eb4e
BLAKE2b-256 e900a58282a367bac35b8cdc135c342d05809a49f9bb9bde01de85e62dcb3d54

See more details on using hashes here.

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