DIMEFIL Analyst CLI - AI-powered geopolitical event analysis using temporal graph networks
Project description
DimeAI
DIMEFIL Analyst CLI - AI-powered geopolitical event analysis.
Installation
cd dimeai
uv pip install -e .
Quick Start
# Collect articles about a situation
dimeai collect "South China Sea tensions 2024" -n 20
# Extract entities and relationships
dimeai extract -i articles -o graph.json
# Train TGN model
dimeai train -g graph.json -o model.pt
# Analyze a situation
dimeai analyze "China coast guard incident" -m model.pt -g graph.json
# Interactive session
dimeai interactive -g graph.json
# Run benchmarks
dimeai benchmark -g graph.json
Commands
| Command | Description |
|---|---|
collect |
Collect articles via web scraping |
extract |
Extract entities with GLiNER 2 |
train |
Train TGN model |
analyze |
Analyze a situation |
simulate |
Interactive what-if simulation |
interactive |
REPL for graph exploration |
benchmark |
Compare TGN vs baselines |
features compute |
Compute semantic features |
features inspect |
Inspect node features |
config show |
Show configuration |
config set |
Set configuration value |
dossier list |
List investigation dossiers |
dossier create |
Create new dossier |
dossier show |
Show dossier details |
dossier open |
Interactive dossier session |
dossier collect |
Add articles to dossier |
dossier export |
Export dossier as graph |
dossier note |
Add analyst note |
dossier delete |
Delete dossier |
Dossier System
Dossiers are persistent investigation sessions stored in SQLite (~/.dimeai/dossiers.db).
# Create a new dossier
dimeai dossier create "SCS Tensions 2024" -d "Investigating recent incidents"
# Collect articles (uses DuckDuckGo search)
dimeai dossier collect 1 "Philippines coast guard incident" -n 5
# Open interactive session
dimeai dossier open 1
# In session:
# collect <query> - Search and add articles
# extract - Extract entities from articles
# articles - List collected articles
# entities - List extracted entities
# events - List events
# note <text> - Add observation
# hypothesis <text> - Add hypothesis
# analyze - Analyze patterns
# export - Export as graph JSON
# quit - Exit session
# Export dossier
dimeai dossier export 1 -o my_investigation.json
DIMEFIL Framework
- Diplomatic - Protests, talks, negotiations
- Information - Propaganda, disinformation
- Military - Exercises, deployments
- Economic - Fishing, trade, sanctions
- Financial - (not yet implemented)
- Intelligence - (not yet implemented)
- Law Enforcement - Coast guard, patrols
Model Performance
| Model | Accuracy | Macro F1 | vs Random F1 |
|---|---|---|---|
| Random | 16.0% | 14.1% | - |
| Majority | 20.1% | 5.6% | -8.5pp |
| TGN | 28.7% | 20.9% | +6.9pp |
TGN beats both baselines on Macro F1 (the right metric for imbalanced data). Class-weighted loss helps the model learn rare classes (diplomatic, information).
Limitations
- Low absolute accuracy - 26.6% on 7-class problem
- Class imbalance - legal (36%), law_enforcement (13%)
- Temporal patterns - Response patterns show 79% law_enforcement → law_enforcement
- Graph heuristics - Agent uses heuristics, not neural predictions
Development
# Run tests
python -m pytest dimeai/tests/ -v
# Run property-based tests
python -m pytest dimeai/tests/test_properties.py -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dimeai-0.1.0.tar.gz.
File metadata
- Download URL: dimeai-0.1.0.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16341e4ad2c990a1d1174302c90cd95fcfbab7974adf7e5cf8af96781d142c9f
|
|
| MD5 |
7271047cde526a0c21aecb16d7c5ae77
|
|
| BLAKE2b-256 |
e5bdcea2e79bf722f99b3ba81df1ae5fdf7124d5a963fc782f6b2a025c5dfd6c
|
File details
Details for the file dimeai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dimeai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b8a4cd567e1354cd71668e05dd608edaf48cc8f0deb675921514e1156987f01
|
|
| MD5 |
7c166f3d575bb17bb7a47bb3a09a1405
|
|
| BLAKE2b-256 |
3c8ea7475bbc29e3b3caa11a8c64994121d69ff7c7b0c2a22acc6bf9bba08140
|