Project BGH Leitsatz
Collection
10 items • Updated
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Modell: Qwen/Qwen3-Embedding-8B
Datensatz: cwinkler/bgh-leitsaetze
Einträge: 21506
Dimension: 4096
Normalisiert: True (Cosine Similarity)
MTEB Multilingual: Rank #1, Score 70.58 (Juni 2025)
Qwen3-Embedding verwendet eine Task-Instruction nur für Suchanfragen. Dokumente werden ohne Instruction eingebettet.
# Queries MIT Instruction:
instruct_query = "Instruct: Retrieve the most relevant BGH headnote decision for the given legal question\nQuery: Kann KI Erfinder sein?"
q_emb = model.encode(instruct_query, normalize_embeddings=True)
# Dokumente OHNE Instruction:
doc_emb = model.encode("I ZR 123/20: Leitsatztext...", normalize_embeddings=True)
embeddings.npy — Embedding-Matrix ids.npy — SHA-1 IDs docs.npy — Originaltexte (Aktenzeichen: Leitsatz) chroma.zip — ChromaDB Indeximport numpy as np
from huggingface_hub import hf_hub_download
from sentence_transformers import SentenceTransformer
embeddings = np.load(
hf_hub_download("cwinkler/bgh-embeddings-qwen3-8b", "embeddings.npy", repo_type="dataset"),
allow_pickle=True
).astype(float)
docs = np.load(
hf_hub_download("cwinkler/bgh-embeddings-qwen3-8b", "docs.npy", repo_type="dataset"),
allow_pickle=True
)
model = SentenceTransformer("Qwen/Qwen3-Embedding-8B")
q_emb = model.encode(
"Instruct: Retrieve the most relevant BGH headnote decision for the given legal question\nQuery: Kann KI Erfinder sein?",
normalize_embeddings=True
)
scores = embeddings @ q_emb
top5 = np.argsort(scores)[::-1][:5]
for idx in top5:
print(f"{scores[idx]:.4f} | {docs[idx][:100]}")