ByteChef LogoByteChef

Knowledge Base

Search ByteChef's internal knowledge base to retrieve relevant document chunks using semantic similarity search powered by vector embeddings.

Categories: Artificial Intelligence

Type: knowledgeBase/v1


Actions

Delete Documents

Name: delete

Delete documents from the knowledge base by metadata filter.

Properties

NameLabelTypeDescriptionRequired
knowledgeBaseIdKnowledge BaseINTEGERThe knowledge base to delete documents from.true
metadataFilterMetadata FilterARRAY
Items [{}]
List of metadata key-value pairs to filter by. Entries within a group are ANDed; groups are ORed.false

Example JSON Structure

{
  "label" : "Delete Documents",
  "name" : "delete",
  "parameters" : {
    "knowledgeBaseId" : 1,
    "metadataFilter" : [ { } ]
  },
  "type" : "knowledgeBase/v1/delete"
}

Output

This action does not produce any output.

Load Data

Name: load

Loads data into the knowledge base.

Properties

NameLabelTypeDescriptionRequired
knowledgeBaseIdKnowledge BaseINTEGERThe knowledge base to load documents into.true
additionalMetadataAdditional MetadataOBJECT
Properties {}
Metadata key-value pairs to attach to the stored documents.false

Example JSON Structure

{
  "label" : "Load Data",
  "name" : "load",
  "parameters" : {
    "knowledgeBaseId" : 1,
    "additionalMetadata" : { }
  },
  "type" : "knowledgeBase/v1/load"
}

Output

This action does not produce any output.

Search Data

Name: search

Query data from the knowledge base. Supports three modes: tag-only search, vector search, or combined tag filtering with vector search.

Properties

NameLabelTypeDescriptionRequired
knowledgeBaseIdKnowledge BaseINTEGERThe knowledge base to search.true
queryQuerySTRINGThe search query for semantic similarity search. Leave empty for filter-only search.false
tagNamesTagsARRAY
Items [STRING]
Filter results by tags. Documents with ANY of the selected tags will be returned (OR logic).false
metadataFilterMetadata FilterARRAY
Items [{}]
List of metadata key-value pairs to filter by. Entries within a group are ANDed; groups are ORed.false
topKTop KINTEGERMaximum number of results to return.false
similarityThresholdSimilarity ThresholdNUMBERMinimum similarity score (0.0 to 1.0). Only results with similarity above this threshold will be returned.false

Example JSON Structure

{
  "label" : "Search Data",
  "name" : "search",
  "parameters" : {
    "knowledgeBaseId" : 1,
    "query" : "",
    "tagNames" : [ "" ],
    "metadataFilter" : [ { } ],
    "topK" : 1,
    "similarityThreshold" : 0.0
  },
  "type" : "knowledgeBase/v1/search"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Update Documents

Name: update

Updates documents in the knowledge base by deleting existing ones matching the selected document or chunk and loading new ones.

Properties

NameLabelTypeDescriptionRequired
updateMultipleUpdate MultipleBOOLEAN
Options true, false
Whether to update multiple documents or chunks.true
knowledgeBaseIdKnowledge BaseINTEGERThe knowledge base to update documents in.true
knowledgeBaseDocumentIdDocumentINTEGER
Depends On knowledgeBaseId
The document to update in the knowledge base.false
knowledgeBaseDocumentChunkIdDocument ChunkINTEGER
Depends On knowledgeBaseDocumentId
The specific chunk to update. If not selected, all chunks of the selected document will be replaced.false
additionalMetadataAdditional MetadataOBJECT
Properties {}
Additional metadata key-value pairs to add to the stored documents.false
metadataFilterMetadata FilterARRAY
Items [{}]
List of metadata key-value pairs to filter by. Entries within a group are AND-ed; groups are OR-ed.false
contentContentSTRINGThe text content to update the knowledge base with. If not provided, uses the configured document reader.false

Example JSON Structure

{
  "label" : "Update Documents",
  "name" : "update",
  "parameters" : {
    "updateMultiple" : false,
    "knowledgeBaseId" : 1,
    "knowledgeBaseDocumentId" : 1,
    "knowledgeBaseDocumentChunkId" : 1,
    "additionalMetadata" : { },
    "metadataFilter" : [ { } ],
    "content" : ""
  },
  "type" : "knowledgeBase/v1/update"
}

Output

This action does not produce any output.

How is this guide?

Last updated on

On this page