Semantic search files

semanticSearchFiles(input: SemanticSearchFilesInput!): SemanticSearchFilesPayload!

Requires project.knowledge.read.

Arguments

ArgumentTypeRequired
inputSemanticSearchFilesInput!Yes

Input fields

input

SemanticSearchFilesInput

FieldTypeRequiredDescription
modelSemanticSearchModelInputNo
queryVector[Float!]!YesPre-computed query vector (embedding of the search query), generated with an embedding provider
dimensionEmbeddingDimension!YesEmbedding dimension (must match queryVector length)
modeSemanticSearchModeNoSearch mode. Only SEMANTIC (the default) is supported; KEYWORD and HYBRID are refused with VALIDATION_FAILED
environmentSearchEnvironmentNoSearch environment
branchIdIDNoBranch ID for PREVIEW environment
releaseIdIDNoRelease ID for RELEASE environment
releaseVersionStringNoRelease version for RELEASE environment
limitIntNoMaximum results
cursorStringNoPagination cursor
optionsSemanticSearchOptionsNoSearch options

Response

Returns SemanticSearchFilesPayload!. Open the type for its fields and nested types.

FieldType
data[SemanticSearchResult!]!
pageInfoPageInfo!
totalMatchesInt!
searchTimeMsInt!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query SemanticSearchFiles($input: SemanticSearchFilesInput!) {
  semanticSearchFiles(input: $input) {
    searchTimeMs
    totalMatches
    data {
      chunk {
        id
        content
        index
      }
      file {
        id
        checksum
        path
        versionId
      }
      match {
        matchType
        score
      }
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{
  "input": {
    "queryVector": [],
    "dimension": "D768"
  }
}