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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sie_haystack-0.6.24.tar.gz
Algorithm Hash digest
SHA256 8632c8ff69a49a27ad621211f0c6a8b47cc06585cf1b4e04fe5fb7fcf9d4a86d
MD5 596e30ad1512437bb9c70ab21bceb096
BLAKE2b-256 30f130372e66b00e99b88c4a72cc76d4e1b9b20f73913fc9a46b5d0135ff022c

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for sie_haystack-0.6.24-py3-none-any.whl
Algorithm Hash digest
SHA256 3d22b44ed63cc30d34408b1c7df08f51ffccf58190e01535090763e22a85d074
MD5 9be48f6465cdfb083330ac145e3b999f
BLAKE2b-256 3d92f61486f4f5499fcde46be81b4c811d2974bf120d6483079309bccb919665

See more details on using hashes here.

Provenance

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

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

This release

0.6.24 This release

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