惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Jina AI
Jina AI
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
I
InfoQ
L
LangChain Blog
The Cloudflare Blog
IT之家
IT之家
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
博客园 - 聂微东
美团技术团队
博客园_首页

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How We Built CyberGraph RAG: A 3.5M Token Cybersecurity G...
Bhuvi D · 2026-05-18 · via DEV Community

Bhuvi D

Traditional Vector RAG struggles with highly connected cybersecurity data.

Threat actors, malware, CVEs, and attack techniques exist as relationships - not isolated text chunks.

To explore whether graph-based retrieval performs better, we built CyberGraph RAG, a cybersecurity benchmarking platform comparing:

  • LLM-only
  • Basic Vector RAG
  • TigerGraph GraphRAG

using a 3.5M+ token cybersecurity corpus built from MITRE ATT&CK, CISA KEV, and NVD feeds.


The Problem with Traditional RAG

Most retrieval systems today use vector similarity search.

Documents are chunked into fixed-size text blocks, embedded into vectors, and retrieved using cosine similarity.

While this works reasonably well for generic QA tasks, cybersecurity intelligence is heavily relationship-driven.

For example:

Which threat actors exploited Log4Shell to deploy ShadowPad in healthcare systems?

Answering this requires understanding relationships between:

  1. Threat actors
  2. Vulnerabilities
  3. Malware families
  4. Target industries

Traditional RAG retrieves nearby chunks of text, but often loses the actual relationships between entities.

This leads to:

  • noisy context
  • larger prompts
  • hallucinations
  • incorrect attack attribution

Our GraphRAG Approach

Instead of storing cybersecurity intelligence as disconnected chunks, we modeled it as a graph inside TigerGraph.

Entities included:

  • Threat Actors
  • Malware
  • CVEs
  • Attack Techniques
  • Target Sectors

Relationships included:

  • USES
  • TARGETS
  • EXPLOITS
  • DELIVERS

Example traversal:

APT41 → EXPLOITS → Log4Shell
Log4Shell → DELIVERS → ShadowPad
ShadowPad → TARGETS → Healthcare

Enter fullscreen mode Exit fullscreen mode

When a query is received:

  1. The system identifies the central entity.
  2. TigerGraph performs multi-hop graph traversal.
  3. Only the most relevant relationships are retrieved.
  4. Gemini generates the final response using focused graph context.

This avoids injecting massive unrelated text chunks into the prompt.


System Architecture

arch

CyberGraph compares LLM-only, Basic RAG, and TigerGraph GraphRAG pipelines side-by-side using a shared cybersecurity dataset.

While Basic RAG retrieves nearby text chunks using vector similarity search, GraphRAG performs multi-hop traversal over structured cybersecurity relationships stored inside TigerGraph.

The retrieved context is then passed to Gemini for final response generation, benchmark evaluation, and graph visualization.


Dashboard Comparison

CyberGraph dashboard comparing LLM-only, Basic RAG, and GraphRAG side-by-side.

img 1


Building the Cybersecurity Dataset

We created a lightweight dataset aggregation pipeline that automatically collected and normalized cybersecurity intelligence from:

  1. MITRE ATT&CK Enterprise Matrix
  2. CISA Known Exploited Vulnerabilities (KEV)
  3. NVD CVE Feeds

Final Dataset Scale

  • 3.5M+ tokens
  • 21,029 processed documents
  • 35,072 graph relationships

The processed dataset was converted into relationship-rich graph structures optimized for GraphRAG traversal.


Interactive Graph Visualization

To improve explainability, we integrated graph visualization directly into the dashboard.

Each query dynamically renders the retrieved graph neighborhood showing:

  • threat actors
  • malware families
  • CVEs
  • attack techniques
  • target industries

This made multi-hop cybersecurity reasoning much easier to validate visually.

Img 2

Interactive graph visualization generated during GraphRAG traversal.


Benchmark Results

We benchmarked all 3 pipelines side-by-side using complex cybersecurity reasoning queries.

Pipeline Avg Tokens Avg Latency Accuracy
LLM-only 950 10.15s 20%
Basic RAG 1280 6.45s 60%
GraphRAG 685 3.80s 100%

Key Improvements with GraphRAG

  1. ~46.5% lower token usage compared to Basic RAG
  2. ~62.5% lower latency
  3. Lower estimated API cost
  4. Higher factual consistency on multi-hop cybersecurity queries

Because GraphRAG retrieves focused entity relationships instead of large overlapping chunks, the prompts become:

  • smaller
  • cleaner
  • more explainable

Metrics Comparison

img 2

Benchmark comparison showing lower latency and token usage for GraphRAG.


Key Learnings

  1. Graph relationships matter more than raw chunk similarity in cybersecurity workflows.

  2. Smaller, focused prompts improved both latency and factual consistency.

  3. Multi-hop graph traversal produced more explainable retrieval than traditional vector search.

  4. Graph visualization significantly improved debugging and trust in retrieved threat intelligence.


Future Improvements

Next steps for CyberGraph include:

  1. Real-time threat feed ingestion
  2. Live attack-chain visualization
  3. Autonomous community detection for emerging threat clusters
  4. Adaptive graph traversal strategies

Conclusion

CyberGraph showed us that GraphRAG is not just a retrieval upgrade — it fundamentally changes how complex cybersecurity intelligence can be explored, explained, and validated.

By combining TigerGraph with Gemini, we built a system that is:

  • faster
  • more token-efficient
  • more explainable
  • and significantly more reliable for multi-hop threat intelligence reasoning.

Project Links

GitHub Repo

Live Demo

Built for the TigerGraph GraphRAG Inference Hackathon 2026.