Skip to main content

@wildix/wim-knowledge-base-client > SearchKnowledgeBaseInput

SearchKnowledgeBaseInput interface

Signature:

export interface SearchKnowledgeBaseInput 

Properties

Property

Modifiers

Type

Description

companyId?

string | undefined

(Optional) The unique identifier of the tenant when a service token is used.

knowledgeBaseId

string

Unique identifier of the knowledge base

query

string

The search query string. Can be a single keyword or a natural language question. Example: 'What is the product knowledge base?'

searchLimit?

number | undefined

(Optional) Maximum number of search results to return. Controls the size of the result set. Valid range: 1-50. Defaults to 10 if not specified. Higher values return more results but may include less relevant matches

searchStrategy?

SearchStrategy | undefined

(Optional) Search algorithm strategy: 'bm25' (full-text keyword search), 'vector' (semantic similarity search using embeddings), 'hybrid' (combines both methods for best results). Defaults to 'hybrid' if not specified

searchThreshold?

SearchThresholdValue | undefined

(Optional) Minimum similarity required for results to be included.

sessionUri?

string | undefined

(Optional) The session URI. Used for tracking and analytics purposes. Example: chatbots://\{agentId\}/id-of-chat-session/id-of-message

sessionUser?

string | undefined

(Optional) The user who performs the search in the knowledge base. Example: user@example.com or Jon Doe

useQueryOptimization?

boolean | undefined

(Optional) Whether to optimize and transform the input query using advanced NLP techniques before searching. Improves search quality for complex or poorly phrased queries. Defaults to false. Set to true for better results with natural language questions