Send a follow-up query and let the classifier decide whether to refine the existing search or start fresh. Refinement language (“but cheaper”, “in red”, “within 2 km”) merges constraints; explicit reset language (“instead”, “never mind”, “forget that”) replaces the session’s anchor and clears the constraint set.
Either way, the response carries the classifier’s verdict, the new constraint delta, the merged active set, and the updated history. The session’s TTL is refreshed by 30 minutes on every successful call.
Errors: 404 Not Found when the session doesn’t exist or has expired.
Documentation Index
Fetch the complete documentation index at: https://docs.closient.com/llms.txt
Use this file to discover all available pages before exploring further.
The session identifier returned from POST /search/session.
Payload for submitting a query within an existing session.
The classifier decides whether the query refines the current session
or resets it as a new search; the body is the same shape either way.
Phrasing matters: "but cheaper" reads as refinement, while
"instead show me laptops" reads as a fresh search.
Follow-up or replacement query text. The server classifies it as either a refinement (constraints merge into the existing set) or a new search (constraints reset, base_query updates) based on phrasing signals and keyword overlap with the current base_query.
1 - 500OK
Response for POST /search/session/{session_id}/query.
Reports the classifier's verdict (refinement vs. new search), the
constraint delta the extractor pulled out of the new query, and the
merged session state. Clients typically render
classification_explanation to the user as a chip ("Adding 'under
$80' to your search") so the model's behavior is visible.
The session this query was applied to (echoed back).
true when the classifier merged new_constraints into the existing filter set; false when it reset the session and replaced base_query.
Human-readable rationale for the refinement-vs-new-search verdict. Free-text — produced by the heuristic classifier (e.g. "Refinement language detected.", "Keyword overlap (45%) with base query."). Safe to surface to end users as a UI chip.
Updated filter state after applying this query. See SessionOut.active_constraints.
Just the constraints the extractor pulled out of this query — useful for rendering 'Added X' feedback in the UI. Subset of the keys in active_constraints.
The session's current anchor query. Unchanged on refinements; replaced with the new query text on a new-search classification.
The query text just submitted (echoed back).
Updated history including this query, oldest first.