1. Tasks
  2. Search Knowledge Library

Tasks

Search Knowledge Library

Searches through your knowledge library.

Basic usage

Search all of your knowledge library articles for ~~stubpost.message.

loading...

Parameters

branch
required
string

the branch to search in


query
Object

the query to search with

Show child attributes
text_small
Object

the text_small query, corresponding to the text_small vector

Show child attributes
content
required
string

the string/text content of the text_small query

gpt_assist
Object

optional gpt_assist configuration for the text_small query, this will enrich the query with GPT

Show child attributes
model
string

the model for the gpt_assist

Default: gpt-4o

system_prompt
string

the system prompt for the gpt_assist. We will use this as the system prompt when enriching the query with GPT


filter
Object

allows filtering of the search using arbitrary data

Show child attributes
by_categorization
Object
Show child attributes
knowledge_library
Object

filter by knowledge library categorization

Show child attributes
enabled
boolean

whether to enable the knowledge library filter

libraries
StringBooleanMap

the libraries to filter by

rooms
StringBooleanMap

the rooms to filter by

shelves
StringBooleanMap

the shelves to filter by

by_score
Object

filter by score

Show child attributes
min_threshold
number

the minimum score threshold for the search


return
Object

the return configuration, controls what data this task returns

Show child attributes
limit
number

the maximum number of results to return

results_array_key
string

the key to use for the results array in the return payload

debug
boolean

whether to return debug information

item_structure
Object.<string, string>
string

allows modifying the structure of the returned items using variable substitution

gpt_assist
Object

optional gpt_assist configuration for the returned results, this will summarize the results. See gpt_assist in the return payload

Show child attributes
model
string

the model for the gpt_assist

system_prompt
string

the system prompt for the gpt_assist, which will be used to summarize all the results into a single text response


Result

loading...

Properties

results
Array.<Object>

an array of matching points that were found.

if params.return.results_array_key is set, the results will be under that key instead of results

Show child attributes
score
float

how closely the snippet matched the query

payload
Object

object containing additional data that was stored along with the point

Show child attributes
article
Object

contains info about the article this snippet came from

Show child attributes
articleuuid
string

the unique identifier for the article

categorization
Object

categorization details for the article

Show child attributes
knowledge_library
Object
Show child attributes
library
string

what library the article is in

room
string

what room the article is in

shelf
string

what shelf the article is in

details
Object
Show child attributes
name
string

the name of the article the snippet belongs to

snippet
Object

represents a small part of the article that matched the query

Show child attributes
text_small
Object
Show child attributes
content
string

the piece of text that matched the query

hash
string

the hash of the text that matched the query


gpt_assist
Object

object containing the summarized gpt assist response

Show child attributes
content
string

if return.gpt_assist is set, this will be the summarized gpt assist response


debug
Object

if return.debug is set, this will contain debug information.

This can be useful to understand how query.text_small.gpt_assist was used in the search.


Examples

Advanced usage of gpt_assist, filter and return params

loading...

Result

loading...