Pular para o conteúdo principal
POST
/
api
/
v1
/
search
/
graphrag
/
stores
/
{store_name}
/
query
Python (SDK)
from mka1 import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.search.graphrag.query_graph_rag_store(store_name="<value>", query="Who owns the company that won the Northern Bridge Sensors contract?", mode="graph", limit=5, seed_k=8)

    # Handle response
    print(res)
{
  "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
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

Autorizações

Authorization
string
header
obrigatório

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>.

Cabeçalhos

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Parâmetros de caminho

store_name
string
obrigatório

Corpo

application/json
query
string
obrigatório
Minimum string length: 1
mode
enum<string>
padrão:graph
Opções disponíveis:
baseline,
graph
limit
integer
padrão:5
Intervalo obrigatório: 1 <= x <= 20
seed_k
integer
padrão:8
Intervalo obrigatório: 1 <= x <= 50

Resposta

Resposta Bem-Sucedida

mode
enum<string>
obrigatório
Opções disponíveis:
baseline,
graph
results
GraphRAGQueryResult · object[]
obrigatório
search_time_ms
integer
obrigatório
diagnostics
GraphRAGQueryDiagnostics · object
obrigatório