Knowledge
List retrieval golden sets
List the retrieval golden sets a credential can see, each with its newest run and the baselines it is judged against, as the Console Knowledge Quality page. Requires knowledge:read.
GET
/
api
/
v3
/
knowledge-golden-sets
List retrieval golden sets
curl --request GET \
--url https://api.forge.gloo.com/api/v3/knowledge-golden-sets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.gloo.com/api/v3/knowledge-golden-sets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.gloo.com/api/v3/knowledge-golden-sets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.forge.gloo.com/api/v3/knowledge-golden-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.gloo.com/api/v3/knowledge-golden-sets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.forge.gloo.com/api/v3/knowledge-golden-sets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/knowledge-golden-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"set": {
"id": "<string>",
"name": "<string>",
"scope": "<string>",
"namespaces": [
"<string>"
],
"cases": [
{
"caseId": "<string>",
"query": "<string>",
"expectedKeys": [
"<string>"
]
}
],
"status": "active",
"createdAt": 123,
"lastRunRequestedAt": 123
},
"latestRun": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
},
"baseline": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
},
"previousChunkerBaseline": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
}
}
],
"meta": {
"requestId": "<string>",
"hasMore": false,
"nextCursor": "<string>",
"asOf": 123,
"truncated": true
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
GET /api/v2/knowledge/goldenSets/list lists the retrieval golden sets whose every namespace the credential can read, newest first: the newest 50 active sets, and with includeArchived=true the newest 50 archived sets too. It needs knowledge:read. See Retrieval golden sets.
| Query parameter | Meaning |
|---|---|
includeArchived | true to list archived sets as well; false (default). |
namespace | Keeps the sets that search this namespace. It must be one the credential can read; otherwise 403, and the refusal is recorded. |
{ set, latestRun, baseline, previousChunkerBaseline }: the KnowledgeGoldenSet, its newest run, the baseline that run was judged against, and the previous chunker’s baseline when the newest run is the first under a new chunker version. Each run has the KnowledgeGoldenSetRun shape and is null when absent.
Each status is read in a bounded window of its newest 200 sets. meta.partial is true when a window stopped with sets unread or more than 50 matched. Page with limit and cursor. An unknown, empty or repeated parameter, or an includeArchived other than true or false, answers 400 bad_request.
curl -G "$FORGE_BASE/api/v2/knowledge/goldenSets/list" \
-H "Authorization: Bearer $FORGE_API_KEY" \
--data-urlencode "namespace=company"
Authorizations
BearerAuthPlatformApiKeyPersonalKey
Query Parameters
Response
Golden sets
⌘I
List retrieval golden sets
curl --request GET \
--url https://api.forge.gloo.com/api/v3/knowledge-golden-sets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.gloo.com/api/v3/knowledge-golden-sets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.gloo.com/api/v3/knowledge-golden-sets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.forge.gloo.com/api/v3/knowledge-golden-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.gloo.com/api/v3/knowledge-golden-sets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.forge.gloo.com/api/v3/knowledge-golden-sets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/knowledge-golden-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"set": {
"id": "<string>",
"name": "<string>",
"scope": "<string>",
"namespaces": [
"<string>"
],
"cases": [
{
"caseId": "<string>",
"query": "<string>",
"expectedKeys": [
"<string>"
]
}
],
"status": "active",
"createdAt": 123,
"lastRunRequestedAt": 123
},
"latestRun": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
},
"baseline": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
},
"previousChunkerBaseline": {
"id": "<string>",
"goldenSetId": "<string>",
"k": 123,
"chunkerVersion": "<string>",
"rankingVersion": "<string>",
"embedding": {
"provider": "<string>",
"model": "<string>",
"dimensions": 1
},
"trigger": "baseline",
"status": "ok",
"recallAtK": 123,
"mrr": 123,
"isBaseline": true,
"regressedFromBaseline": true,
"comparedToBaselineId": "<string>",
"createdAt": 123,
"perCase": [
{
"caseId": "<string>",
"recall": 123,
"reciprocalRank": 123,
"retrievedKeys": [
"<string>"
]
}
]
}
}
],
"meta": {
"requestId": "<string>",
"hasMore": false,
"nextCursor": "<string>",
"asOf": 123,
"truncated": true
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}
