import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.search.graphrag.queryGraphRAGStore({
storeName: "<value>",
xApiKeyId: "<id>",
xUserId: "<id>",
xExchangeJwtExternalUserId: "<id>",
graphRAGQueryRequest: {
query: "Who owns the company that won the Northern Bridge Sensors contract?",
},
});
console.log(result);
}
run();{
"diagnostics": {
"expanded_entities": [
"Rivera Logistics",
"Atlas Infrastructure Group"
],
"query_entities": [
"Northern Bridge Sensors"
],
"seed_entities": [
"Rivera Logistics"
],
"traversed_edges": [
"Atlas Infrastructure Group -[owns]-> Rivera Logistics"
]
},
"mode": "graph",
"results": [
{
"chunk_id": "doc_001::chunk_0",
"document_id": "doc_001",
"entities": [
"Atlas Infrastructure Group",
"Rivera Logistics"
],
"metadata": {
"source": "benchmark"
},
"score": 0.81,
"score_breakdown": {
"final_score": 0.81,
"graph_score": 1,
"keyword_score": 0.3,
"semantic_score": 0.72
},
"text": "Atlas Infrastructure Group owns Rivera Logistics."
}
],
"search_time_ms": 18
}import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.search.graphrag.queryGraphRAGStore({
storeName: "<value>",
xApiKeyId: "<id>",
xUserId: "<id>",
xExchangeJwtExternalUserId: "<id>",
graphRAGQueryRequest: {
query: "Who owns the company that won the Northern Bridge Sensors contract?",
},
});
console.log(result);
}
run();{
"diagnostics": {
"expanded_entities": [
"Rivera Logistics",
"Atlas Infrastructure Group"
],
"query_entities": [
"Northern Bridge Sensors"
],
"seed_entities": [
"Rivera Logistics"
],
"traversed_edges": [
"Atlas Infrastructure Group -[owns]-> Rivera Logistics"
]
},
"mode": "graph",
"results": [
{
"chunk_id": "doc_001::chunk_0",
"document_id": "doc_001",
"entities": [
"Atlas Infrastructure Group",
"Rivera Logistics"
],
"metadata": {
"source": "benchmark"
},
"score": 0.81,
"score_breakdown": {
"final_score": 0.81,
"graph_score": 1,
"keyword_score": 0.3,
"semantic_score": 0.72
},
"text": "Atlas Infrastructure Group owns Rivera Logistics."
}
],
"search_time_ms": 18
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Was this page helpful?