Skip to main content
A
Docs

Reports

Generate AI-powered analytical reports with key findings, charts, and executive summaries.

Overview

Insights Reports uses AI to analyze connected data sources and produce structured analytical documents. Specify a title, target data source, and focus areas, and the LLM generates multi-section reports with key findings, supporting charts, and actionable recommendations.

Generating a Report

curl -X POST http://localhost:8010/api/v1/reports/generate \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Q4 2024 Government Performance Review",
    "description": "Quarterly analysis of department performance",
    "source_id": "demo-gov-analytics",
    "focus_areas": ["budget utilization", "citizen satisfaction", "AI adoption"]
  }'

Response:

{
  "id": "rpt-a1b2c3",
  "title": "Q4 2024 Government Performance Review",
  "status": "completed",
  "sections": [
    {
      "title": "Budget Utilization Analysis",
      "content": "Overall budget utilization reached 94.2% in Q4...",
      "chart_type": "bar",
      "chart_data": [...]
    },
    {
      "title": "Citizen Satisfaction Trends",
      "content": "Satisfaction improved across all departments...",
      "chart_type": "line",
      "chart_data": [...]
    }
  ],
  "key_findings": [
    "Digital department leads AI adoption at 90%",
    "Citizen satisfaction improved across all departments in Q4"
  ],
  "created_at": "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T10:30:05Z"
}

Report Structure

Each generated report contains:

SectionDescription
titleReport title as specified in the request
sectionsArray of analysis sections, each with a title, narrative content, and optional chart
key_findingsBullet-point summary of the most important discoveries
statusGeneration status: pending, completed, or failed

Report Sections

Each section is an independent analysis unit:

  • Title -- Section heading (e.g., "Budget Utilization Analysis")
  • Content -- LLM-generated narrative analysis with specific data points
  • Chart Type -- Suggested visualization for the section's data
  • Chart Data -- Pre-formatted data for rendering the suggested chart

Focus Areas

Focus areas guide the LLM's analysis. They determine which aspects of the data receive dedicated report sections. Common focus areas for government analytics:

  • budget utilization -- Spending efficiency across departments
  • citizen satisfaction -- Service quality and public sentiment
  • AI adoption -- Technology deployment and digital transformation progress
  • service performance -- Processing times, volumes, and throughput
  • digital transformation -- Online vs. in-person service usage

Data-Driven Analysis

Reports are grounded in actual data from the connected source. The LLM references specific values, trends, and comparisons rather than generating generic content.

Browsing Reports

List Reports

curl http://localhost:8010/api/v1/reports

Returns all generated reports with their status, creation date, and key findings summary.

Get Report Details

curl http://localhost:8010/api/v1/reports/{report_id}

Returns the full report with all sections, charts, and findings.

For time-series data sources with quarterly or monthly columns, reports automatically detect trends and include period-over-period comparisons. The LLM identifies upward/downward movements, seasonal patterns, and outliers.

Export

Reports can be exported from the dashboard in formatted views suitable for sharing with government leadership. The structured JSON format makes it straightforward to build custom export pipelines for PDF or presentation generation.