DefenseAI

Key Design Principles
- Human-in-the-Loop — Every AI output requires explicit human review and approval before becoming actionable
- Safety-First Orchestration — Multi-stage validation pipeline in Rust rejects malformed, dangerous, or low-confidence outputs
- Immutable Auditability — Every prompt, response, and decision is logged with SHA-256 cryptographic hashing for tamper detection
- Separation of Concerns — Rust handles AI orchestration and safety; Django handles application logic, UI, and user management
- Defense-Grade Reliability — Retry logic, timeout enforcement, structured error handling, and graceful degradation
Request Flow
- Analyst submits raw intelligence data through the Django web interface
- Django sends the data to the Rust Orchestrator via HTTP POST
- Rust constructs a structured prompt and calls the LLM API with retry/timeout logic
- The LLM response passes through the Safety Validation Pipeline (schema check, content safety, logical consistency, confidence scoring)
- Every step is logged in the Immutable Audit Trail with SHA-256 hashes
- The validated brief is returned to Django and placed in the Review Queue
- A Reviewer or Admin must explicitly Approve, Reject, or Request Revision
Rust Backend — AI Orchestrator
The Rust service is responsible for all AI-related operations. Rust was chosen for its memory safety, zero-cost abstractions, and strict type system — critical properties for a safety-critical system where the LLM is treated as an unreliable oracle.
Django Application — Web UI & Workflows
Django handles the user-facing application: authentication, role-based access control, brief lifecycle management, and the enterprise web interface. It communicates with the Rust Orchestrator via REST API and persists all application data in PostgreSQL.
Primary Model
- Model: Qwen/Qwen3-32B-AWQ
- Quantization: AWQ (4-bit)
- Parameters: 32 billion
- Serving: vLLM (OpenAI-compatible API)
- Hardware: 2x NVIDIA RTX 3090 (48GB VRAM)
- Timeout: 90 seconds per request
- Max retries: 3
- Temperature: 0.3 (low for structured output)
analyst:analyst123 - source data, view own briefs, view brief details
reviewer:reviewer123 - All Analyst permissions + approve, reject, or request revision on briefs
admin:admin123 - All Reviewer permissions + observability dashboard + Django admin panel