Export & Briefing
Generate decision memos, analyst briefings, and comparison reports
Overview
RayRay provides multiple export formats to support analyst workflows, executive briefings, and compliance documentation. All exports are logged to the audit trail for accountability and chain-of-custody requirements.
Available Formats
| Format | Use Case | Access Level |
|---|---|---|
| PPTX | Executive briefings, leadership presentations | Analyst+ |
| Decision memos, formal documentation | Analyst+ | |
| CSV | Data analysis, spreadsheet import | Analyst+ |
| JSON | Programmatic access, system integration | Analyst+ |
PowerPoint (PPTX) Export
Generate government-style PowerPoint briefings suitable for leadership presentations. The PPTX export follows USWDS color guidelines and includes comprehensive analysis details.
Slide Structure
Each briefing deck contains the following slides:
| Slide | Content |
|---|---|
| Slide 1 | Title Slide — Comparison name, scoring profile, system count, generation timestamp, prepared by |
| Slide 2 | Rankings Summary — Horizontal bar chart of final scores + sorted ranking table |
| Slides 3+ | Per-System Detail — One slide per system with score breakdown table (attribute, raw value, normalized, weight, weighted score) |
| Last Slide | Methodology & Audit — Scoring engine details, extraction method, M-25-21 compliance statement, normalization approach |
Theme & Branding
Colors follow USWDS / government branding standards:
BLUE_DARK = #1A4480 // Header bars, titles
BLUE_MID = #005EA2 // Chart series, table headers
BLUE_LIGHT = #D9E8F6 // Alternating row backgrounds
RED_ACCENT = #D54309 // Missing attributes warning
GRAY_BG = #F4F6F9 // Slide backgrounds
GRAY_TEXT = #565C65 // Footer text, metadataExport via API
# Download PPTX briefing
curl -X GET "http://localhost:8000/api/comparisons/42/export/pptx" \
-H "Authorization: Bearer eyJ..." \
--output comparison-42-briefing.pptxExport via UI
- Navigate to a comparison detail page
- Click the Export button in the toolbar
- Select PowerPoint (.pptx)
- File downloads automatically with naming convention:
comparison-{id}-briefing.pptx
PDF Export
Generate formal decision memoranda compliant with M-25-21 requirements. PDF exports include approval chains, evidence lists, and compliance notices.
Document Structure
| Section | Content |
|---|---|
| Header | DECISION MEMORANDUM title, decision title, horizontal rule |
| Decision Summary | Decision ID, status, confidence score, scoring profile, comparison name |
| Comparison Results | Sorted table: rank, system name, final score |
| Score Breakdown | Detailed table for top result: attribute, raw value, normalized %, weight %, weighted score |
| Decision Rationale | Analyst-provided justification text |
| Supporting Evidence | Bulleted list of evidence items |
| Approval Chain | Submitted by, approved by, dates |
| Footer | Generation timestamp, M-25-21 compliance notice |
M-25-21 Compliance Notice
All PDF decision memos include the following compliance footer:
M-25-21 COMPLIANCE: This decision memorandum was prepared with
AI-assisted analysis. All findings have been reviewed and verified
by a human analyst. No autonomous AI decisions were made in
accordance with OMB Memorandum M-25-21.Page Format
- Page Size: US Letter (8.5" x 11")
- Margins: 0.75" all sides
- Font: Helvetica family
- Colors: USWDS theme (same as PPTX)
PDF Generation Service
PDF exports are generated using reportlab. The service is located at:
apps/api/app/services/pdf_export.pyComparison Reports
JSON Export
Export the complete comparison data structure for programmatic access or archiving.
# Export as JSON
curl -X GET "http://localhost:8000/api/comparisons/42/export?format=json" \
-H "Authorization: Bearer eyJ..." \
--output comparison-42.jsonResponse structure:
{
"comparison": {
"id": 42,
"name": "Q1 Radar Analysis",
"profileId": 3,
"profileSnapshot": { ... },
"status": "completed",
"createdAt": "2026-03-12T14:30:00Z"
},
"results": [
{
"rank": 1,
"documentId": 101,
"documentName": "System Alpha Spec Sheet.pdf",
"finalScore": 87.5,
"scoreBreakdown": {
"range_km": {
"raw": 450,
"rawDisplay": "450 km",
"normalized": 0.90,
"weight": 0.25,
"weighted": 22.5
},
...
},
"rawValues": { ... },
"missingAttributes": []
}
]
}CSV Export
Export comparison results as a spreadsheet-compatible CSV file.
# Export as CSV
curl -X GET "http://localhost:8000/api/comparisons/42/export?format=csv" \
-H "Authorization: Bearer eyJ..." \
--output comparison-42.csvCSV format:
Rank,Document,Final Score,Range Km,Speed Mph,Weight Kg,...
1,System Alpha,87.5,450 km,120 mph,2500 kg,...
2,System Beta,82.3,380 km,115 mph,2300 kg,...
3,System Gamma,75.0,320 km,110 mph,2100 kg,...Bulk Export Options
For batch operations, iterate through comparisons programmatically:
# List all comparisons
curl -X GET "http://localhost:8000/api/comparisons/" \
-H "Authorization: Bearer eyJ..."
# Export each comparison
for id in 42 43 44; do
curl -X GET "http://localhost:8000/api/comparisons/$id/export/pptx" \
-H "Authorization: Bearer eyJ..." \
--output "comparison-$id-briefing.pptx"
doneRate Limiting
Bulk exports are subject to standard API rate limits. For large-scale operations, consider spacing requests or contacting your system administrator for batch export tools.
Export Audit Logging
Every export action is logged to the immutable audit trail. This supports chain-of-custody requirements and provides accountability for sensitive data access.
Logged Information
| Field | Description |
|---|---|
event_type | export_download |
user_id | ID of user who performed the export |
user_email | Email of user (denormalized) |
resource_type | comparison |
resource_id | Comparison ID exported |
ip_address | Client IP address |
details.format | Export format (pptx, pdf, csv, json) |
details.document_count | Number of documents in the comparison |
_timestamp | ISO 8601 timestamp |
_hash | SHA-256 hash for integrity verification |
Query Export Audit Events
# Query export events for a specific user
GET /api/audit?event_type=export_download&user_id=42
# Query all exports for a date range
GET /api/audit?event_type=export_download&start=2026-03-01&end=2026-03-31Audit Log Integrity
Audit logs use a blockchain-style hash chain for tamper detection. Each event includes a SHA-256 hash computed over the event content plus the previous event's hash.
// Event structure with hash chain
{
"_id": "evt_abc123",
"_timestamp": "2026-03-12T15:30:00Z",
"_prev_hash": "sha256:7f8a...",
"_hash": "sha256:3b2c...",
"event_type": "export_download",
"user_id": 42,
"resource_type": "comparison",
"resource_id": 101,
"details": { "format": "pptx", "document_count": 5 }
}API Reference
Export Endpoints
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET | /api/comparisons/{id}/export | Export as JSON or CSV | Analyst+ |
GET | /api/comparisons/{id}/export/pptx | Export as PowerPoint briefing | Analyst+ |
GET | /api/audit | Query audit events (including exports) | Reviewer+ |
GET | /api/audit/verify | Verify audit log integrity | Admin |
Query Parameters
Export Comparison (JSON/CSV)
| Parameter | Type | Default | Description |
|---|---|---|---|
format | string | json | Output format: json or csv |
Query Audit Events
| Parameter | Type | Description |
|---|---|---|
event_type | string | Filter by event type (e.g., export_download) |
user_id | integer | Filter by user ID |
start | date | Start of date range (ISO 8601) |
end | date | End of date range (ISO 8601) |
limit | integer | Maximum results (default: 100) |
Customization Options
Scoring Profile Configuration
Export outputs reflect the scoring profile configuration at the time of comparison creation. The profile snapshot is included in all export formats.
// Profile snapshot in exports
"profileSnapshot": {
"name": "Radar Systems v2",
"attributes": [
{
"name": "range_km",
"displayName": "Range (km)",
"normalization": "MAX",
"weight": 0.25
},
...
]
}Template Customization
Organizations can customize PPTX and PDF output by modifying the export services:
| Service File | Customization Points |
|---|---|
apps/api/app/services/pptx_export.py | Slide layouts, color themes, header/footer text, chart types, table formatting |
apps/api/app/services/pdf_export.py | Page format, margins, fonts, section order, compliance notice text, approval chain format |
Color Theme Override
To match organizational branding, modify the color constants in the export services:
# In pptx_export.py
BLUE_DARK = RGBColor(0x1A, 0x44, 0x80) # Change to your brand color
BLUE_MID = RGBColor(0x00, 0x5E, 0xA2)
BLUE_LIGHT = RGBColor(0xD9, 0xE8, 0xF6)
# In pdf_export.py
BLUE_DARK_HEX = "#1A4480"
BLUE_MID_HEX = "#005EA2"
BLUE_LIGHT_HEX = "#D9E8F6"Footer Customization
Modify classification banners and footer text in the export services:
# PPTX footer (in pptx_export.py)
footer_text = "UNCLASSIFIED // FOR OFFICIAL USE ONLY — RayRay Intel Platform"
# PDF compliance notice (in pdf_export.py)
compliance_text = (
"M-25-21 COMPLIANCE: This decision memorandum was prepared with "
"AI-assisted analysis. All findings have been reviewed and verified "
"by a human analyst."
)Dependencies
The export services require the following Python packages:
# PPTX export
pip install python-pptx
# PDF export
pip install reportlabIf dependencies are not installed, the export endpoints will return HTTP 501 (Not Implemented) with an error message indicating the missing package.
Related Documentation
- Comparison & Scoring — Creating and managing system comparisons
- Compliance — Audit logging and M-25-21 requirements
- API Reference — Full API documentation
- Extraction — AI-assisted data extraction workflow