..
2025-05-24 12:27:45 -05:00
2025-05-24 12:27:45 -05:00
2025-05-24 12:27:45 -05:00

CQA Retriever

This package provides an example RAG process using Azure AI Search for Retrieval and the Verint DaVinci Contextual Question Answer (CQA) Service.

What's New: Updated [24/05/2025]

  • Initial Release

Setup Instructions

Prerequisites

  • This package requires the CQA Widget to be installed and configured.

Installation

  1. Copy the CQA_Retriever and CQA_RetieverSettings files into Global Variables
  2. Optional: Import the Example Conversation Flow and Intent

Configuration

CQA_RetieverSettings

Fill out the settings below.

{
  "azure_aisearch": {
    "endpoint": "https://iva-demo-vector-service.search.windows.net",
    "key": "<azure_aisearch_key>",
    "index_name": "iva-vector-demo"
  },
  "azure_openai_api": {
    "key": "<azure_openai_key>",
    "instance_name": "iva-open-ai",
    "deployment_name": "text-embedding-3-small",
    "embeddings_deployment_name": null,
    "version": "2024-08-01-preview"
  },
  "filterExpression": "search.in(company, 'Verint')",
  "debug": true
}

Package Content Details

CQA_RetieverSettings

A global variable JSON object with environment-specific settings. See above for details.

CQA_Retriever

A global variable function which handles the logic and API calls used to retrieve documents for Context.

Example code block that should be using in your Conversation Flows

This is included in the Example Conversation Flow if you have imported that.

(async () => {
  console.log(`CQA Retrieval: ${conversationData.cqa_question}`);
  conversationData.cqa_source = await CQA_Retriever().retrieve(
    conversationData.cqa_question
  );
})()
  .catch((error) => {
    console.log(error.message);
    recognizedObject.answers.push(error.message);
    recognizedObject.errorInfo = {
      ...recognizedObject.errorInfo,
      label: {
        data: error.toJSON ? error.toJSON() : {},
        message: error.message,
      },
    };
  })
  .finally(() => {
    next(0);
  });