Better search than OpenAI text-embedding‑3‑large, for 53% less
SIE runs open-source embedding models behind one API. Embed your documents and your users’ questions, and the passage that answers each question comes back first, for site search, document assistants and agent memory.
SIE Qwen3 Embedding 4B
Rule that applies firstQuestion Once my boarding pass has been scanned at the gate, can the airline still bump me off an overbooked flight?
- 1 14 CFR 250.7(a) 14 CFR Part 250, Oversales
A covered air carrier may not deny a revenue passenger traveling on a confirmed reservation permission to board, or involuntarily remove that passenger from the aircraft, once a revenue passenger has: (1) Checked in for the flight prior to the check-in deadline; and (2) Had their ticket or boarding pass collected or electronically scanned and accepted by the gate agent.
If the flight is overbooked, no one will be denied a seat until airline personnel first ask for volunteers willing to give up their reservation in exchange for compensation of the airline's choosing. If there are not enough volunteers, the airline will deny boarding to other persons in accordance with its particular boarding priority.
The answer came second.
OpenAI's embeddings put the look-alike rule first
OpenAI text-embedding-3-large
Offsets setting firstQuestion What's the default number of blocks cached for the pg_multixact members cache, not the offsets cache?
- 1 PostgreSQL, multixact_offset_buffers ( integer ) PostgreSQL documentation, Server Configuration
Specifies the amount of shared memory to use to cache the contents of pg_multixact/offsets (see). If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default value is 16. This parameter can only be set at server start.
- 2 PostgreSQL, multixact_member_buffers ( integer ) PostgreSQL documentation, Server Configuration
Specifies the amount of shared memory to use to cache the contents of pg_multixact/members (see). If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default value is 32. This parameter can only be set at server start.
SIE Qwen3 Embedding 4B ranked the answer first.
OpenAI text-embedding-3-large
Oral-statement rule firstQuestion If law enforcement gives us a written statement asking us to hold breach notification, how long must we delay it for
- 1 45 CFR 164.412(b) 45 CFR 164 Subpart D, Breach Notification
(b) If the statement is made orally, document the statement, including the identity of the official making the statement, and delay the notification, notice, or posting temporarily and no longer than 30 days from the date of the oral statement, unless a written statement as described in paragraph (a) of this section is submitted during that time.
- 3 45 CFR 164.412(a) 45 CFR 164 Subpart D, Breach Notification
(a) If the statement is in writing and specifies the time for which a delay is required, delay such notification, notice, or posting for the time period specified by the official; or
SIE Qwen3 Embedding 4B ranked the answer first.
- plastic-labs / honcho Document (memory) retrieval should use hybrid search (semantic + full-text), not pure embedding #967
This causes systematic failures when retrieving memories containing precise numbers, proper nouns, and brand names
- arXiv:2405.20362 Stanford study: retrieval-based legal AI tools still gave false or unsupported answers to 17% to 33% of questions
Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools
“We demonstrate that the providers' claims are overstated.”
Better than OpenAI text-embedding‑3‑large for 53% less, level with Voyage 4 Large for 50% less
- Tested
- 6,200 questions from 8 public benchmarks: science, finance, legal, medical and programming
- Scored
- A relevant passage is the first result
- Prices
- Real-time list prices, re-read 11 Oct 2026
Embed the question and passages, then rank by cosine
import numpy as npfrom sie_sdk import SIEClientclient = SIEClient(api_key="sk-sie-…")query = "queryOur clinic's breach only affected 200 patients, when do we have to notify HHS about it?"documents = [ "document 1(b) Implementation specifications: Breaches involving 500 or more individuals. For breaches of unsecured protected···section contemporaneously with the notice required by § 164.404(a) and in the manner specified on the HHS Web site.", "document 2(c) Implementation specifications: Breaches involving less than 500 individuals. For breaches of unsecured protected···this section for breaches discovered during the preceding calendar year, in the manner specified on the HHS web site.", "document 3(a) Standard. For a breach of unsecured protected health information involving more than 500 residents of a State or jurisdiction, a covered entity shall, following the discovery of the breach as provided in § 164.404(a)(2), notify prominent media outlets serving the State or jurisdiction.",]model = "modelQwen/Qwen3-Embedding-4B"q = np.array(client.encode(model, [{"text": query}], is_query=True)[0]["dense"])docs = client.encode(model, [{"text": d} for d in documents])mat = np.array([v["dense"] for v in docs])scores = mat @ q / (np.linalg.norm(mat, axis=1) * np.linalg.norm(q)) # cosinefor i in np.argsort(scores)[::-1]: print(f"{scores[i]:.3f} {documents[i]}")import { unpackMessage } from '@superlinked/sie-sdk';
const query = "Our clinic's breach only affected 200 patients, when do we have to notify HHS about it?";
const documents = [
"(b) Implementation specifications: Breaches involving 500 or more individuals. For breaches of unsecured protected···section contemporaneously with the notice required by § 164.404(a) and in the manner specified on the HHS Web site.",
"(c) Implementation specifications: Breaches involving less than 500 individuals. For breaches of unsecured protected···this section for breaches discovered during the preceding calendar year, in the manner specified on the HHS web site.",
"(a) Standard. For a breach of unsecured protected health information involving more than 500 residents of a State or jurisdiction, a covered entity shall, following the discovery of the breach as provided in § 164.404(a)(2), notify prominent media outlets serving the State or jurisdiction.",
];
async function encode(texts: string[], isQuery = false): Promise<Float32Array[]> {
const response = await fetch("https://api.superlinked.com/v1/encode/Qwen%2FQwen3-Embedding-4B", {
method: 'POST',
signal: AbortSignal.timeout(30_000),
headers: {
Authorization: "Bearer sk-sie-…",
'Content-Type': 'application/json',
Accept: 'application/msgpack',
},
body: JSON.stringify({
items: texts.map((text) => ({ text })),
params: { output_types: ['dense'], ...(isQuery ? { options: { is_query: true } } : {}) },
}),
});
if (!response.ok) throw new Error(`SIE returned ${response.status}`);
const result = unpackMessage<{ items: { dense: { values: Float32Array } }[] }>(
new Uint8Array(await response.arrayBuffer()),
);
return result.items.map((item) => item.dense.values);
}
const [q] = await encode([query], true);
const docs = await encode(documents);
const cosine = (a: Float32Array, b: Float32Array) => {
const dot = a.reduce((s, x, i) => s + x * b[i]!, 0);
return dot / (Math.hypot(...a) * Math.hypot(...b));
};
const ranked = documents
.map((doc, i) => ({ doc, score: cosine(q!, docs[i]!) }))
.sort((a, b) => b.score - a.score);
console.log(ranked);# Encode the query with is_query, then the candidates; rank by cosine.
curl https://api.superlinked.com/v1/encode/Qwen%2FQwen3-Embedding-4B \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"text\":\"Our clinic's breach only affected 200 patients, when do we have to notify HHS about it?\"}],\"params\":{\"output_types\":[\"dense\"],\"options\":{\"is_query\":true}}}"
curl https://api.superlinked.com/v1/encode/Qwen%2FQwen3-Embedding-4B \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"text\":\"(b) Implementation specifications: Breaches involving 500 or more individuals. For breaches of unsecured protected···section contemporaneously with the notice required by § 164.404(a) and in the manner specified on the HHS Web site.\"},{\"text\":\"(c) Implementation specifications: Breaches involving less than 500 individuals. For breaches of unsecured protected···this section for breaches discovered during the preceding calendar year, in the manner specified on the HHS web site.\"},{\"text\":\"(a) Standard. For a breach of unsecured protected health information involving more than 500 residents of a State or jurisdiction, a covered entity shall, following the discovery of the breach as provided in § 164.404(a)(2), notify prominent media outlets serving the State or jurisdiction.\"}],\"params\":{\"output_types\":[\"dense\"]}}"Build the "Search" capability into my app using the Superlinked Inference Engine (SIE).
Context
- SIE is an OpenAI-style inference API. Python SDK: `from sie_sdk import SIEClient`; TypeScript: `@superlinked/sie-sdk`.
- Base URL: https://api.superlinked.com (or my regional endpoint). Auth: Bearer key from env `SIE_API_KEY` (never hard-code it).
- Model: Qwen/Qwen3-Embedding-4B (SIE primitive: /encode). Keep the model id configurable.
Task
- Input: a query string plus a list of candidate documents.
- Behaviour: return the candidates ranked by semantic similarity to the query, with a score per candidate
- Send two POST /v1/encode requests: one item {text: query} with params {output_types: ["dense"], options: {is_query: true}}, then all candidate documents with params {output_types: ["dense"]}. Rank every candidate by cosine similarity between its decoded dense vector and the query vector. In Python, use encode(..., is_query=True) only for the query call. In TypeScript, send those native HTTP bodies and decode MessagePack with the public unpackMessage export. Do not issue one request per candidate.
Deliverables
- A typed client wrapper, an application-level function for this task, error handling for timeouts/empty input, and unit tests with a stubbed client.
- Wire it into my existing stack (ask me which framework if unclear) and add a short usage example.- The rule for breaches under 500 people ranked first
Embed for 53% less than OpenAI text-embedding‑3‑large
Serverless API
We host the models; you call one API.
- No idle GPUs, pay for what you use
- SOC 2 Type 2, US or EU data residency
- $50 of credit to start, no card required
Self-hosted (Kubernetes)
SIE in your clusters, backed by our engineers.
- Data stays in your own cloud account
- Same models and API as Serverless
- Terraform to your cloud in minutes
Run locally
The open-source server on your own machine.
docker run --gpus all -p 8080:8080 -e SIE_BUNDLE=sglang-embedding ghcr.io/superlinked/sie-server:latest-cuda12-sglang