OpenDialog Docs
opendialog.aiStart BuildingTalk to an expert
  • GETTING STARTED
    • Introduction
    • Getting ready
    • Billing and plans
    • Quick Start AI Agents
      • Quick Start AI Agent
      • The "Start from Scratch" AI Agent
        • Chat Management Conversation
        • Welcome Conversation
        • Topic Conversation
        • Global No Match Conversation
        • Supporting LLM Actions
        • Semantic Classifier: Query Classifier
      • A Process Handling AI Agent
  • STEP BY STEP GUIDES
    • AI Agent Creation Overview
    • Add a new topic of discussion
    • Use knowledge sources via RAG
    • Adding a structured conversation
    • Add a 3rd party integration
    • Test and tweak your AI Agent
    • Publish your AI Agent
  • CORE CONCEPTS
    • OpenDialog Approach
      • Designing Conversational AI Agents
    • OpenDialog Platform
      • Scenarios
        • Conversations
        • Scenes
        • Turns and intents
      • Language Services
      • OpenDialog Account Management
        • Creating and managing users
        • Deleting OpenDialog account
        • Account Security
    • OpenDialog Conversation Engine
    • Contexts and attributes
      • Contexts
      • Attributes
      • Attribute Management
      • Conditions and operators
      • Composite Attributes
  • CREATE AI APPLICATIONS
    • Designing your application
      • Conversation Design
        • Conversational Patterns
          • Introduction to conversational patterns
          • Building robust assistants
            • Contextual help
            • Restart
            • End chat
            • Contextual and Global No Match
            • Contextual FAQ
          • Openings
            • Anatomy of an opening
            • Transactional openings
            • Additional information
          • Authentication
            • Components
            • Example dialog
            • Using in OpenDialog
          • Information collection
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
          • Recommendations
            • Components
            • Example dialog
            • Additional information
          • Extended telling
            • Components
            • Example dialog
            • Additional information
          • Repair
            • Types of repair
            • User request not understood
            • Example dialog
            • Additional information
          • Transfer
            • Components
            • Example dialog
            • Additional information
          • Closing
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
        • Best practices
          • Use Case
          • Subject Matter Expertise
          • Business Goals
          • User needs
            • Primary research
            • Secondary research
            • Outcome: user profile
          • Assistant personality
          • Sample dialogs
          • Conversation structure
          • API Integration Capabilities
          • NLU modeling
          • Testing strategy
          • The team
            • What does a conversation designer do
          • Select resources
      • Message Design
        • Message editor
        • Constructing Messages
        • Message Conditions
        • Messages best practices
        • Subsequent Messages - Virtual Intents
        • Using Attributes in Messages
        • Using Markdown in messages
        • Message Types
          • Text Message
          • Image Message
          • Button Message
          • Date Picker Message
          • Audio Message
          • Form Message
          • Full Page Message
          • Conversation Handover message
          • Autocomplete Message
          • Address Autocomplete Message
          • List Message
          • Rich Message
          • Location Message
          • E-Sign Message
          • File Upload Message
          • Meta Messages
            • Progress Bar Message
          • Attribute Message
      • Webchat Interface design
        • Webchat Interface Settings
        • Webchat Controls
      • Accessibility
      • Inclusive design
    • Leveraging Generative AI
      • Language Services
        • Semantic Intent Classifier
          • OpenAI
          • Azure
          • Google Gemini
          • Output attributes
        • Retrieval Augmented Generation
        • Example-based intent classification [Deprecated]
      • Interpreters
        • Available interpreters
          • OpenDialog interpreter
          • Amazon Lex interpreter
          • Google Dialogflow
            • Google Dialogflow interpreter
            • Google Dialogflow Knowledge Base
          • OpenAI interpreter
        • Using a language service interpreter
        • Interpreter Orchestration
        • Troubleshooting interpreters
      • LLM Actions
        • OpenAI
        • Azure OpenAI
        • Output attributes
        • Using conversation history (memory) in LLM actions
        • LLM Action Analytics
    • 3rd party Integrations in your application
      • Webhook actions
      • Actions from library
        • Freshdesk Action
        • Send to Email Action
        • Set Attributes Action
      • Conversation Hand-off
        • Chatwoot
    • Previewing your application
    • Launching your application
    • Monitoring your application
    • Debugging your application
    • Translating your application
    • FAQ
    • Troubleshooting and Common Problems
  • Developing With OpenDialog
    • Integrating with OpenDialog
    • Actions
      • Webhook actions
      • LLM actions
    • WebChat
      • Chat API
      • WebChat authentication
      • User Tracking
      • Load Webchat within page Element
      • How to enable JavaScript in your browser
      • SDK
        • Methods
        • Events
        • Custom Components
    • External APIs
  • Release Notes
    • Version 3 Upgrade Guide
    • Release Notes
Powered by GitBook
On this page
  • Creating the Knowledge Base
  • Mapping Intents
  • Testing the Interpreter
  • Using the interpreter for an intent
  • Preview
  1. CREATE AI APPLICATIONS
  2. Leveraging Generative AI
  3. Interpreters
  4. Available interpreters
  5. Google Dialogflow

Google Dialogflow Knowledge Base

PreviousGoogle Dialogflow interpreterNextOpenAI interpreter

Last updated 11 months ago

The OpenDialog Dialogflow integration allows us to use Dialogflow knowledge bases to add FAQ capabilities with NLU in your conversational application.

Creating the Knowledge Base

Follow more detailed instructions in the to create a knowledge base and document.

For this particular example, we'll create a delivery knowledge base. Navigate to the Knowledge Bases in Dialogflow and create a knowledge base that is a FAQ knowledge type. You may use the document attached below as your knowledge base for your delivery related questions and answers. Once you have uploaded the CSV and added a response, your Delivery knowledge base should be similar to the one shown below.

Mapping Intents

Now navigate back to the interpreters section in OpenDialog and select the Dialogflow interpreter that you had setup in the previous section. Once selected you will then need to adjust the intent mapping. The incoming user intent name is intent.dialogflow.faq and that should be mapped to the knowledge base intent as shown in the figure below. This mapping will convert any Knowledge.KnowledgeBase.* intent from Dialogflow intent the intent.dialogflow.faq intent in OpenDialog.

Testing the Interpreter

Now that the interpreter is configured to integrate with the Dialogflow knowledge base, it can be tested via the "Check Interpreter Setup" in the bottom right. Enter an utterance such as "how long will shipping take?" and you should see that it was interpreted. It's useful to note the confidence percentage here, as this will be used shortly.

Using the interpreter for an intent

Now that you've configured and tested your Dialogflow interpreter using the Knowledge Base you'll want to make use of it for intent matching.

You can add an FAQ turn to any scene. In this example we are adding it to the Welcome scene. The welcome scene has a welcome turn with an app welcome message.

Create a new turn in the called "FAQ".

In this turn you'll create a single user request intent for the question and a single application response intent for the answer.

First add a user request intent to match intent.dialogflow.faq (this is the intent OpenDialog generates when Dialogflow successfully matches a pair). Your sample utterance can be anything, in this case we use [faq_question].

It's important to note that the confidence level for the intent should be less than what was returned in our test. If FAQ interprets an intent with a confidence higher than our threshold, OpenDialog will disregard it. A general practice when working with the Dialogflow knowledge base is to set it to about 40%. After you've set up the intent, make sure to save it.

The intent that was just created captures the user's question. Let's now create an intent to return the answer to that question. Create an application response intent in the same turn.

After you've saved the response intent, edit the message. Delete the text message and add a custom attribute message.

Make sure to save the message.

Preview

Now that the interpreter is set on the user intent and an application intent has been created to return the answer, everything is in place see the Dialogflow Knowledge Base interpreter working in "Preview".

After the webchat widget loads, if you send a message such as "how long will shipping take?", you should see that an answer is returned to you. This means that OpenDialog successfully interpreted and matched the new user intent (if it didn't you'll get a no match error message), and then matched the new application intent.

You can keep trying this with other question-answer pairs that were included in your knowledge base.

Then adduser.dialogflow_messagein your XML snippet within the attribute message tags. By default all attributes are stored in the user context, unless they are mapped in . The attribute dialogflow_message is created by OpenDialog and will contain the answer from the matched Dialogflow Knowledge Base pair.

expected attributes
knowledge bases how-to
1KB
DeliveryKnowledgeBase.csv
DialogFlow Knowledge Base Demo
Mapping FAQ intents