Skip to main content
POST
Add Scores to Request
Add evaluation scores to a request to track detailed quality metrics beyond simple thumbs up/down feedback. Scores allow you to measure specific dimensions of LLM outputs like accuracy, relevance, helpfulness, and custom evaluation criteria.
Scores support both integer and boolean values. Integer scores are stored as-is, while boolean values are converted to 1 (true) or 0 (false).

Path Parameters

string
required
The unique identifier of the request to add scores to. This can be found in the Helicone-Id response header when making requests through Helicone.Example: req_abc123def456

Request Body

object
required
An object containing score key-value pairs. Each key is the score name, and each value is either an integer or boolean.Supported value types:
  • number - Must be an integer (floats are not supported)
  • boolean - Converted to 1 (true) or 0 (false)
Example:

Response

null
Returns null on success.
string | null
Error message if the request failed.

Examples

Add Basic Scores

Add quality scores to a request:
cURL
TypeScript
Python

Add Mixed Score Types

Combine integer and boolean scores:
cURL
TypeScript

Use Cases

Automated LLM-as-Judge Evaluation

Use an LLM to evaluate another LLM’s output:

Human Evaluation Workflow

Collect detailed human evaluations:

Automated Quality Checks

Implement automated quality scoring:

Multi-Criteria RAG Evaluation

Evaluate RAG (Retrieval-Augmented Generation) systems:

Comparative Evaluation (A/B Testing)

Compare different models or prompts:

Custom Evaluation Framework

Build a reusable evaluation framework:

Querying by Scores

Query requests based on score values:

Score Value Constraints

Important constraints:
  • Only integer values are supported (no decimals/floats)
  • Boolean values are automatically converted to 1 (true) or 0 (false)
  • Score keys should be descriptive and consistent across your application

Best Practices

  • Consistent Naming: Use consistent score names across your evaluation workflows
  • Integer Values: Always use integers for numeric scores (0-100 scale is common)
  • Boolean Flags: Use booleans for yes/no criteria (presence of citations, factual accuracy, etc.)
  • Multiple Dimensions: Track multiple aspects of quality for comprehensive evaluation
  • Automated + Human: Combine automated scoring with periodic human evaluation
  • Threshold Alerts: Set up monitoring for scores below certain thresholds

Get Request by ID

Retrieve request with all scores

Query Requests

Query requests filtered by scores

Add Feedback

Add simple thumbs up/down feedback

Add Properties

Add custom properties to requests