Semantic search on embeddings no vendor can retire
Open weights that rank as well as OpenAI's largest embedding model, so your index never has to be rebuilt because someone else changed theirs.
No credit card, or run it in your own cluster.
How many days does an airline have to refund a ticket I paid for with a debit card?
- 1 14 CFR 260.2
Prompt refund means refunds made within 7 business days after the earliest date the refund was requested … within 20 calendar days after the earliest date the refund was requested as set forth in § 260.6(a)(2) for cash, check, debit card, or other forms of purchases.
- 2 14 CFR 260.10
the refund must be issued promptly in the original form of payment … such as a check, credit card, debit card, cash, or airline miles
- 3 14 CFR 260.6(a)(1)
A covered carrier that is the merchant of record must provide a full and prompt refund of the airfare, including any taxes and ancillary fees
Find the passage that answers the question, not the ten that sound like it
import numpy as npfrom sie_sdk import SIEClientclient = SIEClient( api_key="sk-sie-…", base_url="https://api.superlinked.com",)query = "queryWhat happens if a monthly depositor racks up $100,000 of payroll tax in a single day?"documents = [ "document 1If you accumulate $100,000 or more in taxes on any day during a monthly or semiweekly deposit period (see Deposit period , earlier in this section), you must deposit the tax by the next business day, whether you’re a monthly or semiweekly schedule depositor. The $100,000 tax liability threshold requiring a next-day deposit is determined before you consider any reduction of your liability for nonrefundable credits.", "document 2For purposes of the $100,000 rule, don’t continue accumulating a tax liability after the end of a deposit period. For example, if a semiweekly schedule depositor has accumulated a liability of $95,000 on a Tuesday (of a Saturday-through-Tuesday deposit period) and accumulated a $10,000 liability on Wednesday, the $100,000 next-day deposit rule doesn’t apply because the $10,000 is accumulated in the next deposit period. Thus, $95,000 must be deposited by Friday and $10,000 must be deposited by the following Wednesday.", "document 3If you’re a monthly schedule depositor and accumulate a $100,000 tax liability on any day during the deposit period, you become a semiweekly schedule depositor on the next day and remain so for at least the rest of the calendar year and for the following calendar year. Example.", "document 4However, once you accumulate at least $100,000 in a deposit period, stop accumulating at the end of that day and begin to accumulate anew on the next day. For example, Fir Co. is a semiweekly schedule depositor. On Monday, Fir Co. accumulates taxes of $110,000 and must deposit this amount on Tuesday, the next business day. On Tuesday, Fir Co. accumulates additional taxes of $30,000. Because the $30,000 isn’t added to the previous $110,000 and is less than $100,000, Fir Co. must deposit the $30,000 by Friday (following the semiweekly deposit schedule).",]items = [{"text": query}, *({"text": d} for d in documents)]vecs = client.encode("modelSnowflake/snowflake-arctic-embed-l-v2.0", items)mat = np.array([v["dense"] for v in vecs])mat = mat / np.linalg.norm(mat, axis=1, keepdims=True)scores = mat[1:] @ mat[0] # cosine similarity to the queryfor i in np.argsort(scores)[::-1]: print(f"{scores[i]:.3f} {documents[i]}")import { SIEClient } from '@superlinked/sie-sdk';
const client = new SIEClient('https://api.superlinked.com', {
apiKey: 'sk-sie-…',
});
const query = "What happens if a monthly depositor racks up $100,000 of payroll tax in a single day?";
const documents = [
"If you accumulate $100,000 or more in taxes on any day during a monthly or semiweekly deposit period (see Deposit period , earlier in this section), you must deposit the tax by the next business day, whether you’re a monthly or semiweekly schedule depositor. The $100,000 tax liability threshold requiring a next-day deposit is determined before you consider any reduction of your liability for nonrefundable credits.",
"For purposes of the $100,000 rule, don’t continue accumulating a tax liability after the end of a deposit period. For example, if a semiweekly schedule depositor has accumulated a liability of $95,000 on a Tuesday (of a Saturday-through-Tuesday deposit period) and accumulated a $10,000 liability on Wednesday, the $100,000 next-day deposit rule doesn’t apply because the $10,000 is accumulated in the next deposit period. Thus, $95,000 must be deposited by Friday and $10,000 must be deposited by the following Wednesday.",
"If you’re a monthly schedule depositor and accumulate a $100,000 tax liability on any day during the deposit period, you become a semiweekly schedule depositor on the next day and remain so for at least the rest of the calendar year and for the following calendar year. Example.",
"However, once you accumulate at least $100,000 in a deposit period, stop accumulating at the end of that day and begin to accumulate anew on the next day. For example, Fir Co. is a semiweekly schedule depositor. On Monday, Fir Co. accumulates taxes of $110,000 and must deposit this amount on Tuesday, the next business day. On Tuesday, Fir Co. accumulates additional taxes of $30,000. Because the $30,000 isn’t added to the previous $110,000 and is less than $100,000, Fir Co. must deposit the $30,000 by Friday (following the semiweekly deposit schedule).",
];
const items = [{ text: query }, ...documents.map((text) => ({ text }))];
const vecs = await client.encode('Snowflake/snowflake-arctic-embed-l-v2.0', items);
const [q, ...d] = vecs.map((v) => v.dense);
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!, d[i]!) }))
.sort((a, b) => b.score - a.score);
console.log(ranked);# Encode the query + candidates in one batch, then rank by cosine.
curl https://api.superlinked.com/v1/encode/Snowflake%2Fsnowflake-arctic-embed-l-v2.0 \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"text\":\"What happens if a monthly depositor racks up \$100,000 of payroll tax in a single day?\"},{\"text\":\"If you accumulate \$100,000 or more in taxes on any day during a monthly or semiweekly deposit period (see Deposit period , earlier in this section), you must deposit the tax by the next business day, whether you’re a monthly or semiweekly schedule depositor. The \$100,000 tax liability threshold requiring a next-day deposit is determined before you consider any reduction of your liability for nonrefundable credits.\"},{\"text\":\"For purposes of the \$100,000 rule, don’t continue accumulating a tax liability after the end of a deposit period. For example, if a semiweekly schedule depositor has accumulated a liability of \$95,000 on a Tuesday (of a Saturday-through-Tuesday deposit period) and accumulated a \$10,000 liability on Wednesday, the \$100,000 next-day deposit rule doesn’t apply because the \$10,000 is accumulated in the next deposit period. Thus, \$95,000 must be deposited by Friday and \$10,000 must be deposited by the following Wednesday.\"},{\"text\":\"If you’re a monthly schedule depositor and accumulate a \$100,000 tax liability on any day during the deposit period, you become a semiweekly schedule depositor on the next day and remain so for at least the rest of the calendar year and for the following calendar year. Example.\"},{\"text\":\"However, once you accumulate at least \$100,000 in a deposit period, stop accumulating at the end of that day and begin to accumulate anew on the next day. For example, Fir Co. is a semiweekly schedule depositor. On Monday, Fir Co. accumulates taxes of \$110,000 and must deposit this amount on Tuesday, the next business day. On Tuesday, Fir Co. accumulates additional taxes of \$30,000. Because the \$30,000 isn’t added to the previous \$110,000 and is less than \$100,000, Fir Co. must deposit the \$30,000 by Friday (following the semiweekly deposit schedule).\"}],\"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: Snowflake/snowflake-arctic-embed-l-v2.0 (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
- Encode the query and candidates in one batched /encode call, then rank by cosine similarity in the client. Do not call the API 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.- Ranks by meaning, not keyword overlap
- Scores every candidate against your query
Questions in plain words find the rule or doc that answers them
- 9 of 12 questions got the answering passage ranked first
- 12 of 12 answers ranked in the top 3 of 253 passages
Matched a trucker's question to the FMCSA driving limit
Question
How many hours can a truck driver drive in one shift?
Ranked 1st of 253
drive a property-carrying commercial motor vehicle … A driver may drive a total of 11 hours during the period specified in paragraph (a)(2) of this section.
Matched a table-locking question to the Postgres warning
Question
Can I run VACUUM FULL while the app keeps reading and writing that table?
Ranked 1st of 253
VACUUM FULL requires an ACCESS EXCLUSIVE lock on the table it is working on, and therefore cannot be done in parallel with other use of the table.
Matched a login question to NIST's password length rule
Question
How long must a password be if it's the only thing used to log in?
Ranked 1st of 253
Verifiers and CSPs SHALL require passwords that are used as a single-factor authentication mechanism to be a minimum of 15 characters in length.
Deploy your way
Managed Cloud
Full compute toolkit for your agents with zero ops.
- No idle GPUs, pay for what you use
- Fits your stack: SDK, API, CLI, MCP
- Zero lock-in, self-host the same stack
- SOC 2 Type 2, US or EU data residency
no credit card required
Self-host with K8s
Easy & scalable deployment in your own cloud.
- Terraform to your cloud in minutes
- Apache-2.0, same engine as Cloud
- Scales to zero, no bill between jobs
- Per-tenant pools, no noisy neighbors
Deploy SIE to our AWS account with the superlinked/sie/aws Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our GCP project with the superlinked/sie/google Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our Azure AKS cluster via helm install. Requirements: superlinked.com/docs/deployment Run locally
Run the same models on your own machine.
- Runs on NVIDIA GPU or Apple Silicon
- One command, no Docker or cluster
- All 100+ Cloud models, fully offline
- Same SDK and IDs, no code changes
pip install "sie-server[local]" && sie-server servepip install "sie-server[local]" && sie-server serve --device cuda $260 a month, the same as OpenAI, with the model yours to keep
- Cost
- Two billion tokens a month is $260 on either, priced at list on both sides. The difference is what you own afterwards.
- Risk
- Open weights and a pinned model ID. Leave, and you take the model with you; the index keeps working.
- Engineering time
- No re-embedding project when a vendor retires the model your index was built with.