Skip to main content

Pluggable distributed hybrid information retrieval toolkit

Project description

🚀 IRKit: Distributed Hybrid Information Retrieval Toolkit

Python Version FastAPI

IRKit is a modular, high-performance Information Retrieval (IR) library built for the modern era of Semantic Search. It combines BM25 Keyword Search with Vector Embeddings and Cross-Encoder Reranking to provide search precision.


✨ Key Features

  • 🔍 Hybrid Search: Combines BM25 and Semantic search using Reciprocal Rank Fusion (RRF).
  • 🌐 Distributed Architecture: Implemented Consistent Hashing over a sharded Redis cluster, ensuring O(1) metadata lookups and seamless horizontal scaling.
  • ⚡ Performance First: Guaranteed sub-5ms search latency via a custom Semantic Vector Cache; integrated P50/P95/P99 latency tracking for real-time observability.
  • 🚀 Production-Ready: Fully containerized with Docker & Docker Compose; designed for high-availability deployment on GCP (Google Cloud Platform) or Hugging Face.

🎨 Frontend Demo

Experience the engine visually through a React-powered search interface.

  1. Start the API: irkit serve --source arxiv --max-docs 500
  2. Start the UI: cd demo && npm run dev
  3. Open: http://localhost:5173

📊 Benchmarks & Quality

Verified actual numbers (M5 MacBook Pro) - 20,000 Documents.

Search Performance (20,000 Docs @ 384-dim)

Mode Search Latency Indexing Time* Peak RSS Memory
Baseline (float32) 1.41 ms 0.149 s 610 MB
SQ8 (uint8) 7.65 ms 0.122 s 677 MB
PQ (8-subspaces) 1.15 ms 1.028 s 677 MB

*Indexing includes K-Means training for PQ.

Precision (ArXiv - 200 docs)

Ranking Mode Mean MRR Mean nDCG@10
BM25 Only 0.8750 1.0000
Semantic Only 1.0000 1.0000
Hybrid + Reranking 1.0000 1.0000

🏗️ Technical Architecture

IRKit is built on four core pillars:

  1. Sources: Native ingestors for ArXiv, Wikipedia, News RSS, and Local Files.
  2. Embedders: Support for local HuggingFace models or OpenAI API.
  3. Rankers: Advanced relevance algorithms including BM25, Semantic FAISS, Hybrid RRF, and Cross-Encoder Reranking.
  4. Core Services: Latency tracking, Semantic Caching, and Scientific Evaluation modules.

🧪 Testing

# Run full test suite with coverage
pytest tests/ -v --cov=irkit

# Run performance & quality benchmarks
python3 scripts/evaluate_quality.py
python3 scripts/benchmark_cache.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

irkit_py-0.2.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

irkit_py-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file irkit_py-0.2.0.tar.gz.

File metadata

  • Download URL: irkit_py-0.2.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for irkit_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 66f5c2dd0ff0f283428dac08abfceca39a95da4d378bbec9466c1bbf0a5b8855
MD5 55c41f4d065a4caaab941955200ecd8b
BLAKE2b-256 9047f87d0fcd72bc5ad77ee33d13a6406afbcd03385f44f3d584786b90a9dbca

See more details on using hashes here.

File details

Details for the file irkit_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: irkit_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for irkit_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbb73d2549a39ebab86c2e998349952f370bec379c9d22d781a0ef01158e67fc
MD5 94e5b4abe12e2b77fd152c930d198984
BLAKE2b-256 c17baf792a298c1a1aab889906521d2b3af4501216953fe95db747303bed8f2b

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