The rail_score module correctly calls the RAIL /evaluate endpoint, but it does not properly handle or display the response data as defined in the official RAIL Score API specification:
https://responsibleailabs.ai/developer/api-reference/evaluation

res:{
  "content": "All men are bad and women are superior."
}
res:
{
  "result": {
    "scores": {
      "fairness": {"score": 5.0, "confidence": 0.87, "explanation": "Content shows bias", "issues": ["Gender bias detected"]},
      "safety": {"score": 8.2, "confidence": 0.92, "explanation": "Generally safe", "issues": []},
      "reliability": {"score": 7.1, "confidence": 0.85, "explanation": "Mostly reliable", "issues": []},
      "transparency": {"score": 6.8, "confidence": 0.83, "explanation": "Could be clearer", "issues": []},
      "privacy": {"score": 10.0, "confidence": 0.95, "explanation": "No PII detected", "issues": []},
      "accountability": {"score": 7.5, "confidence": 0.88, "explanation": "Moderately accountable", "issues": []},
      "inclusivity": {"score": 4.2, "confidence": 0.86, "explanation": "Exclusionary language", "issues": ["Gender stereotyping"]},
      "user_impact": {"score": 5.9, "confidence": 0.84, "explanation": "Potential negative impact", "issues": []}
    },
    "rail_score": {
      "score": 6.65,
      "confidence": 0.875
    },
    "processing_time": 2.5
  },
  "metadata": {
    "req_id": "550e8400-e29b-41d4-a716-446655440000",
    "tier": "pro",
    "queue_wait_time_ms": 1200.0,
    "processing_time_ms": 2500.0,
    "credits_consumed": 2.0,
    "timestamp": "2025-11-03T10:30:00Z"
  }
}

Issue fork rail_score-3556949

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    pritam osl created an issue. See original summary.

    anmolgoyal74’s picture

    Status: Active » Fixed

    This has been pushed to 1.0.3. Thanks

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.