Criteria
Criteria define the evaluation rules used to assess candidate applications in Semantikmatch. They specify what to evaluate, how to evaluate it, and what values are considered successful. On this page, we'll explore the different criteria endpoints you can use to manage criteria programmatically.
The Criteria Model
The criteria model contains all the information about evaluation criteria, including the type, query, value to compare, and more.
Example Criteria
{
"id": "74",
"criteria_type": "evaluate",
"query": "Check if the calculated percentages across all subjects indicate a failing grade below 50%.",
"metric": "Grades",
"value": "50",
"operator": "lower",
"custom_name": "Low Performance Check",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"custom_prompt": "Analyze the student's academic transcript and identify if there are failing grades (below 50%) in any subjects.",
"custom_model": "gpt-4",
"tools_list": ["web_search"]
}
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the criteria.
- Name
criteria_type
- Type
- string
- Description
Type of criteria, such as "evaluate", "extract", "match", etc.
- Name
query
- Type
- string
- Description
The query or instruction for this criteria evaluation.
- Name
metric
- Type
- string
- Description
The metric to measure or extract.
- Name
value
- Type
- string
- Description
The value to compare against.
- Name
operator
- Type
- string
- Description
The comparison operator (e.g., "higher", "lower", "equal").
- Name
custom_name
- Type
- string
- Description
A custom name for the criteria.
- Name
mandatory
- Type
- boolean
- Description
Whether this criteria is mandatory.
- Name
agg_job_id
- Type
- string
- Description
The associated job ID.
- Name
custom_prompt
- Type
- string
- Description
Custom prompt for AI evaluation.
- Name
custom_model
- Type
- string
- Description
The AI model to use for evaluation.
- Name
tools_list
- Type
- array
- Description
List of tools to use for evaluation.
Criteria Result Properties
- Name
id
- Type
- string
- Description
Unique identifier for the criteria result.
- Name
criteria_id
- Type
- string
- Description
Reference to the criteria.
- Name
result
- Type
- boolean
- Description
The result of the evaluation.
- Name
score
- Type
- string
- Description
Score assigned during evaluation.
- Name
score_justification
- Type
- string
- Description
Explanation for the score.
- Name
status
- Type
- string
- Description
Status of the evaluation (e.g., "finished", "pending").
- Name
application_id
- Type
- string
- Description
The associated application ID.
- Name
job_id
- Type
- string
- Description
The associated job ID.
- Name
confidence
- Type
- string
- Description
Confidence level in the evaluation.
- Name
confidence_justification
- Type
- string
- Description
Explanation for the confidence level.
- Name
payload
- Type
- object
- Description
Additional data extracted during evaluation.
List All Criteria
This endpoint allows you to retrieve all criteria across all jobs. It returns a comprehensive list of all criteria defined in the system.
List All Criteria
curl https://api.semantikmatch.com/api/criteria \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
{
"id": "74",
"criteria_type": "evaluate",
"query": "Check if the calculated percentages across all subjects indicate a failing grade below 50%.",
"input_1": null,
"input_2": null,
"metric": "Grades",
"value": "50",
"operator": "lower",
"custom_name": "Low Performance Check",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": "Analyze the student's academic transcript and identify if there are failing grades (below 50%) in any subjects.",
"custom_model": "gpt-4",
"tools_list": ["web_search"]
},
{
"id": "71",
"criteria_type": "extract",
"query": "Extract the number of subjects where the student received a grade of 14 or above.",
"input_1": null,
"input_2": null,
"metric": "High Grades Count",
"value": "0",
"operator": "higher",
"custom_name": "Strong Performance Count",
"mandatory": false,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": null,
"custom_model": null,
"tools_list": []
}
]
Get Criteria for a Job
This endpoint allows you to retrieve all criteria for a specific job.
Parameters
- Name
jobId
- Type
- string
- Description
The job ID to retrieve criteria for.
Get Criteria for a Job
curl "https://api.semantikmatch.com/api/criteria/job/e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
{
"id": "74",
"criteria_type": "evaluate",
"query": "Check if the calculated percentages across all subjects indicate a failing grade below 50%.",
"metric": "Grades",
"value": "50",
"operator": "lower",
"custom_name": "Low Performance Check",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": "Analyze the student's academic transcript and identify if there are failing grades (below 50%) in any subjects.",
"custom_model": "gpt-4",
"tools_list": ["web_search"]
},
{
"id": "71",
"criteria_type": "extract",
"query": "Extract the number of subjects where the student received a grade of 14 or above.",
"metric": "High Grades Count",
"value": "0",
"operator": "higher",
"custom_name": "Strong Performance Count",
"mandatory": false,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": null,
"custom_model": null,
"tools_list": []
}
]
Get Criteria by ID
This endpoint allows you to retrieve a specific criteria by its ID.
Parameters
- Name
criteriaId
- Type
- string
- Description
The criteria ID to retrieve.
Get Criteria by ID
curl "https://api.semantikmatch.com/api/criteria/id/74" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"id": "74",
"criteria_type": "evaluate",
"query": "Check if the calculated percentages across all subjects indicate a failing grade below 50%.",
"input_1": null,
"input_2": null,
"metric": "Grades",
"value": "50",
"operator": "lower",
"custom_name": "Low Performance Check",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": "Analyze the student's academic transcript and identify if there are failing grades (below 50%) in any subjects.",
"custom_model": "gpt-4",
"tools_list": ["web_search"]
}
Create a Criteria
This endpoint allows you to create a new criteria. The criteria can be used to evaluate applications for a specific job.
Required Parameters
- Name
criteria_type
- Type
- string
- Description
Type of criteria (e.g., "evaluate", "extract").
- Name
agg_job_id
- Type
- string
- Description
The job ID to associate this criteria with.
Optional Parameters
- Name
query
- Type
- string
- Description
The query or instruction for this criteria.
- Name
metric
- Type
- string
- Description
The metric to measure or extract.
- Name
value
- Type
- string
- Description
The value to compare against.
- Name
operator
- Type
- string
- Description
The comparison operator.
- Name
custom_name
- Type
- string
- Description
A custom name for this criteria.
- Name
mandatory
- Type
- boolean
- Description
Whether this criteria is mandatory.
- Name
custom_prompt
- Type
- string
- Description
Custom prompt for AI evaluation.
- Name
custom_model
- Type
- string
- Description
The AI model to use for evaluation.
- Name
tools_list
- Type
- array
- Description
List of tools to use for evaluation.
Create a Criteria
curl "https://api.semantikmatch.com/api/criteria" \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"criteria_type": "evaluate",
"query": "Check if the student has any failing grades (below 50%) in core subjects.",
"metric": "Failing Grades",
"value": "50",
"operator": "lower",
"custom_name": "Core Subject Performance",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"custom_prompt": "Analyze the student's transcript and identify if there are any failing grades (below 50%) in core subjects (Math, Science, Languages).",
"custom_model": "gpt-4",
"tools_list": ["web_search"]
}'
Response
{
"id": "75",
"criteria_type": "evaluate",
"query": "Check if the student has any failing grades (below 50%) in core subjects.",
"input_1": null,
"input_2": null,
"metric": "Failing Grades",
"value": "50",
"operator": "lower",
"custom_name": "Core Subject Performance",
"mandatory": true,
"agg_job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"status": null,
"archived": false,
"custom_prompt": "Analyze the student's transcript and identify if there are any failing grades (below 50%) in core subjects (Math, Science, Languages).",
"custom_model": "gpt-4",
"tools_list": ["web_search"],
"created_at": "2025-05-07T15:30:00.000Z"
}
Delete a Criteria
This endpoint allows you to delete a specific criteria. This will remove the criteria and all its associated results.
Parameters
- Name
criteriaId
- Type
- string
- Description
The criteria ID to delete.
Delete a Criteria
curl "https://api.semantikmatch.com/api/criteria/74" \
-X DELETE \
-H "Authorization: Bearer YOUR_API_KEY"
Response
// No content (HTTP 204)
Get Criteria Results for a Job
This endpoint allows you to retrieve all criteria results for a specific job. This includes all evaluation results across all applications for the job.
Parameters
- Name
jobId
- Type
- string
- Description
The job ID to retrieve criteria results for.
Get Criteria Results for a Job
curl "https://api.semantikmatch.com/api/criteria/results/job/e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
[
{
"id": "584",
"criteria_id": "74",
"result": false,
"evaluated_at": "2025-05-05T08:13:20.658Z",
"score": "100",
"score_justification": "The total TOEIC score of 930 is higher than 500, thus meeting the criterion.",
"citations": ["TOTAL SCORE: 930"],
"status": "finished",
"application_id": "c4501559-a55d-4457-99ac-64030879cf0c",
"job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"section": "1729782567464",
"confidence": "100",
"confidence_justification": "The agent correctly extracted the TOEIC Total Score as 930, which is indeed higher than 500.",
"payload": {
"extracted_value": "930"
},
"scorecard_score": 2,
"has_scorecard_result": true
},
{
"id": "585",
"criteria_id": "71",
"result": true,
"evaluated_at": "2025-05-05T08:13:34.003Z",
"score": "100",
"score_justification": "The student has 3 subjects with grades of 14 or above.",
"citations": ["Mathematics: 15/20", "English: 17/20", "Physics: 14/20"],
"status": "finished",
"application_id": "c4501559-a55d-4457-99ac-64030879cf0c",
"job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"section": "1729782567464",
"confidence": "100",
"confidence_justification": "The transcript clearly shows 3 subjects with grades above 14.",
"payload": {
"extracted_value": "3"
},
"scorecard_score": 2,
"has_scorecard_result": true
}
]
Get Criteria Result by ID
This endpoint allows you to retrieve a specific criteria result by its ID. This returns the detailed evaluation result including score, justification, and any extracted data.
Parameters
- Name
resultId
- Type
- string
- Description
The criteria result ID to retrieve.
Get Criteria Result by ID
curl "https://api.semantikmatch.com/api/criteria/results/584" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"id": "584",
"criteria_id": "74",
"result": false,
"evaluated_at": "2025-05-05T08:13:20.658Z",
"score": "100",
"score_justification": "The total TOEIC score of 930 is higher than 500, thus meeting the criterion.",
"citations": ["TOTAL SCORE: 930"],
"status": "finished",
"application_id": "c4501559-a55d-4457-99ac-64030879cf0c",
"job_id": "e0395dae-e4b7-4b28-ae9c-52b5c6fc6b1c",
"section": "1729782567464",
"confidence": "100",
"confidence_justification": "The agent correctly extracted the TOEIC Total Score as 930, which is indeed higher than 500.",
"payload": {
"extracted_value": "930"
},
"criteria": {
"id": "74",
"criteria_type": "evaluate",
"query": "Check if the calculated percentages across all subjects indicate a failing grade below 50%.",
"metric": "Grades",
"value": "50",
"operator": "lower",
"custom_name": "Low Performance Check"
}
}
Delete a Criteria Result
This endpoint allows you to delete a specific criteria result. This will trigger a re-evaluation of the corresponding criteria for the application.
Parameters
- Name
resultId
- Type
- string
- Description
The criteria result ID to delete.
Delete a Criteria Result
curl "https://api.semantikmatch.com/api/criteria/results/584" \
-X DELETE \
-H "Authorization: Bearer YOUR_API_KEY"
Response
// No content (HTTP 204)