Knowledge graph and LLM based system for contextual cyber threat intelligence relevance assessment.
GraphIntel extracts structured CTI from unstructured reports, ingests it into Neo4j, and performs graph-based reasoning to identify reports relevant to a specific organisation.
- LLM-based CTI extraction from raw text
- STIX-aligned graph ingestion into Neo4j
- Multi-hop path discovery between threats and organisations
- LLM-based path relevance classification
- Flask REST API
- Dockerized deployment
- Optional PostgreSQL persistence for report tracking and analysis
system/
├── app/
│ ├── routes.py # API endpoints
│ ├── services/ # extraction, graph, reasoning services
│ └── ...
├── docker-compose.yml # Flask + Neo4j + PostgreSQL stack
├── uml/ # architecture diagrams
└── ...
docker/
└── docker-compose.yml # standalone OpenCTI stack
Start the API stack:
cd system
docker compose up --build
Services:
| Service | URL |
|---|---|
| API | http://localhost:8000 |
| Neo4j Browser | http://localhost:7474 |
curl -X POST http://localhost:8000/threat_reports \
-H "Content-Type: application/json" \
-d '{
"text": "Example incident report text",
"url": "https://example.com/report",
"credibility": 80
}'
POST /threat_reports
- Creates a persistent report record
- Extracts and ingests CTI into Neo4j
- Stores derived paths and relevance analysis
Use when reports need lifecycle tracking and reasoning outputs.
POST /ingest/text
- Extracts entities and relationships from text
- Ingests them into Neo4j
- Does not create a tracked report entry
Use when only graph enrichment is required.
Raw Report
↓
LLM Extraction
↓
Structured CTI Subgraph
↓
Neo4j Graph Merge
↓
Path Discovery
↓
LLM Path Classification
↓
Relevant Threat Paths
API reference API.md
Large Language Models (GPT-5.x series within Codex) were used to assist with code generation, enabling more rapid development. AI assistance was limited to implementing code that satisfied predefined function descriptions and requirements. Architectural decisions, system design, and overall engineering direction was led by me without the use of AI