Skip to main content

How it works

When you search, Knowledge Stack:
  1. Converts your query text into a vector embedding.
  2. Finds the most similar document chunks using vector similarity.
  3. Filters results by your specified scope and metadata.
  4. Enforces authorization — you only see results you have permission to read.
  5. Returns ranked results with similarity scores.

Search endpoint

Request

Parameters

Response

The response is a list of matching chunks, sorted by relevance (highest score first). Each result includes:
  • Content — The actual text of the chunk.
  • Score — A similarity score between 0 and 1.
  • Path info — Where this chunk lives in the document hierarchy.
  • Metadata — Additional context like bounding boxes for PDF content and S3 URLs for images.

Understanding scores

Scores represent how similar a chunk is to your query: Adjust score_threshold based on your use case. Lower it for broader recall, raise it for higher precision.

Search within specific folders

Pass parent_path_ids to restrict search to specific parts of your knowledge base:
If you don’t specify parent_path_ids, the search defaults to your tenant’s /shared folder.

Filter by content type

Search only specific types of content:
Search results are always filtered by your permissions. You will only see chunks from documents you have read access to.
  • Owners and Admins can see results from anywhere in the tenant.
  • Users only see results within their authorized paths.
If your requested search scope and your permissions don’t overlap, the search returns an empty list (not an error).