Build manufacturing agents with open source models
Superlinked gives your agent one API to read manuals, match sensor events to maintenance records, extract equipment details and return cited findings.
Your reliability agent
Join sensor readings, images and technical findings.
Your operations context
Sensor history, inspection records, images and equipment guidance.
from sie_sdk import SIEClientclient = SIEClient( api_key="sk-sie-…", base_url="https://api.superlinked.com",)# Parse a document → clean markdown, tables and layout kept.result = client.extract( "modeldocling", {"document": filePDFntsb-east-p-ohio-illustrated-digest.pdfbrowse},)print(result["data"]["markdown"])document_bytes=$(base64 < 'ntsb-east-p-ohio-illustrated-digest.pdf' | tr -d '\n')
curl https://api.superlinked.com/v1/extract/docling \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"document\":{\"data\":\"$document_bytes\",\"format\":\"pdf\"}}]}"Build the "Doc to Markdown" 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: docling (SIE primitive: /extract). Keep the model id configurable.
Task
- Input: an uploaded document (PDF / Office / scan).
- Behaviour: return clean markdown for the document, preserving tables and reading order
- Call the selected SIE primitive once per request and map the response into your domain type.
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.
from sie_sdk import SIEClientclient = SIEClient( api_key="sk-sie-…", base_url="https://api.superlinked.com",)result = client.extract( "modelfastino/gliner2-large-v1", {"text": "textAt 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted."}, labels=[ "entity typelocation", "entity typeevent time", "entity typebearing", "entity typedegrees above ambient", "entity typealert status", "entity typealert recipient", "entity typecamera observation", ],)for span in result["entities"]: print(span["label"], span["text"])import { SIEClient } from '@superlinked/sie-sdk';
const client = new SIEClient('https://api.superlinked.com', {
apiKey: 'sk-sie-…',
});
const result = await client.extract(
'fastino/gliner2-large-v1',
{ text: "At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted." },
{ labels: ["location","event time","bearing","degrees above ambient","alert status","alert recipient","camera observation"] },
);
console.log(result.entities);curl https://api.superlinked.com/v1/extract/fastino%2Fgliner2-large-v1 \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"text\":\"At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.\"}],\"params\":{\"labels\":[\"location\",\"event time\",\"bearing\",\"degrees above ambient\",\"alert status\",\"alert recipient\",\"camera observation\"]}}"Build the "Named entities" 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: fastino/gliner2-large-v1 (SIE primitive: /extract). Keep the model id configurable.
Task
- Input: a block of text.
- Behaviour: return the named entities found in the text with their types
- Call the selected SIE primitive once per request and map the response into your domain type.
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.import numpy as npfrom sie_sdk import SIEClientclient = SIEClient( api_key="sk-sie-…", base_url="https://api.superlinked.com",)query = "queryHow did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?"documents = [ "document 1## When the bearing failed", "document 2The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.", "document 3A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)", "document 4Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.", "document 5Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.", "document 6The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.", "document 7Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.", "document 8## The undetected hot bearing burns off", "document 91. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.", "document 102. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.", "document 11## On fire but not 'critical'", "document 12At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.", "document 13At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.", "document 14About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.", "document 15Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.", "document 16But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.", "document 17The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.", "document 18In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '",]items = [{"text": query}, *({"text": d} for d in documents)]vecs = client.encode("modelQwen/Qwen3-Embedding-4B", 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 = "How did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?";
const documents = [
"## When the bearing failed",
"The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.",
"A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)",
"Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.",
"Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.",
"The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.",
"Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.",
"## The undetected hot bearing burns off",
"1. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.",
"2. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.",
"## On fire but not 'critical'",
"At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.",
"At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.",
"About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.",
"Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.",
"But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.",
"The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.",
"In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '",
];
const items = [{ text: query }, ...documents.map((text) => ({ text }))];
const vecs = await client.encode('Qwen/Qwen3-Embedding-4B', 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/Qwen%2FQwen3-Embedding-4B \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"items\":[{\"text\":\"How did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?\"},{\"text\":\"## When the bearing failed\"},{\"text\":\"The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.\"},{\"text\":\"A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)\"},{\"text\":\"Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.\"},{\"text\":\"Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.\"},{\"text\":\"The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.\"},{\"text\":\"Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.\"},{\"text\":\"## The undetected hot bearing burns off\"},{\"text\":\"1. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.\"},{\"text\":\"2. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.\"},{\"text\":\"## On fire but not 'critical'\"},{\"text\":\"At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.\"},{\"text\":\"At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.\"},{\"text\":\"About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.\"},{\"text\":\"Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.\"},{\"text\":\"But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.\"},{\"text\":\"The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.\"},{\"text\":\"In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '\"}],\"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
- 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.from sie_sdk import SIEClientclient = SIEClient( api_key="sk-sie-…", base_url="https://api.superlinked.com",)query = "queryHow did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?"documents = [ "document 1## When the bearing failed", "document 2The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.", "document 3A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)", "document 4Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.", "document 5Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.", "document 6The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.", "document 7Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.", "document 8## The undetected hot bearing burns off", "document 91. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.", "document 102. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.", "document 11## On fire but not 'critical'", "document 12At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.", "document 13At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.", "document 14About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.", "document 15Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.", "document 16But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.", "document 17The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.", "document 18In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '",]items = [{"id": str(i), "text": d} for i, d in enumerate(documents)]ranked = client.score("modelQwen/Qwen3-Reranker-4B", {"text": query}, items)for r in ranked["scores"]: print(r["score"], documents[int(r["item_id"])])import { SIEClient } from '@superlinked/sie-sdk';
const client = new SIEClient('https://api.superlinked.com', {
apiKey: 'sk-sie-…',
});
const query = "How did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?";
const documents = [
"## When the bearing failed",
"The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.",
"A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)",
"Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.",
"Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.",
"The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.",
"Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.",
"## The undetected hot bearing burns off",
"1. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.",
"2. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.",
"## On fire but not 'critical'",
"At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.",
"At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.",
"About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.",
"Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.",
"But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.",
"The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.",
"In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '",
];
const items = documents.map((text, i) => ({ id: String(i), text }));
const ranked = await client.score('Qwen/Qwen3-Reranker-4B', { text: query }, items);
console.log(ranked.scores.map(({ itemId, score }) => ({ document: documents[Number(itemId)], score })));curl https://api.superlinked.com/v1/score/Qwen%2FQwen3-Reranker-4B \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"query\":{\"text\":\"How did the L1 bearing temperature and alert status change across Sebring, Salem, and East P., Ohio, and what did the NTSB report happened next?\"},\"items\":[{\"id\":\"0\",\"text\":\"## When the bearing failed\"},{\"id\":\"1\",\"text\":\"The East P., Ohio derailment began when an overheated bearing burned off the accident hopper car. Here is what you need to know about bearings, hot bearing detectors (HBDs), and what happened when the accident hopper car passed over the final three HBDs of the journey in the Ohio towns of Sebring, Salem, and East P., Ohio.\"},{\"id\":\"2\",\"text\":\"A bearing (A) fits around the end of a railcar axle. The part of the axle extending into the bearing is called the journal (B) . The bearing's roller components allow the journal to turn within the bearing with little friction. However, when a bearing fails, the resulting friction can be catastrophic. In East P., Ohio, the journal's cylindrical shape was worn down to a cone (C) . ( See box below .)\"},{\"id\":\"3\",\"text\":\"Overheated wheel bearings are the most common mechanical or electrical cause of rail accidents. Because overheated bearings are so dangerous, railroad tracks are equipped with HBDs, devices located along the track that measure the bearing's temperature relative to the ambient temperature (D) . Ambient temperature means the temperature outside. For example, the ambient temperature at Sebring, Ohio, was measured by a thermometer at the nearby signal bungalow.\"},{\"id\":\"4\",\"text\":\"Bearings can go from below-alarm temperature to seized in less than a minute. In this accident, however, fire was first photographed near the L1 bearing by a surveillance camera in Salem, Ohio (right), 39 minutes before the train derailed in East P., Ohio.\"},{\"id\":\"5\",\"text\":\"The bearing that caused the accident hopper car to derail was its L1 bearing, which is on the right side of the car, facing the direction of travel.\"},{\"id\":\"6\",\"text\":\"Railcar axles are numbered starting from the end of the railcar with the brake wheel (the 'B end'). When the B end is in the front of the car (when it faces the direction of travel) the 'left-side' wheels and bearings are on the right.\"},{\"id\":\"7\",\"text\":\"## The undetected hot bearing burns off\"},{\"id\":\"8\",\"text\":\"1. HBDs (D) measure the temperature on the outside of the bearing cup. When a bearing heats up inside, it may take 30-60 minutes for the HBD to sense it from the outside. The HBD in Salem measured a temperature of only 103° above ambient, despite the fact that the bearing was on fire. So, it generated an alert to the Wayside Help Desk, not an alarm to the train crew.\"},{\"id\":\"9\",\"text\":\"2. By the time the alarm sounded at the East P., Ohio HBD, the journal was worn down to a cone, and it was too late. The hopper car and 37 others derailed as the train's emergency braking system activated.\"},{\"id\":\"10\",\"text\":\"## On fire but not 'critical'\"},{\"id\":\"11\",\"text\":\"At 7:37 p.m. , at the Sebring HBD, the reading for the L1 bearing was only 38°F above ambient -not high enough to trigger an alert. The R1 bearing measured 20°F above ambient. But the L1 bearing was hotter.\"},{\"id\":\"12\",\"text\":\"At 8:13 p.m. , at the Salem HBD, the reading for the L1 bearing was 103°F above ambient . This reading was high enough to trigger a noncritical alert to the Wayside Help Desk ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearing ( right ). Surveillance cameras in Sebring also captured images of the train, and no anomalies were noted.\"},{\"id\":\"13\",\"text\":\"About 8:52 p.m ., the train went over the East P., Ohio HBD. Less than a minute later, the HBD recorded a temperature of 253°F above ambient at the L1 bearing; bearing R1 remained at 20°F above ambient. The HBD immediately transmitted a critical alarm, which was broadcast in the locomotive cab.\"},{\"id\":\"14\",\"text\":\"Under NS rules, if a train's crew hears a critical alarm, they must stop the train right away and inspect the wheelset that triggered the alarm. The engineer began to slow the train before 8:54 p.m.\"},{\"id\":\"15\",\"text\":\"But it was too late; the hopper car and 37 others derailed as the train's emergency braking system activated.\"},{\"id\":\"16\",\"text\":\"The Wayside Help Desk in Atlanta, Georgia, monitors alerts from NS's HBDs. Critical alarms broadcast straight to the train crew. For noncritical alerts, the analyst monitors the train over HBDs it crosses later, paying attention to temperature trends. The single analyst on duty did not notice the Salem noncritical alert, as he dealt with higher-priority alerts. But if he did notice the alert, that would not have prevented the derailment. The analyst said that if he had seen the Salem HBD alert in real time, he would have followed NS rules and watched for alerts from HBDs it went over later. The next HBD the accident train went over was in East P., Ohio.\"},{\"id\":\"17\",\"text\":\"In the East P., Ohio derailment, the alarm was received by the lead locomotive radio and broadcast over the in-cab speakers: ' Critical alarm, critical alarm, critical alarm. Norfolk Southern milepost 49.8, track 1 hotbox, axle 101, south rail. '\"}]}"Build the "Rerank" 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-Reranker-4B (SIE primitive: /score). Keep the model id configurable.
Task
- Input: a query string plus a list of candidate documents.
- Behaviour: reorder the candidates by true relevance to the query using the cross-encoder
- Call the selected SIE primitive once per request and map the response into your domain type.
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.On fire but not 'critical'
Sebring · 7:37 p.m.
The L1 bearing measured 38°F above ambient, below the alert threshold.
Salem · 8:13 p.m.
The reading reached 103°F above ambient. A surveillance camera showed fire near the bearing.
East P., Ohio · 8:52 p.m.
The detector recorded 253°F above ambient and transmitted a critical alarm to the locomotive cab.
- Extracts clean, agent-ready markdown
- Keeps tables and layout intact
At 8:13 p.m.event time , at the Salem HBDlocation, the reading for the L1 bearingbearing was 103°Fdegrees above ambient above ambient . This reading was high enough to trigger a noncriticalalert status alert to the Wayside Help Deskalert recipient ( see box ), but not to the crew. A surveillance camera picture from Salem showed fire near the bearingcamera observation ( right ). Surveillance cameras in Sebringlocation also captured images of the train, and no anomalies were noted.
- Pulls typed entities straight from raw text
- Ranks by meaning, not keyword overlap
- Scores every candidate against your query
- Reorders by true relevance
- Scored by meaning, keyword-free
Compare models for this task
Our example agent reconstructs the detector sequence from the NTSB record
View on GitHubDetector chronology
- Sebring · 38°F Below alert threshold
- Salem · 103°F Noncritical · Help Desk
- East P., Ohio · 253°F Critical · locomotive cab
Five model stages collect and rank the evidence
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