llm-gateway/packages/gateway/prompts/templates/pc_peer_recommendation.yaml
Rene Fichtmueller ac33476666 feat: add 55 prompt templates + ShieldX/LinkedIn routing rules + ban lists in Gitea
Templates (55 total, exceeds 49 target):
- TIP: transceiver_enrich, datasheet_extract, compatibility_parse, blog_generator,
  faq_answer, hype_cycle_narrative, price_anomaly, vendor_classify, product_description
- EO Global Pulse: business_card_ocr, voice_to_crm, event_prep_brief, attendee_enrich,
  meeting_suggest, lead_qualify, debrief_generate, ticket_summarize
- SwitchBlade: root_cause, alert_narrative, cve_remediation, csrd_narrative,
  transceiver_advisor, bandwidth_report, ticket_draft, firmware_assess, topology_explain
- PeerCortex: as_narrative, health_summary, rpki_explain, anomaly_hypothesis,
  peer_recommendation, incident_brief
- NOGnet: cfp_evaluate, cfp_feedback, topic_gap_analysis, meeting_match, speaker_enrich,
  sponsor_pitch, event_debrief, agenda_summary, session_intro
- ShieldX: threat_classify, pattern_describe, healing_recommend, compliance_report, false_positive
- Content: linkedin_post_de, linkedin_post_en, newsletter_dispatch_de, email_draft_de
- Internal: ban_detect, prompt_improve
- Routing rules: +55 entries for all template-based task types
- Ban lists: en.csv, de.csv, auto.csv created in Gitea (llm-banlists repo)
2026-04-02 23:14:30 +02:00

142 lines
6.7 KiB
YAML

id: pc_peer_recommendation
version: "1.0.0"
task_type: pc_peer_recommendation
description: Generate peering recommendations for an AS based on their profile, IX memberships, and traffic patterns
model_preference: qwen2.5:7b
model_minimum: qwen2.5:7b
temperature: 0.3
max_tokens: 1500
output_format: json
system_prompt: |
You are the peering recommendation engine for PeerCortex, a network intelligence platform.
Generate peering recommendations for an AS based on their network profile and PeeringDB data.
Return ONLY valid JSON:
{
"asn": number,
"recommendation_context": "string — brief description of the requesting AS",
"recommended_peers": [
{
"asn": number,
"name": "string",
"reason": "string — specific reason why this peering makes sense",
"ix_where_to_peer": ["string — IXP names where both are present"],
"policy": "open|selective|restrictive",
"traffic_benefit": "string — expected traffic benefit",
"priority": "high|medium|low"
}
],
"ix_recommendations": [
{
"ix_name": "string",
"ix_asn": number or null,
"reason": "string — why joining this IX makes sense",
"notable_members": ["string — key ASNs at this IX relevant to the requesting AS"]
}
],
"peering_strategy_notes": "string — broader observations about peering strategy"
}
Peering recommendation logic:
- Recommend peers present at the same IXPs as the requesting AS
- Prioritize: content providers, CDNs, large eyeball networks, and regional peers
- Check peering policy: only recommend open or selective-but-reachable peers
- Consider traffic benefit: peering with a CDN reduces transit costs (they send traffic TO you)
- IX recommendations: look for IXPs where the AS's existing peers are concentrated
- Do NOT recommend peering with transit providers (they already provide that via customer-provider relationship)
user_template: |
Requesting ASN: {{asn}}
AS Name: {{as_name}}
Network type: {{network_type}}
Current IX memberships: {{ix_memberships}}
Peering policy: {{peering_policy}}
PeeringDB context for potential peers:
{{potential_peers}}
Generate peering recommendations:
few_shot_examples:
- user: |
Requesting ASN: 12345
AS Name: RegionalNet
Network type: ISP (regional German ISP, ~50K customers)
Current IX memberships: [DE-CIX Frankfurt]
Peering policy: Open
PeeringDB context for potential peers:
- AS20940 (Akamai): present at DE-CIX Frankfurt, open peering, major CDN
- AS13335 (Cloudflare): present at DE-CIX Frankfurt, open peering, CDN
- AS6185 (Apple): present at DE-CIX Frankfurt, selective peering
- AS2906 (Netflix): present at DE-CIX Frankfurt, open to ISPs with >1Gbps
- AS1257 (Tele2): present at DE-CIX Frankfurt, open peering, Swedish ISP
- AS24940 (Hetzner): present at DE-CIX Frankfurt, open peering, hosting
- AMS-IX: major Amsterdam IX, Cloudflare/Akamai/Netflix all present
assistant: |
{
"asn": 12345,
"recommendation_context": "RegionalNet is a regional German ISP with open peering policy and current DE-CIX Frankfurt membership. As an eyeball network (50K customers), they benefit most from peering with content providers who push traffic toward end users.",
"recommended_peers": [
{
"asn": 13335,
"name": "Cloudflare",
"reason": "Cloudflare serves enormous amounts of web, DNS, and CDN traffic. As a regional ISP, a large portion of your customer traffic destined for Cloudflare-served content will be served locally via DE-CIX instead of through transit. Open peering policy means no negotiation needed.",
"ix_where_to_peer": ["DE-CIX Frankfurt"],
"policy": "open",
"traffic_benefit": "Significant inbound traffic reduction from transit. Cloudflare serves 20%+ of web traffic for most eyeball ISPs.",
"priority": "high"
},
{
"asn": 20940,
"name": "Akamai Technologies",
"reason": "Akamai delivers streaming video, software downloads, and enterprise content. High traffic volumes from customer downloads. Open peering at DE-CIX Frankfurt.",
"ix_where_to_peer": ["DE-CIX Frankfurt"],
"policy": "open",
"traffic_benefit": "Reduces transit load for streaming and large file downloads. Typically one of the top 3 traffic sources for eyeball ISPs.",
"priority": "high"
},
{
"asn": 2906,
"name": "Netflix",
"reason": "Netflix accounts for 10-15% of evening peak traffic for residential ISPs. Peering directly eliminates transit cost for this traffic. Requires >1Gbps minimum commitment.",
"ix_where_to_peer": ["DE-CIX Frankfurt"],
"policy": "open",
"traffic_benefit": "Eliminates transit cost for Netflix streaming traffic during peak hours. Highly recommended for residential ISPs.",
"priority": "high"
},
{
"asn": 24940,
"name": "Hetzner Online",
"reason": "Large German hosting provider — your customers likely access Hetzner-hosted services. Peering reduces latency for Germany-hosted services and eliminates transit for this traffic.",
"ix_where_to_peer": ["DE-CIX Frankfurt"],
"policy": "open",
"traffic_benefit": "Reduces transit cost for German-hosted services. Particularly valuable for B2B customers.",
"priority": "medium"
}
],
"ix_recommendations": [
{
"ix_name": "AMS-IX",
"ix_asn": 1200,
"reason": "Amsterdam Internet Exchange provides access to a broader set of content providers and European networks. With Frankfurt coverage, adding Amsterdam would provide European geographic redundancy and access to Benelux-based networks not at DE-CIX.",
"notable_members": ["Cloudflare", "Akamai", "Netflix", "Meta", "Microsoft"]
}
],
"peering_strategy_notes": "RegionalNet should prioritize CDN and content peering immediately — the transit cost savings from peering with Cloudflare, Akamai, and Netflix will likely exceed the DE-CIX port cost within months. Apple's selective policy requires an application but is worth pursuing for iOS/macOS update traffic. Tele2 peering has limited traffic benefit for a German residential ISP."
}
variables:
- asn
- as_name
- network_type
- ix_memberships
- peering_policy
- potential_peers
- few_shot_examples
validation_rules:
output_must_be_json: true
required_fields: ["recommended_peers", "peering_strategy_notes"]