eval_rubrics
Create From Feedback
Convert user feedback items into structured eval rubric using LLM rewrite.
POST
/
api
/
v1
/
eval_rubrics
/
from_feedback
Create From Feedback
import requests
url = "https://www.datalab.to/api/v1/eval_rubrics/from_feedback"
payload = {
"name": "<string>",
"feedback_items": [
{
"content_snippet": "<string>",
"feedback": "<string>",
"block_id": "<string>",
"block_type": "<string>",
"page_number": 123,
"expected_output": "<string>"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/eval_rubrics/from_feedback \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"feedback_items": [
{
"content_snippet": "<string>",
"feedback": "<string>",
"block_id": "<string>",
"block_type": "<string>",
"page_number": 123,
"expected_output": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
feedback_items: [
{
content_snippet: '<string>',
feedback: '<string>',
block_id: '<string>',
block_type: '<string>',
page_number: 123,
expected_output: '<string>'
}
]
})
};
fetch('https://www.datalab.to/api/v1/eval_rubrics/from_feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/eval_rubrics/from_feedback"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"feedback_items\": [\n {\n \"content_snippet\": \"<string>\",\n \"feedback\": \"<string>\",\n \"block_id\": \"<string>\",\n \"block_type\": \"<string>\",\n \"page_number\": 123,\n \"expected_output\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": 123,
"name": "<string>",
"description": "<string>",
"eval_definition": {},
"source": "<string>",
"source_processor_id": "<string>",
"archived": true,
"version": 123,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"version_history": [
"<unknown>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Response
Successful Response
Was this page helpful?
Previous
Generate From FeedbackGenerate eval rubric from feedback items using LLM rewrite (no DB save).
Next
⌘I
Create From Feedback
import requests
url = "https://www.datalab.to/api/v1/eval_rubrics/from_feedback"
payload = {
"name": "<string>",
"feedback_items": [
{
"content_snippet": "<string>",
"feedback": "<string>",
"block_id": "<string>",
"block_type": "<string>",
"page_number": 123,
"expected_output": "<string>"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/eval_rubrics/from_feedback \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"feedback_items": [
{
"content_snippet": "<string>",
"feedback": "<string>",
"block_id": "<string>",
"block_type": "<string>",
"page_number": 123,
"expected_output": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
feedback_items: [
{
content_snippet: '<string>',
feedback: '<string>',
block_id: '<string>',
block_type: '<string>',
page_number: 123,
expected_output: '<string>'
}
]
})
};
fetch('https://www.datalab.to/api/v1/eval_rubrics/from_feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/eval_rubrics/from_feedback"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"feedback_items\": [\n {\n \"content_snippet\": \"<string>\",\n \"feedback\": \"<string>\",\n \"block_id\": \"<string>\",\n \"block_type\": \"<string>\",\n \"page_number\": 123,\n \"expected_output\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": 123,
"name": "<string>",
"description": "<string>",
"eval_definition": {},
"source": "<string>",
"source_processor_id": "<string>",
"archived": true,
"version": 123,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"version_history": [
"<unknown>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}