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).

Search Speed (Verified on M5 MacBook Pro)

Search Type P50 (ms) P95 (ms) P99 (ms) Speedup
Standard (Cold) 27.61 35.42 42.10 1.0x
Semantic Cache 19.14 22.80 25.40 1.4x
Hot Cache (Exact) 3.36 4.10 4.88 8.2x

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.1.0.tar.gz (4.6 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.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: irkit_py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 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.1.0.tar.gz
Algorithm Hash digest
SHA256 8f39a93b656ccf901c241a3f34d60adb32e4e5c3c8dfee8217ab1c6c010d6e04
MD5 e74b25b2f360008f8978ff5f7298d0be
BLAKE2b-256 9002cbfbf4fb23a97718428bcd37bf0d8a1308eabbc598e1ef8eda58e4ddbf89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: irkit_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eee7112a234f1edb525fe3f232615d0ca42cc037de32d5f228302caeafa43ab
MD5 cefc36827716d9203d284675fdeb0376
BLAKE2b-256 9fae93eb0821f0ccad7cea1264427ec15281c84731bba98c10c7280ebdfebb18

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