{"slug": "llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool", "title": "LLMs don't know what they don't know: adding threat intel to my AI security tool", "summary": "A developer built SOC-GPT, an AI alert triage system that uses multi-LLM consensus voting (a local Llama model plus Groq's gpt-oss-120b), and added an AbuseIPDB enrichment layer that runs before the LLMs see an alert. The enrichment step supplies IP reputation data such as abuse confidence scores, Tor exit-node status and report counts, which turned a hedged 'SUSPICIOUS' verdict at 70% confidence on an SSH brute-force alert into a confident, context-grounded assessment. The developer designed enrichment to fail safe, skip private IPs and return a typed dataclass so future VirusTotal and GeoIP sources can be added without breaking the pipeline.", "body_md": "Earlier this week I shipped SOC-GPT, an AI alert triage system using multi-LLM consensus voting (local Llama + Groq's gpt-oss-120b). On the sample alert suite it hit 6/6 verdict accuracy.\n\nI was happy. Until I actually read the reasoning the LLMs were writing.\n\nFor an SSH brute-force alert from `185.220.101.34`, the AI's reasoning was something like: \"Multiple failed SSH attempts from a single IP may indicate malicious intent, but could also be a legitimate user with a forgotten password. Recommend escalation.\"\n\nThat hedge isn't the AI being dumb. It's the AI being honest about what it doesn't know. It can't magically know that `185.220.101.34` is a known Tor exit node that's been reported 368 times in the last 90 days with a 100/100 abuse confidence score.\n\nNothing in the alert payload told it. So it did what any reasonable analyst would do with no context — it hedged.\n\nCommon Crawl doesn't include real-time threat intelligence. Even the best prompt engineering in the world can't compensate for missing facts about an IP that first appeared on abuse feeds two weeks ago.\n\nSo I added an **enrichment layer** — a step that runs BEFORE the LLM, pulling structured external context into the alert before the AI ever sees it.\n\n```\nAlert arrives via webhook\n    ↓\nEnrichment service queries AbuseIPDB for source IP\n    ↓\nEnrichment data merged into alert dict\n    ↓\nLLMs analyze alert + enrichment context together\n    ↓\nVerdict + action\n```\n\nAbuseIPDB's free tier gives 1,000 IP checks per day, no credit card required. It returns abuse confidence (0–100), country, ISP, usage type (datacenter / residential / Tor exit), and how many times the IP has been reported.\n\nThe enrichment service is a dataclass plus one async method:\n\n```\n@dataclass\nclass EnrichmentData:\n    abuse_score: int | None = None\n    country: str | None = None\n    isp: str | None = None\n    usage_type: str | None = None\n    total_reports: int = 0\n    is_tor: bool = False\n    is_whitelisted: bool = False\n    source: str = \"none\"\n\n    def summary(self) -> str:\n        if self.source == \"none\":\n            return \"No external enrichment data available.\"\n        parts = []\n        if self.abuse_score is not None:\n            parts.append(f\"abuse_confidence_score={self.abuse_score}/100\")\n        if self.is_tor:\n            parts.append(\"tor_exit_node=YES\")\n        # ...\n        return \" | \".join(parts)\n\nclass EnrichmentService:\n    async def enrich(self, alert_json: dict) -> EnrichmentData:\n        source_ip = alert_json.get(\"source_ip\")\n        if not source_ip or self._is_private_ip(source_ip):\n            return EnrichmentData()\n\n        try:\n            return await self._query_abuseipdb(source_ip)\n        except Exception as e:\n            logger.error(\"Enrichment failed: %s\", e)\n            return EnrichmentData()  # fail safe — never block triage\n```\n\nThree design choices worth calling out:\n\n**Fail safe.** If AbuseIPDB is down or rate-limited, enrichment returns empty data instead of crashing. The LLMs still get the alert — just without the extra context. Enrichment should degrade, not break the pipeline.\n\n**Skip private IPs.** 10.x.x.x, 192.168.x.x, 172.16–31.x.x are internal. AbuseIPDB has no data on them and querying wastes quota. A simple prefix check handles it.\n\n**Typed dataclass, not a nested dict.** The result is a real object with real fields. When I add VirusTotal (file hash reputation) and GeoIP next, they slot into new fields without breaking anything downstream.\n\nSame alert. Same LLMs. Same prompt. Only the context changed.\n\n**Before enrichment:**\n\n\"Multiple failed SSH attempts from a single IP may indicate malicious intent, but could also be a legitimate user. Recommend escalation for human review.\"\n\nVerdict: SUSPICIOUS · Confidence: 70%\n\n**After enrichment:**\n\n\"The source IP 185.220.101.34 is a known Tor exit node (100/100 abuse confidence, 368 reports in 90 days), targeting the root account with 15 failed attempts in 60 seconds. This matches a classic credential-stuffing pattern. Immediate IP block recommended.\"\n\nVerdict: MALICIOUS · Confidence: 96%\n\nNight and day.\n\nMost \"make your LLM smarter\" advice is about better prompts, longer context, chain-of-thought, fine-tuning. All real techniques.\n\nBut for any domain where the AI needs real-world data to reason correctly — security, finance, medical, legal — the biggest leverage usually isn't making the model cleverer. It's making sure the model has the facts.\n\nContext > cleverness.\n\nRepo: [github.com/0mer-byte/soc-gpt](https://github.com/0mer-byte/soc-gpt)\n\n**About me:** I'm a senior at Rock Ridge HS in Ashburn, VA. Taking CompTIA Security+ in December. Competing in CyberPatriot. Looking for data center / SOC internships for summer 2027 anywhere in Northern Virginia. If you work at AWS, Oracle Cloud, Equinix, Digital Realty, QTS, CoreSite, Vantage, HITT, M.C. Dean, or anywhere in the NoVA ecosystem, I'd love to connect.", "url": "https://wpnews.pro/news/llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool", "canonical_source": "https://dev.to/0merbyte/llms-dont-know-what-they-dont-know-adding-threat-intel-to-my-ai-security-tool-2b9", "published_at": "2026-11-28 02:04:12+00:00", "updated_at": "2026-11-28 02:14:25.433527+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "large-language-models", "ai-tools"], "entities": ["SOC-GPT", "AbuseIPDB", "Groq", "gpt-oss-120b", "Llama", "VirusTotal"], "also_reported_by": [], "takeaway": "Run a threat-intel enrichment step before the LLM sees an alert, since models hedge on IPs like 185.220.101.34 because Common Crawl lacks real-time abuse data; injecting AbuseIPDB scores raised a verdict from SUSPICIOUS at 70% to a confident call.", "recommendation": {"advice": "Enrich alerts with external threat-intel before LLM triage, fail safe to empty data on errors, and skip private IPs to save API quota.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool", "markdown": "https://wpnews.pro/news/llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool.md", "text": "https://wpnews.pro/news/llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool.txt", "jsonld": "https://wpnews.pro/news/llms-don-t-know-what-they-don-t-know-adding-threat-intel-to-my-ai-security-tool.jsonld"}}