Metadata-Version: 2.4
Name: gyrfalcon-rag
Version: 0.1.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Indexing
Requires-Dist: onnxruntime>=1.20 ; extra == 'full'
Requires-Dist: pypdfium2>=4 ; extra == 'pdf'
Provides-Extra: full
Provides-Extra: pdf
Summary: Fast hybrid retrieval for RAG: BM25 and dense search in one Rust engine, quick even on small CPUs.
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# gyrfalcon-rag

Hybrid retrieval for RAG (BM25 and dense vectors, fused) in one Rust engine, built to be fast
on any CPU. One `pip install gyrfalcon-rag`, then `import gyrfalcon`. No server, no vector
database. The PyPI name `gyrfalcon` is already taken, so the distribution name is `gyrfalcon-rag`.

```python
from gyrfalcon import Collection

with Collection("./my-index") as col:              # creates the collection on first use
    col.add("intro", "Gyrfalcons are the largest falcons.")
    col.add_many({"a": "first text", "b": "second text"})
    col.add_path("docs/")                           # PDF, HTML, Markdown, and text files
    for hit in col.search("largest falcon", k=5):
        print(f"{hit.score:.3f} {hit.doc_id} {hit.text[:80]}")
```

- `update(doc_id, text)` replaces a document atomically; `delete(doc_id)` removes it.
- Writes are durable when the call returns; searches see them at once.
- Two tiers. `lite` (default) embeds with static potion-retrieval-32M and needs no runtime.
  `full` embeds with int8 bge-small-en-v1.5 and needs ONNX Runtime: `pip install "gyrfalcon-rag[full]"`.
- PDFs need PDFium: `pip install "gyrfalcon-rag[pdf]"`.
- Models download on first use into `$GYR_MODELS` (default `~/.cache/gyrfalcon/models`).

Building from the repository: `pip install maturin && maturin develop --release` in
`crates/gyrfalcon-py`, then `pytest crates/gyrfalcon-py/tests`.

