Skip to main content

sie-haystack

SIE integration for Haystack.

Installation

pip install sie-haystack

Imports

Preferred import paths follow Haystack's namespace convention:

from haystack_integrations.components.embedders.sie import (
    SIEDocumentEmbedder,
    SIETextEmbedder,
)
from haystack_integrations.components.rankers.sie import SIERanker
from haystack_integrations.components.extractors.sie import SIEExtractor

The legacy flat imports remain supported for compatibility:

from sie_haystack import SIEDocumentEmbedder, SIEExtractor, SIERanker, SIETextEmbedder

Usage

from haystack import Document
from haystack_integrations.components.embedders.sie import SIEDocumentEmbedder, SIETextEmbedder
from haystack_integrations.components.rankers.sie import SIERanker

# Embed a query
text_embedder = SIETextEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
result = text_embedder.run(text="What is machine learning?")
query_embedding = result["embedding"]

# Embed documents
doc_embedder = SIEDocumentEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
docs = [Document(content="Python is a programming language.")]
result = doc_embedder.run(documents=docs)
embedded_docs = result["documents"]

# Rerank documents
ranker = SIERanker(
    base_url="http://localhost:8080",
    model="jinaai/jina-reranker-v2-base-multilingual"
)
result = ranker.run(query="What is Python?", documents=embedded_docs, top_k=3)
ranked_docs = result["documents"]

Relation models such as GLiREL classify relations between supplied entity spans. Extract those spans first, then pass them through the relation extractor's entities input:

from haystack_integrations.components.extractors.sie import SIEExtractor

text = "Tim Cook is the CEO of Apple Inc."
entity_extractor = SIEExtractor(
    model="urchade/gliner_multi-v2.1",
    labels=["person", "organization"],
)
relation_extractor = SIEExtractor(
    model="jackboyla/glirel-large-v0",
    labels=["ceo_of"],
)

entities = entity_extractor.run(text=text)["entities"]
result = relation_extractor.run(text=text, entities=entities)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sie_haystack-0.7.2.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

sie_haystack-0.7.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file sie_haystack-0.7.2.tar.gz.

File metadata

  • Download URL: sie_haystack-0.7.2.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sie_haystack-0.7.2.tar.gz
Algorithm Hash digest
SHA256 9a7c8085fb5f3a75a6b75b22dfa892b0d2386a604db87838d8f42798231c23d1
MD5 5cc41ade8d082b867560402ac3ebe474
BLAKE2b-256 e99bc4780c0859f9177139023f869d069cb3bb67ae370cb54fea3d6e9146d11c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.7.2.tar.gz:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sie_haystack-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: sie_haystack-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sie_haystack-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4b4fdb57f7813f239928017b806b30e28e74fbdeb1debb3cc2a35aa383c886e
MD5 f439fc46db791aae7561b4c1f089979e
BLAKE2b-256 0484a3fe144214ddbf27e20db9a40472e35f8c01ccc5c814fd01e9e6a355a6d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.7.2-py3-none-any.whl:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.3

2 files

This release

0.7.2 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.30

2 files

0.6.29

2 files

0.6.28

2 files

0.6.27

2 files

0.6.26

2 files

0.6.25

2 files

0.6.24

2 files

0.6.23

2 files

0.6.22

2 files

0.6.21

2 files

0.6.20

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page