Evidence met the configured threshold.
Use the returned passages and citations as context for your own application. CorpusMesh does not generate the final answer.
RAG API · Private beta
Send a raw query and permitted filters. CorpusMesh returns ranked passages, source versions, citations, and an explicit answer or abstain decision. It does not generate the final answer or legal advice.
POST /v1/retrieve · application/json
{
"knowledge_base": "eu-ai-act-reference",
"query": "How do Article 6 and Annex III work together to identify high-risk AI systems?",
"filters": {
"language": [
"en"
],
"jurisdiction": [
"eu"
]
},
"top_k": 5,
"profile": "active"
}Illustrative response excerpt · 200
{
"version": "2026-08-21.1",
"results": [
{
"text": "2. In addition to the high-risk AI systems referred to in paragraph 1, AI systems refe…",
"citation": {
"label": "Article 6 Classification rules for high-risk AI systems",
"source_anchor": "https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng#art_6",
"source_snapshot_id": "<source-snapshot-uuid>"
},
"metadata": {
"language": "en",
"jurisdiction": "eu",
"verification_status": "verified"
}
}
],
"abstention": {
"decision": "answer"
},
"trace_id": "ret_<trace-id>"
}The request follows the prepared beta plan. The response excerpt illustrates its shape using the reviewed public trace; identifiers are placeholders and this is not a new live request.
Request
Unknown fields are rejected. Filters can narrow an entitlement, never expand it. The service plan applies the final top_k cap.
querystringRequiredknowledge_basestringRequiredfilters.languagestring[]Optionalfilters.jurisdictionstring[]Optionalfilters.subjectstring[]Optionaltop_kintegerOptionalprofileactive | UUIDOptionalPOST /v1/retrieve
: "${CORPUSMESH_API_KEY:?Set CORPUSMESH_API_KEY first}"
curl --silent --show-error --fail-with-body https://corpusmesh.com/v1/retrieve \
--request POST \
--header "Authorization: Bearer $CORPUSMESH_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: request-article-6-001" \
--data '{
"knowledge_base": "eu-ai-act-reference",
"query": "How do Article 6 and Annex III work together to identify high-risk AI systems?",
"filters": {
"language": [
"en"
],
"jurisdiction": [
"eu"
]
},
"top_k": 5,
"profile": "active"
}'POST /v1/retrieve
const response = await fetch("https://corpusmesh.com/v1/retrieve", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CORPUSMESH_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": `request-${crypto.randomUUID()}`,
},
body: JSON.stringify({
"knowledge_base": "eu-ai-act-reference",
"query": "How do Article 6 and Annex III work together to identify high-risk AI systems?",
"filters": {
"language": [
"en"
],
"jurisdiction": [
"eu"
]
},
"top_k": 5,
"profile": "active"
}),
});
const retrieval = await response.json();
if (!response.ok) {
const retryAfter = response.headers.get("retry-after");
throw new Error(
retrieval.error.code + (retryAfter ? "; retry after " + retryAfter + "s" : ""),
);
}
if (retrieval.abstention.decision === "abstain") {
console.log("No supported evidence returned for this query.");
} else {
console.log(retrieval.results);
}POST /v1/retrieve
import os
import uuid
import requests
response = requests.post(
"https://corpusmesh.com/v1/retrieve",
headers={
"Authorization": f"Bearer {os.environ['CORPUSMESH_API_KEY']}",
"Idempotency-Key": f"request-{uuid.uuid4()}",
},
json={
"knowledge_base": "eu-ai-act-reference",
"query": "How do Article 6 and Annex III work together to identify high-risk AI systems?",
"filters": {
"language": [
"en"
],
"jurisdiction": [
"eu"
]
},
"top_k": 5,
"profile": "active"
},
timeout=35,
)
retrieval = response.json()
if not response.ok:
retry_after = response.headers.get("retry-after")
suffix = f"; retry after {retry_after}s" if retry_after else ""
raise RuntimeError(f"{retrieval['error']['code']}{suffix}")
if retrieval["abstention"]["decision"] == "abstain":
print("No supported evidence returned for this query.")
else:
print(retrieval["results"])Enforced boundary
The API verifies the organization, client, entitlement, immutable version, active retrieval profile, projection, and mandatory filters. A forbidden widening fails closed.
Language, jurisdiction, subject, and profile requests are intersected with the entitlement. The API does not silently substitute broader access.
Response fields
The response identifies the corpus version, retrieval profile, trace, source document, revision, source snapshot, canonical URL, citation anchor, language, jurisdiction, and verification status.
version, retrieval_profile, and trace_id make the retrieval state inspectable.citation.label, source_anchor, language, and jurisdiction travel with each passage.source_snapshot_id identifies the captured source. Its checksums and lineage are inspectable in the public Source Trace.{
"version": "2026-08-21.1",
"results": [
{
"text": "2. In addition to the high-risk AI systems referred to in paragraph 1, AI systems refe…",
"citation": {
"label": "Article 6 Classification rules for high-risk AI systems",
"source_anchor": "https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng#art_6",
"source_snapshot_id": "<source-snapshot-uuid>"
},
"metadata": {
"language": "en",
"jurisdiction": "eu",
"verification_status": "verified"
}
}
],
"abstention": {
"decision": "answer"
},
"trace_id": "ret_<trace-id>"
}Retrieval decision
Use the returned passages and citations as context for your own application. CorpusMesh does not generate the final answer.
results is empty and the response explains the abstention signal. Do not retry unchanged or treat it as evidence.
Response excerpt from the reviewed public trace. Identifiers are placeholders.
{
"version": "2026-08-21.1",
"results": [
{
"text": "2. In addition to the high-risk AI systems referred to in paragraph 1, AI systems refe…",
"citation": {
"label": "Article 6 Classification rules for high-risk AI systems",
"source_anchor": "https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng#art_6",
"source_snapshot_id": "<source-snapshot-uuid>"
},
"metadata": {
"language": "en",
"jurisdiction": "eu",
"verification_status": "verified"
}
}
],
"abstention": {
"decision": "answer"
},
"trace_id": "ret_<trace-id>"
}Excerpt. Other response fields, including the abstention signal, are omitted.
{
"results": [],
"abstention": {
"decision": "abstain"
}
}Evidence before integration
The public artifacts show the citation path, source checksums, corpus version, evaluation fixture, and runtime-observed scores for the reviewed v1 reference. The benchmark retrieved ten passages and the public trace displays five; that evaluation is separate from the beta plan’s five-passage response cap.
Recall@10
96.2%
Share of required evidence found in the first ten passages.
Source-anchor recall@10
98.3%
Required citation anchors present in the first ten passages.
Abstention accuracy
100%
Unsupported fixtures that correctly returned abstain.
Boundary violations
0
Results outside the enforced language and jurisdiction scope.
Plan for integration
The prepared EU AI Act beta covers one English knowledge base for one named application. The service plan attached to your entitlement is authoritative.
Review the fixed-term beta offer and error and retry behavior. When a source changes, a candidate version must be reviewed and evaluated before activation. See how source maintenance is bounded.
Your acceptance test
Use these questions to prepare a technical review and define success before access is issued.
Use the benchmark acceptance worksheet to record these decisions. A published benchmark does not replace evaluation on your workflow.
Private beta
Describe the sources, jurisdictions, update obligations, and request volume your application needs.
Manual review. Keys are issued only after approval.