Nashir Contact icon

Nashir Contact

Manage contacts and retrieve knowledge from nashir.ai

Search Knowledge Base

AI-generated

Summary

Search the specified business's knowledge base for relevant knowledge chunks matching a customer's question or topic text query and return up to a specified limit of top results.

Inputs

  • Query (required) — The customer's question or topic to search for in the knowledge base as plain text. No embedding is needed prior to this search.
  • Business ID (required) — The ID of the business to scope the knowledge base search to. Must be a positive integer. Typically wired from the webhook payload.
  • Limit — Number of top knowledge chunks to return, between 1 and 10. Defaults to 4.
  • Channel — Optional platform/channel the customer's question arrived on (e.g., whatsapp, facebook, instagram). Used for logging purposes but not required.
  • Raw Customer Message — Optional verbatim customer message. Logged for gap analysis; server falls back to Query if omitted.

Output shape

a list of JSON records representing the top matching knowledge chunks found by the search.

Returns an array of knowledge chunk objects from the business's knowledge base that best match the input Query text. Up to 'Limit' items are returned. The search is performed server-side with embedding and vector similarity, so the user does not need to embed the query. If the Business ID is missing or invalid, the API rejects the request. Channel and Raw Customer Message are logged for monitoring but do not affect the search results.

Links

Discussion