Skip to main content
POST
https://api.syncgovhub.com
/
api
/
rationale
/
ai
Rationale AI
curl --request POST \
  --url https://api.syncgovhub.com/api/rationale/ai \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "govaction_id": "<string>",
  "vote_type": "<string>",
  "for": "<string>",
  "custom_system_prompt": "<string>"
}
'
{
  "data": {
    "analysis": {
      "DRep": "## πŸ“Š What the Numbers Tell Us\n\n- **Explicit No Votes**: 1.62B ADA (active voters who chose \"No\")\n- **Not Voted**: 1.55B ADA (eligible voters who didn't participate)\n...",
      "SPO": "## πŸ“Š What the Numbers Tell Us\n\n- **Explicit No Votes**: 612.37M ADA (active voters who chose \"No\")\n- **Not Voted**: 13.89B ADA (eligible voters who didn't participate)...",
      "ConstitutionalCommittee": "## πŸ“Š What the Numbers Tell Us\n- **Explicit No Votes**: N/A ADA (active voters who chose \"No\")\n- **Not Voted**: N/A ADA (eligible voters who didn't p..."
    },
    "proposal_id": "gov_action10ueqgzwenxr39le68n0se9peu92r7gm2846xwehh3u0ahc0qd0uqqyljxu5",
    "proposal_title": "Set 2025 Net Change Limit of 300M ADA, 2026 Net Change Limit of 250M ADA",
    "vote_type": "no",
    "vote_percentages": {
      "SPO": {
        "counts": { "No": 22, "Yes": 29, "Abstain": 1 },
        "majority": "No",
        "percentages": { "No": 96.44, "Yes": 3.56 }
      },
      "DRep": {
        "counts": { "No": 111, "Yes": 141, "Abstain": 15 },
        "majority": "No",
        "percentages": { "No": 65.25, "Yes": 34.75 }
      },
      "ConstitutionalCommittee": {
        "counts": { "No": 4, "Yes": 1, "Abstain": 1 },
        "majority": "No",
        "percentages": { "No": 83.33, "Yes": 16.67 }
      }
    }
  },
  "meta": {
    "group_filter": "all",
    "vote_type": "no",
    "rationale_counts": {
      "DRep": 26,
      "SPO": 1,
      "ConstitutionalCommittee": 4
    },
    "total_rationales_processed": 31,
    "precise_token_count": 6276,
    "token_limits": {
      "gpt4o_max_context": 18000,
      "safe_input_limit": 7600,
      "output_token_reserve": 5000
    },
    "processed_votes_count": 137,
    "processing_method": "precise_token_based_summarization",
    "custom_prompt_used": false,
    "timings": {
      "fetch_proposal_data": 247,
      "fetch_votes": 132,
      "extract_rationales": 12,
      "generate_ai_analysis": 38004,
      "total": 38396
    }
  },
  "rationales": {
    "DRep": [
      {
        "id": "drep1y23kabcdefg...",
        "comment": "I'm voting \"No\" on t..."
      }
    ],
    "SPO": [
      {
        "id": "pool1vc8jhijklmn...",
        "comment": "Please provide some ..."
      }
    ],
    "ConstitutionalCommittee": [
      {
        "id": "cc_hot1qvr7p6mlmnopqus...",
        "comment": "The published rationale for t..."
      }
    ]
  }
}
Collective Intelligence: This endpoint analyzes voting rationales to extract patterns, common themes, and underlying values that influenced governance decisions across different stakeholder groups for specific vote choices.
The Rationale API provides AI-powered analysis of voting rationales across different stakeholder groups in Cardano’s governance system, filtered by vote type (Yes/No votes).

Request Headers

x-api-key
string
required
Your API key for authentication

Request Body

govaction_id
string
required
ID of the proposal to analyze rationales for
vote_type
string
required
Type of vote to analyze: β€œyes” or β€œno” - only these values are allowed
for
string
default:"all"
Stakeholder group to focus on: β€œall”, β€œdrep”, β€œspo”, or β€œcc” (Constitutional Committee)
custom_system_prompt
string
Custom system prompt to override the default analysis instructions. Use this to customize the analysis style, focus areas, or output format while preserving essential governance context.

Custom System Prompts

Flexible Analysis: Customize the AI analysis style while preserving essential governance context and vote breakdown data.

Default System Prompt

The API uses this default system prompt when no custom prompt is provided:
You are an expert analyst tasked with producing a comprehensive, structured, and easy-to-understand analysis of a community vote or live proposal. Your job is to break down vote data clearly and interpret voter rationales with depth and nuance. You must return all data in Markdown format for readability.

Your response must be well-structured using bullet points, numbered lists, and clear headings. Combine structured formatting with insightful analysis while maintaining conversational, accessible language.

Using Custom System Prompts

Replace the default instructions with your own analysis approach:
{
  "govaction_id": "gov_action123...",
  "vote_type": "no", 
  "for": "drep",
  "custom_system_prompt": "You are a political scientist specializing in decentralized governance. Focus on institutional dynamics, power structures, and democratic theory. Analyze voting patterns through the lens of public choice theory and collective action problems. Provide academic-level insights with citations to relevant literature where applicable."
}

Best Practices for Custom Prompts

Define Your Role

Specify Expertise: β€œYou are a [role] specializing in [area]”Examples:
  • Political scientist studying blockchain governance
  • Financial analyst focusing on treasury management
  • Sociologist examining community dynamics
  • Legal expert in constitutional compliance

Set Analysis Focus

Specify Perspective: What lens should the analysis use?Examples:
  • Economic impact and financial sustainability
  • Technical feasibility and implementation
  • Legal compliance and constitutional issues
  • Community sentiment and social dynamics

Define Output Style

Format Requirements: How should results be presented?Examples:
  • Academic paper format with citations
  • Executive summary for decision makers
  • Technical report with recommendations
  • Comparative analysis with scoring

Specify Depth Level

Detail Level: How comprehensive should the analysis be?Examples:
  • High-level strategic overview
  • Detailed technical assessment
  • Nuanced social dynamics analysis
  • Quantitative pattern recognition

Custom Prompt Examples

You are a political scientist specializing in digital democracy and decentralized governance systems. Analyze the voting rationales through the lens of democratic theory, focusing on:

1. Representation quality and delegate responsiveness
2. Information asymmetries and voter competence
3. Coalition formation and factional dynamics
4. Institutional design effects on outcomes

Structure your analysis as an academic paper section with clear theoretical frameworks. Reference relevant concepts from political science literature such as principal-agent theory, median voter theorem, or collective action problems where applicable.
You are a blockchain treasury analyst with expertise in decentralized finance and risk management. Evaluate the voting rationales from a financial perspective, focusing on:

1. Fiscal responsibility and sustainability concerns
2. Risk assessment and mitigation strategies
3. Economic incentives and market dynamics
4. Treasury management best practices

Provide quantitative insights where possible and structure your analysis as a risk assessment report with clear recommendations for financial governance.
You are a blockchain developer and systems architect with expertise in governance implementation. Evaluate the voting rationales from a technical feasibility perspective, focusing on:

1. Implementation complexity and technical risks
2. System architecture and scalability concerns
3. Integration challenges and compatibility issues
4. Performance impact and resource requirements

Provide technical depth appropriate for development teams and structure your analysis with clear implementation recommendations.

Tips for Better Analysis

Context Preservation: Essential governance data (vote breakdowns, proposal details, rationale lists) are automatically included regardless of your custom prompt.
Effective Prompting: Use specific, actionable instructions for better results:
  • Be Specific: β€œFocus on economic implications” vs β€œanalyze from financial perspective with emphasis on treasury sustainability, risk management, and long-term fiscal health”
  • Define Structure: Specify how you want results organized (bullet points, numbered sections, tables, etc.)
  • Set Expectations: Clarify the depth and style of analysis needed
  • Include Context: Mention any specific frameworks, theories, or methodologies to apply

Custom Prompt Guidelines

Do:
  • Specify your expertise area and perspective
  • Define the analysis framework or methodology
  • Set clear expectations for output format
  • Include specific focus areas or evaluation criteria
  • Use domain-specific terminology appropriately
Don’t:
  • Override essential vote data (automatically preserved)
  • Request formats incompatible with the governance context
  • Use prompts that ignore the provided rationales
  • Create prompts that don’t match your stakeholder group filter
  • Make the prompt overly complex or contradictory

Response Structure

Filtered Response: The API returns only analysis and rationales for requested stakeholder groups. Empty groups are omitted entirely for cleaner responses.
data
object
meta
object
rationales
object
Raw rationales from voters (only includes requested groups with data)
{
  "data": {
    "analysis": {
      "DRep": "## πŸ“Š What the Numbers Tell Us\n\n- **Explicit No Votes**: 1.62B ADA (active voters who chose \"No\")\n- **Not Voted**: 1.55B ADA (eligible voters who didn't participate)\n...",
      "SPO": "## πŸ“Š What the Numbers Tell Us\n\n- **Explicit No Votes**: 612.37M ADA (active voters who chose \"No\")\n- **Not Voted**: 13.89B ADA (eligible voters who didn't participate)...",
      "ConstitutionalCommittee": "## πŸ“Š What the Numbers Tell Us\n- **Explicit No Votes**: N/A ADA (active voters who chose \"No\")\n- **Not Voted**: N/A ADA (eligible voters who didn't p..."
    },
    "proposal_id": "gov_action10ueqgzwenxr39le68n0se9peu92r7gm2846xwehh3u0ahc0qd0uqqyljxu5",
    "proposal_title": "Set 2025 Net Change Limit of 300M ADA, 2026 Net Change Limit of 250M ADA",
    "vote_type": "no",
    "vote_percentages": {
      "SPO": {
        "counts": { "No": 22, "Yes": 29, "Abstain": 1 },
        "majority": "No",
        "percentages": { "No": 96.44, "Yes": 3.56 }
      },
      "DRep": {
        "counts": { "No": 111, "Yes": 141, "Abstain": 15 },
        "majority": "No",
        "percentages": { "No": 65.25, "Yes": 34.75 }
      },
      "ConstitutionalCommittee": {
        "counts": { "No": 4, "Yes": 1, "Abstain": 1 },
        "majority": "No",
        "percentages": { "No": 83.33, "Yes": 16.67 }
      }
    }
  },
  "meta": {
    "group_filter": "all",
    "vote_type": "no",
    "rationale_counts": {
      "DRep": 26,
      "SPO": 1,
      "ConstitutionalCommittee": 4
    },
    "total_rationales_processed": 31,
    "precise_token_count": 6276,
    "token_limits": {
      "gpt4o_max_context": 18000,
      "safe_input_limit": 7600,
      "output_token_reserve": 5000
    },
    "processed_votes_count": 137,
    "processing_method": "precise_token_based_summarization",
    "custom_prompt_used": false,
    "timings": {
      "fetch_proposal_data": 247,
      "fetch_votes": 132,
      "extract_rationales": 12,
      "generate_ai_analysis": 38004,
      "total": 38396
    }
  },
  "rationales": {
    "DRep": [
      {
        "id": "drep1y23kabcdefg...",
        "comment": "I'm voting \"No\" on t..."
      }
    ],
    "SPO": [
      {
        "id": "pool1vc8jhijklmn...",
        "comment": "Please provide some ..."
      }
    ],
    "ConstitutionalCommittee": [
      {
        "id": "cc_hot1qvr7p6mlmnopqus...",
        "comment": "The published rationale for t..."
      }
    ]
  }
}

Response Filtering Logic

Clean Responses: The API implements intelligent filtering to return only relevant data:
  • Specific Group Requests ("drep", "spo", "cc"): Returns only that group’s analysis and rationales
  • All Groups Request ("all"): Returns all groups that have rationales (skips empty groups)
  • Empty Groups: Omitted entirely from response (no empty arrays or empty analysis)
  • Context Data: vote_percentages always included for full proposal context

Analysis Output Format

The API returns structured markdown analysis with consistent sections:
  • πŸ“Š What the Numbers Tell Us: Vote breakdown and community sentiment
  • 🎯 Main Concerns and Themes: Top 3-4 identified themes with explanations
  • πŸ’‘ What Matters Most to These Voters: Core values and principles
  • πŸ€” Mixed Feelings or Conditions: Conditional statements and uncertainties
  • πŸ‘₯ How Their Role Influenced Their Thinking: Role-specific perspectives
  • 🎯 Bottom Line: Summary of main reasoning

Processing Methods

Automatic Optimization: The API automatically selects the optimal processing method based on rationale volume.
  • Direct Analysis (≀7,600 tokens): Single comprehensive analysis
  • Token-Based Summarization (>7,600 tokens): Intelligent chunking with summary synthesis

Technical Specifications

  • Context Window: GPT-4o 18,000 tokens
  • Safe Input Limit: 7,600 tokens (70% of capacity)
  • Token Measurement: Precise GPT tokenizer counting
  • Processing: ALL available rationales (complete coverage)

Status Codes

Status CodeDescription
200Success - Analysis generated successfully
400Bad Request - Invalid or missing required parameters
401Unauthorized - Missing or invalid API key
404Not Found - Proposal not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Notes

Required Parameter: The vote_type parameter is mandatory. The API analyzes rationales from voters who chose the specified vote type only.
Complete Coverage: The API processes ALL available rationales for the specified parameters, not samples, ensuring comprehensive analysis regardless of dataset size.
Optimized Responses: Empty groups are automatically filtered out to provide clean, focused responses without unnecessary empty data structures.

Advanced Usage Tips

Maximize Analysis Value: Combine different analysis approaches and stakeholder perspectives for comprehensive governance insights.

Multi-Perspective Analysis Strategy

Comparative Analysis:
  • Run the same query with different custom prompts
  • Compare results across stakeholder groups
  • Analyze both Yes and No votes for complete picture
  • Use different analytical frameworks for deeper insights
Sequential Analysis:
  1. Start with default analysis for comprehensive overview
  2. Apply domain-specific prompts for targeted insights
  3. Use legal/compliance perspective for risk assessment
  4. Apply technical lens for implementation considerations

Prompt Optimization Tips

Iterative Refinement:
  • Start with broad expertise-based prompts
  • Refine based on initial results
  • Add specific focus areas as needed
  • Test different analytical frameworks
Context Integration:
  • Reference your organizational context
  • Include relevant regulatory requirements
  • Consider stakeholder communication needs
  • Align with existing analytical processes
Quality Assurance:
  • Compare custom prompt results with default analysis
  • Validate insights against known stakeholder positions
  • Cross-reference with other governance data sources
  • Consider multiple analytical perspectives for important decisions