Hybrid search across the Knowledge Base, combining semantic similarity with keyword matching. Returns top-K matched chunks with citations.
Hybrid search across the Knowledge Base, combining semantic similarity with keyword matching. Returns top-K matched chunks with citations.
POST
https://app.softsolz.uk/api/v1/services/smart-chat/kb/searchRecent Requests
Kept only in this browserTimeStatusTook
Send a request with Try it to see it here.
Headers
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
querystringrequiredThe search query.
top_kintegerMax chunks to return (default 6).
document_idsarray of stringsRestrict to specific document ids.
tagsarray of stringsRestrict to documents with these tags.
foldersarray of stringsRestrict to these folders.
Response
Response Body
hitsarray of objectsMatched chunks, most relevant first. `similarity` is the cosine similarity to the query (0-1) and is the field to rank or threshold on; it is null when a chunk was matched by keywords alone. `matched_keywords` is true when the chunk matched the keyword leg. `score` is an internal rank-fusion value whose magnitude carries no meaning outside a single response.modelstring | nullEmbedding model used.usage_tokensinteger | nullEmbedding tokens consumed by the query.Request
curl --request POST \ --url https://app.softsolz.uk/api/v1/services/smart-chat/kb/search \ --header 'Authorization: Bearer sk_live_your_key' \ --header 'Content-Type: application/json' \ --data '{ "query": "refund policy for late payments", "top_k": 6, "tags": [ "policy" ], "folders": [ "legal" ]}'Credentials
Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.
Response · 200
{ "data": { "hits": [ { "document_id": "d0000000-0000-0000-0000-000000000001", "file_name": "refund-policy.pdf", "page_number": 3, "similarity": 0.62, "matched_keywords": true, "score": 0.0328, "snippet": "Refunds for late payments..." } ], "model": "text-embedding-3-small", "usage_tokens": 12 }}