Skip to content

RAG Tools

Curate

Use with a custom RAG flow to send answers to Curate and Analytics. You do not need to pass any options when using with the Seek node.

Parameters

  • question: The User question (optional only if using the Seek node)

  • answer: The provided answer (optional only if using the Seek node)

  • category: The category (numerical - optional)

  • intent: The intent (optional)

  • session_id: A session id (optional)

{{ curate  | question: "" | answer: "" | category: "" | intent: "" | session_id: "" }}

Note

You do not need to pass any options when using with the Seek node.


Categorize

Categorize a question

Parameters

  • question: The text to categorize
{{ categorize  | question: "" }}

Query Cache

Query stored answers from the curate tab

Parameters

  • question: The text to search
{{ queryCache  | question: "" }}

Session History

Grab session history for a sessionId and number of previous turns of the conversation

Parameters

  • sessionId: The session ID

  • turns:

    • text: The number of previous turns of the conversation to return
    • min: 1
    • max: 10
    • step: 1
    • default: 1
{{ sessionHistory  | sessionId: "" | turns: 1 }}

Semantic Score

Run the semantic scoring model

Parameters

  • text: The text to score (leave blank for current input)

  • truth: The ground truth (leave blank for identified sources)

{{ semanticScore  | text: "" | truth: "" }}
Example Usage

{{ semanticScore  | text: "The sky is blue because of science." | truth: "The sky appears blue because when sunlight enters Earth's atmosphere, the tiny air molecules scatter the shorter wavelengths of light like blue more readily than longer wavelengths, causing the blue light to be dispersed across the sky, making it appear blue; this process is called Rayleigh scattering. " }}
- The text we are including is The sky is blue because of science. - The truth documentation we are including is The sky appears blue because when sunlight enters Earth's atmosphere, the tiny air molecules scatter the shorter wavelengths of light like blue more readily than longer wavelengths, causing the blue light to be dispersed across the sky, making it appear blue; this process is called Rayleigh scattering. The Agent Output does not return any values. Click the mAIstro Inspector icon in the top right corner to view the semantic analysis. SS_output


Add Context

Add context to text

Parameters

  • session_id: A session ID for the context. Must use the same as was sent to Curate
{{ addContext  | session_id: "" }}

Generate Embeddings

Create embeddings from input text

Parameters

  • text: Input text. Leave blank to take text flowing into the node instead.

  • model: The embedding Model to use

{{ embeddings  | text: "" | model: "" }}

Context Grammar - In

This node is used only for extracting parts of speech for use in Seek, mAIstro, or other places. This node provides the following variables:
contextGrammar.text: The input text to process.
contextGrammar.language: The name of the identified language.
contextGrammar.langCode: The language code identified from the input text.

{{ contextGrammar  }}

Min Confidence - In

This node is used only for creating a custom minimum confidence message for use in Seek. This node provides the following Seek variables:
minConfMsg.originalQuery: The original user Input
minConfMsg.context: The previous message's context if in a mutli-turn conversation.
minConfMsg.kbContext: The knowledgebase documentation.
minConfMsg.language: The selected or determined language
minConfMsg.langCode: The selected or determined language code
minConfMsg.intent: The selected or determined Intent
minConfMsg.categoryName: The selected or determined category name
minConfMsg.categoryURL: The selected or determined category url

{{ minConfMsg  }}

minTextMsg

undefined


Max Words - In

This node is used only for creating a custom maximum words message for use in Seek. This node provides the following Seek variables:
maxWordsMsg.originalQuery: The original user Input
maxWordsMsg.context: The previous message's context if in a mutli-turn conversation.
maxWordsMsg.language: The selected or determined language
maxWordsMsg.langCode: The selected or determined language code
maxWordsMsg.intent: The selected or determined Intent
maxWordsMsg.categoryName: The selected or determined category name
minConfMsg.maxWordsMsg: The static response set in config

{{ maxWordsMsg  }}

Virtual KB - In

This node is used only for creating a virtual KB for use in Seek. This node must be the first step in a mAIstro virtual KB.

This node provides the following Seek variables:
virtualKbIn.originalQuery: The original user Input
virtualKbIn.contextQuery: The query enhanced with NeuralSeek context keeping.
virtualKbIn.language: The selected or determined language
virtualKbIn.langCode: The selected or determined language code
virtualKbIn.intent: The selected or determined Intent
virtualKbIn.categoryName: The selected or determined category name
virtualKbIn.filter: The filter string used

{{ virtualKbIn  }}

Virtual KB - Out

This node is used only for creating a virtual KB for use in Seek. This node must be the last step in a mAIstro virtual KB.

Parameters

  • context: The trusted information to pass on to the LLM. Pass either a string of plain text or an array.

  • kbCoverage: The coverage score of this kb context 0-100. (optional)

  • kbScore: The confidence score of this kb context 0-100. (optional)

  • url: The primary source URL (optional)

  • document: The primary source document name (optional)

{{ virtualKbOut  | context: "" | kbCoverage: "0" | kbScore: "0" | url: "" | document: "" }}

Seek - In

This node is used only for creating a virtual KB for use in Seek. This node must be the first step in a mAIstro virtual KB.

This node provides the following Seek variables:
seekIn.originalQuery: The original user Input
seekIn.contextQuery: The query enhanced with NeuralSeek context keeping.
seekIn.lastTurn: The chat history as an array of objects.
seekIn.language: The selected or determined language
seekIn.langCode: The selected or determined language code
seekIn.intent: The selected or determined Intent
seekIn.categoryName: The selected or determined category name

{{ seekIn  }}

Seek - Out

This node is used only for returning a custom Seek. This node must be the last step in a mAIstro seek.

Parameters

  • answer: The answer

  • passages: The trusted information you used as an array.

  • kbCoverage: The coverage score of this kb context 0-100. (optional)

  • kbScore: The confidence score of this kb context 0-100. (optional)

  • url: The primary source URL (optional)

  • document: The primary source document name (optional)

{{ seekOut  | answer: "" | passages: "" | kbCoverage: "0" | kbScore: "0" | url: "" | context: "" | document: "" }}

Parameters

  • Answer:
  • Passages: The trusted information you used as an array.
  • kbCoverage: Optional. The coverage score of this KB context from 0-100.
  • kbScore: Optional. The confidence score of this KB context from 0-100.
  • URL: Optional. The primary source URL.
  • Context: Optional.
  • Document: Optional. The primary source document name.