Born Digital - Documentation
  • Welcome
    • Welcome to Digital Studio
  • Digital Agent
    • Introduction
    • Workspace
      • List of Projects
      • Project Details
      • Deploy Project
    • Conversation Flow
      • User Interface Basics
      • Nodes Explained
        • MESSAGE node
        • ANSWER node
        • DECISION node
        • FUNCTION node
        • AI node
        • TRANSFER node
        • REDIRECT node
        • START / END nodes
      • Training set
        • Overview
        • Best practices for writing training set
      • Launching project
      • Setting tab
    • Building new projects
      • Knowledge base project
        • Step 1. - Initializing Your Project
        • Step 2. - Integrating AI Node
        • Step 3. - Finalizing with Testing and Training
        • (Optional) - Integrating a Knowledge Base Index
      • Advanced project
        • Step 1. - Establishing Functions
        • Step 2. - Crafting Greetings
        • Step 3. - Adding the AI node
        • Step 4. - Managing Flow Scenarios
        • Step 5. - Finalizing the Project
        • Step 6. - Training and Execution
    • Advanced functions
      • Knowledge base
      • New AI node property variables
      • Recordings
      • Statistics
      • Code editor
      • Widgets
  • For advanced users
    • Conversation design tips
      • Customizing speech synthesis
      • Customizing text output
      • Customizing smart functions output
      • Randomizing message content
      • Alternative messages based on variable values
      • Setting time-based greetings
      • Personalised URL links
      • Custom business statuses with variables
      • String slicing
      • Implementing chat buttons
    • Intent recognition tips
      • Fine-Tuning Intent Recognition using Generative AI
      • Multi-step intent recognition
      • Recognition based on named entity extraction
    • Prompting cookbook
      • Basics
      • Prompting techniques
  • Product changelog
    • Product changelog
  • Initial setup
    • Starting up
    • My settings
  • Contacts
    • Contacts for you
Powered by GitBook
On this page
  • New Automatic Variable Population in AI Node
  • FINAL DOCUMENT Variables:
  • INDEXER Related Variables
  • AI NODE primary variable, where the response of GPT is stored

Was this helpful?

  1. Digital Agent
  2. Advanced functions

New AI node property variables

PreviousKnowledge baseNextRecordings

Last updated 9 months ago

Was this helpful?

We have completed a minor deployment on the Customer-Test environment, specifically related to the indexer functionality. This update introduces important changes that you need to be aware of:

New Automatic Variable Population in AI Node

When using the indexer in the AI node, the following variables are now automatically populated and can be utilized within your workflows:

FINAL DOCUMENT Variables:

  • kb_document_id: Contains the internal ID of the document used. This ID can be used for advanced API calls to the indexer, if needed.

  • kb_document_name: Contains the name of the document used for the final answer.

  • kb_document_url: Contains the URL of the document used for the final answer. This will be empty if the URL is not populated in the document.

Use Case Example: To display to the user which document was used to prepare the answer, you can use the MSG node after the AI node. For instance:

For more information, check this document:
[{kb_document_name}]({kb_document_url})

or

My answer was based on this document:  
[{kb_document_name}]({kb_document_url})

The end result will be a clickable link to the document used for the answer. Ensure the URL is populated in the Knowledge Base tab and is the URL of the original document.

INDEXER Related Variables

The following variables are now available for indexer-related data:

indexer_returned where result of the index search to the indexer is stored. It's json format with

  • list of documents, from which the snippets were found based on the question and snippet size

  • for each document

    1. id of the document

    2. url of the document

    3. name of the document

    4. labels for the document

    5. description = annotation od the document

    6. individual chunks (again, as list)

Use Case Example: For reporting and troubleshooting, you can check which snippets have been found and what document descriptions were used to find the best answer without needing to check technical logs. This can also be used within the flow to work with JSON-structured variables.

AI NODE primary variable, where the response of GPT is stored

The primary variable where the GPT response is stored remains the gpt_response variable. This JSON structure now also includes:

  • gpt_response variable (or however you call the variable in the AI node)

  • Now it also contains these keys:

    1. function_call -> if the AI node used function, you will see it here and use in the flow or troubleshooting. This key contains

      name of the function used

      arguments -> in our case questions, which GPT used to send to indexer

    2. error -> if there was an error response form the AI node/gpt