Tasks
Search Knowledge Library
Searches through your knowledge library.
Overview
This task allows you to search for snippets from knowledge library articles.
Typically you'll supply a query in text and the task will return matching snippets from any articles in the rooms & shelves that you specify.
This task allows building AI Agents with access to large amounts of information and documents.
See the debug block for a visual way to debug this task.
Basic usage
Search all of your knowledge library articles for ~~stubpost.message
.
Parameters
required string
branch the branch to search in
Object
query the query to search with
Show child attributes
Object
text_small the text_small query, corresponding to the text_small vector
Show child attributes
required string
content the string/text content of the text_small query
Object
ai_enrich optional configuration for enriching the text_small query with AI
Show child attributes
string
model the model to use for the ai_enrich
Default: gpt-4o
string
system_prompt the system prompt used to enrich the query
Object
filter allows filtering of the search using arbitrary data
Show child attributes
Object
by_categorization Show child attributes
Object
knowledge_library filter by knowledge library categorization
Show child attributes
boolean
enabled whether to enable the knowledge library filter
StringBooleanMap
libraries the libraries to filter by
StringBooleanMap
rooms the rooms to filter by
StringBooleanMap
shelves the shelves to filter by
Object
by_score filter by score
Show child attributes
number
min_threshold the minimum score threshold for the search
Object
return the return configuration, controls what data this task returns
Show child attributes
number
limit the maximum number of results to return
Object
rerank optional reranking configuration for the returned results
Show child attributes
boolean
enabled whether to enable reranking
string
query_with which query content to use for reranking, one of text_small
or ai_enrich
, defaults to text_small
number
limit optional limit for how many snippets to return after reranking
string
results_array_key the key to use for the results array in the return payload
boolean
debug whether to return debug information
Object.<string, string> string
item_structure allows modifying the structure of the returned items using variable substitution
Object
ai_summarize optional configuration for summarizing the results with AI, see ai_summary
Show child attributes
string
model the model to use for the ai summary
string
system_prompt the system prompt used to summarize the results
Result
Properties
Array.<Object>
results 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
float
score how closely the snippet matched the query
Object
payload object containing additional data that was stored along with the point
Show child attributes
Object
article contains info about the article this snippet came from
Show child attributes
string
articleuuid the unique identifier for the article
Object
categorization categorization details for the article
Show child attributes
Object
knowledge_library Show child attributes
string
library what library the article is in
string
room what room the article is in
string
shelf what shelf the article is in
Object
details Show child attributes
string
name the name of the article the snippet belongs to
Object
data any additional data stored with the article
Object
snippet represents a small part of the article that matched the query
Show child attributes
Object
text_small Show child attributes
string
content the piece of text that matched the query
string
hash the hash of the text that matched the query
Object
ai_summary object containing the summary of all results, only returned if return.ai_summarize
is set
Show child attributes
string
content the summary of all results
Object
debug if return.debug
is set, this will contain debug information.
This can be useful to inspect the internals of the task, and is required to use the search_knowledge_library_debug block.
Examples
Advanced usage of ai_enrich
, filter
and return
params
Result