v4

latestOpenAPI 3.1.02026-08-0143190206.8 KB
v1

Search for content related to the query within the given collections.

post/v1/documents/search

Request body

filterstring nullable

Optional metadata filter string to apply to search results. Uses AIP-160 filter syntax for querying document metadata. Supports comparison operators: =, !=, >, >=, <, <= Supports logical operators: AND, OR Supports range syntax: field:10..20 (inclusive) Examples: author = "John" or year > 2020 AND category = "finance"

instructionsstring nullable

User-defined instructions to be included in the search query. Defaults to generic search instructions.

limitinteger nullable

The number of chunks to return. Will always return the top matching chunks. Optional, defaults to 10.

querystring required

The query to search for which will be embedded using the same embedding model as the one used for the source to query.

ranking_metric'RANKING_METRIC_UNKNOWN' | 'RANKING_METRIC_L2_DISTANCE' | 'RANKING_METRIC_COSINE_SIMILARITY'

Deprecated: Metric now comes from collection creation.

Response

Success