Loading...
Skip to main content

Query a Corpus.

This will return the most relevant Chunks in the Corpus for the given query.

Path Parameters
    corpusId string required

    The ID of the corpus to query.

Request Body required
    corpusId string required

    The ID of the corpus to query.

    query string required

    The query to issue.

    maxChunks int32

    The maximum number of chunks to return. The service may return fewer than this value. If unspecified, at most 50 results will be returned. The maximum allowed value is 1000.

    rerankResults enum

    Possible values: [RERANK_RESULTS_UNSPECIFIED, RERANK_RESULTS_ENABLED, RERANK_RESULTS_DISABLED]

    Whether to re-rank results after the initial query.

Responses

OK


Schema
    results object[]

    The list of results.

  • Array [
  • chunkContent string

    The content of the matching chunk.

    score double

    The score of the match.

    chunkId string

    The ID of the matching chunk.

    citation object

    Information about the original source for a QueryResult. This is primarily metadata from the original source document that an LLM can use for citations.

    sourceId string

    The source owning the document that initially created this chunk.

    documentId string

    The document that initially created this chunk.

    publicUrl string

    The URL of the document that initially created this chunk if the document is publicly available.

    title string

    The title of the document that initially created this chunk, if any.

  • ]
Loading...