Skip to main content
PATCH
/
v1
/
query
/
plan
Edit Plan
curl --request PATCH \
  --url https://api.aryn.cloud/v1/query/plan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": {
    "docset_id": "<string>",
    "query": "<string>",
    "plan": {
      "query": "<string>",
      "nodes": {},
      "result_node": 123,
      "llm_prompt": "<any>",
      "llm_plan": "<string>"
    },
    "stream": false,
    "summarize_result": false,
    "rag_mode": false
  },
  "feedback": "<string>"
}'
{
  "query": "<string>",
  "nodes": {},
  "result_node": 123,
  "llm_prompt": "<any>",
  "llm_plan": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
object
required

A query against a DocSet. Contains either a natural language string or a query plan.

feedback
string
required

Feedback about the existing plan or instructions to modify it.

Response

Successful Response

A logical query plan used to evaluate a query.

query
string
required

The query that the plan is for.

nodes
object
required

A mapping of node IDs to nodes in the query plan.

result_node
integer
required

The ID of the node that is the result of the query.

llm_prompt
any

The LLM prompt that was used to generate this query plan.

llm_plan
string | null

The result generated by the LLM.

I