Protocol Documentation

Table of Contents

dss/graphrag_retrievers/proto/retrievers.proto

Top

GraphRAGRetrieversServiceV1

The service definition for GraphRAG retrieval queries.

HTTP bindings

Method Name Method Route Body Response
ProcessGraphRAGQuery POST /v1/graphrag-query GraphRAGQueryRequest GraphRAGQueryResponse
HealthCheck GET /v1/health HealthCheckRequest HealthCheckResponse

ProcessGraphRAGQuery

Process a GraphRAG query (either global or local or unified) and return the retrieval result.

Input Body: GraphRAGQueryRequest
Output: GraphRAGQueryResponse

HealthCheck

Health check endpoint to verify service availability.

Input Body: HealthCheckRequest
Output: HealthCheckResponse

GraphRAGQueryRequest

A request to perform a GraphRAG query.

FieldTypeLabelDescription
query string

The query string for retrieval, e.g. "What is the capital of France?"

level int32

The desired level for community schema retrieval (if applicable). Defaults to 2 if not provided.

query_type QueryType

The type of query to perform: GLOBAL or LOCAL or UNIFIED. If not specified, defaults to GLOBAL.

provider Provider

The embedding/completion provider to use. If not specified, defaults to OPENAI.

response_type string

Instructions passed to the LLM to specify a custom response generation style (e.g "Short answer", "Multiple paragraphs", "Sarcastic answer", etc.). If not specified, uses the default response types specified by the Local & Global & Unified Query Parameters.

include_metadata bool

Whether to include metadata in the response. If not specified, defaults to false.


GraphRAGQueryResponse

The response from a GraphRAG query.

FieldTypeLabelDescription
result string

The textual result of the retrieval process.

metadata string

Optional additional metadata about the result, if needed in the future.


HealthCheckRequest

Empty request for health check as per standard health check patterns.

HealthCheckResponse

Health check response indicating the current server status.

FieldTypeLabelDescription
status string

Current health status (e.g. "OK", "BAD")

message string

Optional detailed message about health status.


Provider

Enumeration of provider types.

NameNumberDescription
OPENAI 0

OLLAMA 1

TRITON 2

QueryType

Enumeration of query types.

NameNumberDescription
QUERY_TYPE_UNSPECIFIED 0

GLOBAL 1

LOCAL 2

UNIFIED 3

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)