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.1.tar.gz (18.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.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sie_haystack-0.7.1.tar.gz
  • Upload date:
  • Size: 18.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.1.tar.gz
Algorithm Hash digest
SHA256 cf2fe8aa5f9d35c58850c9cb5c257f7dacee0ef046c2946e2f1c68182a762eb9
MD5 70979d18c5994c6c56c810c403406e7d
BLAKE2b-256 ba176ddef3ede4b5d86222cbf870eea6510b2e2cee42770f76edf2ee6b971a2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.7.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: sie_haystack-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 adea12ddd1fd92caf21d539997b829a1bb693c91356ab906b7ce11baf5b6d1e8
MD5 7c8af4469d6386df2d4e8b59a0ece15b
BLAKE2b-256 d50ce97c6c3933c7ed6cb1aae89df139341b8f4cc32cd35a6ce2a6b8d0897ae4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.7.1-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

0.7.2

2 files

This release

0.7.1 This release

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