RAG Query

POST

Execute a RAG (Retrieval-Augmented Generation) query.

This endpoint combines search results with language model generation. It supports the same filtering capabilities as the search endpoint, allowing for precise control over the retrieved context.

The generation process can be customized using the rag_generation_config parameter.

Request

This endpoint expects an object.
querystringRequired
search_modeenumOptional
Allowed values: basicadvancedcustom

Default value of custom allows full control over search settings.

Pre-configured search modes: basic: A simple semantic-based search. advanced: A more powerful hybrid search combining semantic and full-text. custom: Full control via search_settings.

If filters or limit are provided alongside basic or advanced, they will override the default settings for that mode.

search_settingsobjectOptional

The search configuration object. If search_mode is custom, these settings are used as-is. For basic or advanced, these settings will override the default mode configuration.

Common overrides include filters to narrow results and limit to control how many results are returned.

rag_generation_configobjectOptional

Configuration for RAG generation

task_prompt_overridestringOptional

Optional custom prompt to override default

include_title_if_availablebooleanOptional

Include document titles in responses when available

Response

Successful Response

Errors