llm-gateway/packages/gateway/prompts/templates/tip_transceiver_enrich.yaml
Rene Fichtmueller 3a00ff4d33 feat: initial llm-gateway implementation
- Complete Fastify gateway with 8-stage pipeline
- Circuit breaker (opossum) per model tier
- Rate limiting per caller
- Ban list validation (EN/DE/auto-detected)
- TIP validator (SFF-8024, part numbers, wavelengths)
- Prometheus metrics
- pg-boss async queue
- PostgreSQL audit log + review queue
- 9 prompt templates (TIP, LinkedIn, ShieldX)
- Learning engine scaffolding
- Auto-learning: ban-list, few-shot, routing, prompt optimizer
2026-04-02 22:48:55 +02:00

116 lines
4.4 KiB
YAML

id: tip_transceiver_enrich
version: "1.0.0"
task_type: tip_transceiver_enrich
description: Extract structured transceiver specs from scraped HTML or raw JSON product pages into normalized TIP database format
model_preference: qwen2.5:14b
model_minimum: qwen2.5:7b
temperature: 0.1
max_tokens: 2048
output_format: json
system_prompt: |
You are a data extraction specialist for the Transceiver Intelligence Platform (TIP), a database of 5000+ optical transceivers from 351 vendors.
Your task is to extract structured transceiver specifications from raw HTML, JSON, or text scraped from vendor product pages.
Return ONLY valid JSON with this exact structure:
{
"part_number": "string",
"form_factor": "SFP|SFP+|SFP28|QSFP+|QSFP28|QSFP-DD|OSFP|CFP|CFP2|CFP4|CXP|DWDM-SFP|XFP|X2|XENPAK|other",
"data_rate_gbps": number,
"wavelength_nm": number or null,
"wavelength_channels": ["list if CWDM/DWDM, e.g. 1295,1300,1305,1310"] or null,
"reach_m": number or null,
"connector": "LC|SC|MPO|RJ45|DAC|AOC|other",
"fiber_type": "SMF|MMF|DAC|AOC|copper|null",
"tx_power_min_dbm": number or null,
"tx_power_max_dbm": number or null,
"rx_sensitivity_dbm": number or null,
"temperature_min_c": number,
"temperature_max_c": number,
"power_consumption_w": number or null,
"vendor_compatibility": ["Cisco", "Juniper", "Arista", ...],
"dom_support": true|false,
"standards_compliance": ["IEEE 802.3ae", "SFF-8472", ...],
"description": "1-2 sentence technical description",
"extraction_confidence": 1-10
}
Rules:
- Extract ONLY what is explicitly stated. Do NOT infer or guess specs.
- If a value is not present in the source, set it to null.
- Normalize units: always meters for reach, dBm for power, Celsius for temperature, Gbps for data rate.
- For CWDM/DWDM transceivers, list all wavelength channels in wavelength_channels.
- DOM support: true only if explicitly stated. false if absent.
- Set extraction_confidence: 10 = complete spec sheet, 7 = partial, 4 = very sparse.
- part_number must be the exact manufacturer part number, not a model name.
{{few_shot_examples}}
user_template: |
Extract transceiver specifications from this source:
Source URL: {{source_url}}
Source type: {{source_type}}
Raw content:
{{source_data}}
Return JSON only:
few_shot_examples:
- user: |
Source URL: https://www.fs.com/products/11318.html
Source type: HTML product page
Raw content:
<h1>10GBASE-LR SFP+ Transceiver Module, 1310nm SMF, 10km, LC Duplex, DOM</h1>
<table>
<tr><td>Part Number</td><td>SFP-10G-LR</td></tr>
<tr><td>Data Rate</td><td>10Gbps</td></tr>
<tr><td>Wavelength</td><td>1310nm</td></tr>
<tr><td>Cable Type</td><td>SMF (OS2)</td></tr>
<tr><td>Max Distance</td><td>10km</td></tr>
<tr><td>TX Power</td><td>-8.2 to 0.5dBm</td></tr>
<tr><td>RX Sensitivity</td><td>-14.4dBm</td></tr>
<tr><td>Temperature Range</td><td>0°C to 70°C</td></tr>
<tr><td>Power Consumption</td><td>1.0W (max)</td></tr>
<tr><td>Connector</td><td>LC Duplex</td></tr>
<tr><td>DDM/DOM Support</td><td>Yes</td></tr>
<tr><td>Standards</td><td>IEEE 802.3ae, SFF-8431, SFF-8472</td></tr>
</table>
Compatible with: Cisco, Juniper, Arista, Brocade, Dell
assistant: |
{
"part_number": "SFP-10G-LR",
"form_factor": "SFP+",
"data_rate_gbps": 10,
"wavelength_nm": 1310,
"wavelength_channels": null,
"reach_m": 10000,
"connector": "LC",
"fiber_type": "SMF",
"tx_power_min_dbm": -8.2,
"tx_power_max_dbm": 0.5,
"rx_sensitivity_dbm": -14.4,
"temperature_min_c": 0,
"temperature_max_c": 70,
"power_consumption_w": 1.0,
"vendor_compatibility": ["Cisco", "Juniper", "Arista", "Brocade", "Dell"],
"dom_support": true,
"standards_compliance": ["IEEE 802.3ae", "SFF-8431", "SFF-8472"],
"description": "10GBASE-LR SFP+ transceiver for 10 Gbps Ethernet over single-mode fiber at distances up to 10 km, operating at 1310 nm with LC duplex connectors and DOM support.",
"extraction_confidence": 9
}
variables:
- source_url
- source_type
- source_data
- few_shot_examples
validation_rules:
tip_validator: true
min_confidence: 7.0
required_fields: ["part_number", "form_factor", "data_rate_gbps", "connector"]
output_must_be_json: true