Welcome to the documentation for the Dataset Recommendation Service.
FastAPI 0.1.0¶
Dataset Recommendation Service¶
GET /dataset-recsys/recommend¶
Get recommendations
Description
Retrieve the top-N recommendations for a given item in a dataset.
The meaning of item varies by dataset:
- MathE — items are educational materials (PDFs), whose identifiers
correspond to filenames with .pdf extension (e.g., {item_id}.pdf).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
dataset |
query | string | No | The dataset/application name | |
iid |
query | string | No | The item identifier within the selected dataset | |
n |
query | integer | 10 | No | Number of similar items to return |
Response 200 OK
{
"dataset": "mathe",
"iid": "56.pdf",
"recommendations": [
"54.pdf",
"55.pdf",
"52.pdf",
"367.pdf",
"360.pdf"
]
}
Schema of the response body
{
"properties": {
"dataset": {
"type": "string",
"title": "Dataset",
"description": "The dataset/application name"
},
"iid": {
"type": "string",
"title": "Iid",
"description": "The item identifier within the selected dataset"
},
"recommendations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Recommendations",
"description": "List of recommended item identifiers"
}
},
"type": "object",
"required": [
"dataset",
"iid",
"recommendations"
],
"title": "ItemToItemRecsResponse"
}
Response 404 Not Found
{
"errors": [
{
"code": 404,
"detail": "Dataset 'movies' not found"
}
]
}
{
"errors": [
{
"code": 404,
"detail": "Item ID '666.pdf' not found in dataset 'mathe'"
}
]
}
Schema of the response body
Response 422 Unprocessable Content
{
"errors": [
{
"code": 422,
"detail": [
{
"type": "missing",
"loc": [
"query",
"iid"
],
"msg": "Field required"
}
]
}
]
}
{
"errors": [
{
"code": 422,
"detail": [
{
"type": "int_parsing",
"loc": [
"query",
"n"
],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "ten"
}
]
}
]
}
{
"errors": [
{
"code": 422,
"detail": [
{
"type": "less_than_equal",
"loc": [
"query",
"n"
],
"msg": "Input should be less than or equal to 20",
"input": "21",
"ctx": {
"le": 20
}
}
]
}
]
}
Schema of the response body
Service Health¶
GET /dataset-recsys/health¶
Health check
Description
Check if the recommender API is running and responsive.
Response 200 OK
Schema of the response body
GET /dataset-recsys/¶
Root endpoint
Description
Root endpoint to verify that the service is running.
Response 200 OK
Schema of the response body
Schemas¶
ItemToItemRecsResponse¶
| Name | Type |
|---|---|
dataset |
string |
iid |
string |
recommendations |
Array<string> |