Context

Search context and generate an LLM-powered answer

POST
/api/v1/context/search/steer

This endpoint performs a context search using the context processor, joins all matching context chunks into a single string, then sends that joined context along with the user's query to an LLM to produce a natural-language answer grounded in the retrieved context.

By default the response only includes the generated answer. Pass ?context=true to also receive the joined context string that was used to ground the answer.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

mode?string

Controls the search mode:

  • mode=fast -> prioritizes speed over completeness.
  • mode=standard -> performs a comprehensive search (default if omitted).
Default"standard"

Value in

  • "fast"
  • "standard"
context?boolean

When set to true, the response includes the joined context string used to ground the answer. Defaults to false (only answer,and usage are returned).

Defaultfalse

Request Body

application/json

user_id?string
Deprecated

The ID of the user making the request

steeringPrompt?string

The steering prompt for the query - basically the way in which you want to get your answer as.

query*string

The search query and question to be answered using retrieved context

similarity_threshold*number

Maximum similarity threshold (must be >= minimum_similarity_threshold)

Range0 <= value <= 1
minimum_similarity_threshold*number

Minimum similarity threshold

Range0 <= value <= 1
scope?string

Search scope

Default"internal"

Value in

  • "internal"
  • "external"
body_metadata?

Additional metadata for the search

Default{}

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/context/search/steer" \  -H "Content-Type: application/json" \  -d '{    "query": "What did the customer ask about pricing for the Scale plan?",    "similarity_threshold": 0.8,    "minimum_similarity_threshold": 0.5,    "scope": "internal"  }'
{  "answer": "string",  "context": "string",  "usage": {    "inputTokens": 0,    "outputTokens": 0,    "totalTokens": 0  }}