Skip to content

Semantic search

Query your collections using natural language or pre-computed vectors to find semantically similar documents.

Provide a natural language query and the server generates the embedding automatically, then searches for similar documents.

{
"query": "How do I configure SSL certificates?",
"limit": 5,
"threshold": 0.7
}

Provide a pre-computed embedding vector for direct similarity search. Use this when you’ve already generated embeddings in your application.

{
"vector": [0.1, 0.2, 0.3, "..."],
"limit": 5,
"threshold": 0.7
}
ParameterRequiredDefaultDescription
queryYes*Natural language search query
vectorYes*Pre-computed embedding vector
limitNo5Maximum results to return (1—20)
thresholdNo0.7Minimum similarity score (0—1)
includeEmbeddingsNofalseInclude embedding vectors in results

* Use either query or vector, not both.

Results include the document content, similarity score, and metadata:

{
"results": [
{
"documentId": "doc-123",
"content": "To configure SSL certificates...",
"similarity": 0.92,
"metadata": { "source": "docs", "page": "/ssl-setup/" }
}
]
}

The threshold parameter controls the minimum similarity score for returned results.

  • Lower values (0.5) — return more results with less relevance
  • Higher values (0.9) — return only highly relevant matches
  • Default (0.7) — a balanced starting point for most use cases

Start with the default and adjust based on the quality and quantity of your results.

Assign collections to agents so they can search your knowledge bases during conversations. This enables retrieval-augmented generation (RAG), grounding agent responses in your data rather than relying solely on the model’s training data.