semsift
Building blocks for hybrid retrieval: find files, chunk text, embed it, store vectors and a keyword index together in SQLite or memory, search both, fuse the ranked results and rerank them. It retrieves and ranks; it never generates text.
Status: Implemented, not yet released. See docs/design.md for the blocks and their contracts, and docs/features.md for what was taken from other projects.
import sqlite3
from semsift.embed import StaticEncoder
from semsift.search import KeywordSource, Search, VectorSource
from semsift.store import Field, Item, Store
conn = sqlite3.connect(":memory:", isolation_level=None)
store = Store(conn, "notes", [Field("source", "text")],
encoder=StaticEncoder("minishlab/potion-base-8M"))
items = [Item(1, "Rent is due on the first of the month.", {"source": "lease.md"}),
Item(2, "The boiler service is booked for Tuesday.", {"source": "home.md"})]
vectors = store.embed(items) # encode before opening the transaction
conn.execute("BEGIN")
store.upsert(items, vectors) # the store never commits; you do
conn.execute("COMMIT")
search = Search(store, sources=[VectorSource(store), KeywordSource(store)],
citation=("source",))
for hit in search.run("when is rent due", k=1).hits:
print(hit.citation["source"], hit.text)
pip install semsift includes the static (model2vec) encoders. Extras
add the rest: onnx, webgpu, and tree-sitter for syntax-aware
chunking.
Development
uv venv .venv && uv pip install --python .venv/bin/python -e ".[onnx,tree-sitter]"
HF_HUB_OFFLINE=1 .venv/bin/python -m unittest discover -s tests -t .
.venv/bin/python benchmarks/run.py
To use an unreleased semsift from another project, depend on the
checkout (uv add --editable ../semsift, or pip install -e ../semsift),
or build it (uv build) and install the wheel from dist/.
Releasing
The version lives only in semsift.__version__. Bump it, commit, and push
a matching tag (v0.0.3). The release workflow runs the tests, builds,
refuses to publish unless the tag, __version__, the sdist and the wheel
agree, publishes to PyPI through trusted publishing, and creates the
GitHub release. PyPI must list this repository's release.yml as a
trusted publisher for the semsift project.
Release files for semsift 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| semsift-0.0.3.tar.gz | 41.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| semsift-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.5 kB
Release files / semsift-0.0.3.tar.gz
| Download URL | semsift-0.0.3.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
357545326d367f973a38be0e1ebf9cb10478b2d40501b0ccd69abd2c28dd8951
|
|
BLAKE2b-256 checksum How to use checksums |
a25acb819e1d7fd8835dec2f3b26b998ff854599566015d9b6d275e8382ccddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / semsift-0.0.3-py3-none-any.whl
| Download URL | semsift-0.0.3-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddb61a36b324625e95f273007d07a8d5f7acce6a61cd6651313b2efbbe1275bb
|
|
BLAKE2b-256 checksum How to use checksums |
d02db74557f7baa4b83ddd2755ac47b44282b71b2b4922a4746c74e168ee2b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log