For the complete documentation index, see llms.txt. This page is also available as Markdown.

Q&A Node

Overview

The Q&A node allows your Virtual Assistant (VA) to access the Indexes you have created in the Knowledge AI tab and generate accurate, context-aware answers based on your content. Instead of relying on predefined intents and entities, it uses your uploaded materials, known as Sources, to dynamically respond to user inquiries. Responses are generated using the Knowledge AI RAG (Retrieval-Augmented Generation) pipeline, which combines Vonage's proprietary Semantic Search with Google Gemini's large language models (LLMs).


Prerequisties

Prerequisite
Details

Knowledge AI tab configured

The Knowledge AI tab must be set up with at least one Index before you configure the Q&A node. For setup instructions, see Knowledge AI.


Limitations

Limitation
Details

Single Index per node

Each Q&A node is restricted to one Index.

Single VA per Index

Indexes are scoped to one VA per API key.

Single-turn processing

The Q&A node processes one input and returns one output. It does not support back-and-forth conversation.

Non-deterministic answer length

Exact control over response length is not guaranteed due to the non-deterministic nature of the LLMs used by Knowledge AI.


Setting up the Q&A Node

To configure the Q&A node:

1

Select an Index

Choose one Index to serve as the knowledge base for that node. Only Indexes created under the API key for the selected VA that are not already in use by another VA appear in the dropdown. Each Q&A node supports one Index. To access different Sources across different parts of your flow, use multiple Q&A nodes and assign a different Index to each.

For more information, see the Group Your Sources to Create Indexes section on the Knowledge AI page.

2

Assign the user query parameter

Select the parameter from the User Query dropdown that captures the user input. Knowledge AI processes this value to generate a response.

3

Capture the output

Under the Output Parameter dropdown, select the parameter to store the generated answer. Pass this parameter into a Speak/Send Message or Collect Input node to deliver the response to the end user.


Exit paths

The Q&A node has four exit paths that determine how your VA flow continues after the node processes a user query.

Exit path
Trigger condition

Knowledge AI response

Knowledge AI successfully retrieves and returns a relevant answer from the knowledge base.

Don't Know

Knowledge AI cannot find a suitable answer in the knowledge base.

Failed

A runtime error occurs, or the waiting time is exceeded.

Clarification Required

Knowledge AI identifies that the user query requires additional context or clarification before a response can be generated. This path is triggered when the input is too ambiguous, incomplete, or brief to retrieve a relevant answer accurately.

Handling the Clarification Required path

When Knowledge AI detects that a query is too ambiguous to process, it triggers the Clarification Required exit path. Use this path to route the user to a follow-up prompt that requests more context. Once the user provides a more complete query, route the flow back to the Q&A node to process the refined input.

The following table shows examples of unclear or incomplete inputs and suggested VA follow-up questions:

User input
Intended meaning
Suggested VA follow-up question

"benefits"

"What is the company benefits policy?"

"What is your question about benefits?"

"work from home policy"

"What is the company's work-from-home policy?"

"Are you asking about eligibility, the application process, or equipment?"

"data privacy EU law"

"What does EU law say about data privacy?"

"Are you asking about GDPR requirements or data processing obligations?"

Clarification Required and Intelligent query prep

The Intelligent query prep switch affects how Knowledge AI interprets queries in the context of conversation history. The Clarification Required exit path is triggered independently by the RAG pipeline when it determines that the query itself is too ambiguous to retrieve a relevant answer, regardless of the switch state.

Configurations

Intelligent query prep (Optional)

The Intelligent query prep switch allows Knowledge AI to understand and respond to follow-up queries based on the ongoing conversation, without requiring the user to restate previous context. This setting is available in both the Q&A node and the Index Tester. To access it in the Index Tester, select the gear icon at the top-right corner of the interface.

Behavior
Intelligent prep query is ON
Intelligent prep query is OFF

Context handling

Enables contextual understanding for follow-up questions. Uses session conversation history to interpret meaning.

Each query is processed independently.

Latency

Adds 300 to 1000 ms as Knowledge AI retrieves and processes context.

No additional latency.

Responses when context is unavailable

N/A

May produce "I don't know" responses if context is required.

Examples

The following tables show examples of how the toggle affects VA responses:

Example 1: Cancellation charges

Speaking party
Intelligent query prep ON
Intelligent query prep OFF

End User

What is the price of an economy ticket?

What is the price of an economy ticket?

VA

It is $1000.

It is $1000.

End User

What are its cancellation charges?

What are its cancellation charges?

VA

Cancellation charges are $250.

Sorry, I don't know.

With Intelligent query prep ON, Knowledge AI uses the conversation history to link "its" to "economy ticket." With Intelligent query prep OFF, the VA treats each query as a new question and cannot infer context.

Example 2: Animals on a plane

Speaking party
Intelligent query prep ON
Intelligent query prep OFF

End User

What animals are allowed on a plane?

What animals are allowed on a plane?

VA

Passengers can bring up to two animals (dogs or cats) in approved containers, either in the cabin or cargo hold.

Passengers can bring up to two animals in approved containers.

End User

Give me more details!

Give me more details!

VA

Containers must not exceed 118 cm (55 × 40 × 23 cm) or 47 in (22 × 16 × 9 in), with a total weight of 8 kg. They must be leak-proof and lined with absorbent material.

Sorry, I don't know.

With Intelligent query prep ON, Knowledge AI uses the conversation history to understand that "more details" refers to the previous answer about animals. With Intelligent query prep OFF, the VA cannot infer context and cannot provide additional information.

Answer length (Optional)

Use Answer length to control how detailed Knowledge AI's responses should be.

Choose whether the response should be:

  • Shorter: suitable for simple answers.

  • Longer: suitable for complex, context-heavy queries.

The minimum is 100 characters or 20 words, with no upper limit. This field is disabled when Output mode is set to Search.

Setting
Behaviour

Not defined

Knowledge AI automatically determines the best answer length based on the query and the knowledge base.

Defined

Knowledge AI treats the value as a soft constraint. The response will generally fall within a small range of the specified value.

Response guidelines (Optional)

Use Response guidelines to set the tone, format, and scope of Knowledge AI responses with custom instructions.

  • Tone: formal, friendly, concise, and similar options.

  • Topic restrictions: prevent the assistant from responding to out-of-scope queries.

  • Custom guardrails: rules for responses based on testing feedback.

  • Company-specific terminology: ensure branding consistency. For example, use "Vonage" instead of "we".

These guidelines help align your assistant's voice with your brand and use case.

Best practices for Response guidelines

Use Response guidelines to define how Knowledge AI should respond, covering tone, structure, and topic scope. This helps ensure responses are clear, accurate, and aligned with your brand.

1. Keep it simple

Start with 3 to 4 key rules. Too many constraints can reduce model performance.

Do not repeat system logic:

  • Do not define the "Don't Know" response. The logic for vague or missing answers is predefined in the backend. Avoid instructions such as: "If the input is vague, say 'I'm not sure'" or "Only provide a found response."

  • Do not define the role. The Q&A node's role is also predefined. Avoid instructions such as: "You are a virtual agent for XYZ handling ABC topic."

2. What to include

When writing custom instructions, focus on the following areas:

Category
What to define
Example

Tone

The tone and style for responses.

Formal, friendly, empathetic, or instructional.

Topic scope

What is in or out of scope.

"Answer only questions about product and billing."

Terminology

Brand or company language.

Use "Vonage" instead of "we."

Custom rules

Guidance based on testing.

Adjust clarity, phrasing, or coverage. Do not include long lists of URLs.

3. Write clear instructions

Provide examples of correct and incorrect responses so Knowledge AI can interpret your intent accurately.

4. Test and refine

Review outputs and adjust your guidelines based on user testing or QA feedback.

Waiting time

Waiting time determines how long the VA waits for a response from Knowledge AI.

  • Default: 3 seconds

  • Configurable range: 2 to 10 seconds


Managing Outputs

The Output mode setting defines how Knowledge AI processes and returns information from your Knowledge Base.

There are two modes available:

  • Search & Respond.

  • Search.

Category
Search & Respond
Search

What it returns

A single, refined text answer ready to send to the end user.

Raw text chunks retrieved from the knowledge base.

Typical output size

100 to 500 characters.

250 to 2500 characters per chunk.

Best for

Customer-facing conversational flows.

Passing retrieved content to another AI process or agent

Answer length and Response guidelines fields

Available

Disabled

Search & Respond

Search & Respond is the default output mode. Knowledge AI searches your knowledge base, passes the retrieved content to an LLM, and returns a single concise answer directly to the end user. Use this mode when you want Knowledge AI to handle both retrieval and response generation automatically.

Output characteristics:

  • Responses are typically 100 to 500 characters long.

  • Answers are short, structured, and optimized for clarity.

  • Best suited for customer-facing conversational use cases.

Search mode retrieves the most relevant text chunks from your knowledge base without generating a summarized response. The raw content is returned for further processing by another AI process, workflow, or agent. Use this mode when Knowledge AI acts as a tool within an AI Agent, or when minimising latency is a priority.

Output characteristics:

  • The output consists of multiple text chunks, typically ranging from 250 to 2500 characters each.

  • The raw text may include long passages or multiple paragraphs.

  • It is not recommended to send this output directly to end users.


Diagnosing Knowledge AI outputs

If Knowledge AI returns incomplete or incorrect answers, check its behavior manually using AI Studio Reports or the upcoming Knowledge AI Insights.

The following table describes common issues and recommended actions:

Problem
Likely Cause
Recommended Action

Ambiguous user question

Query is unclear or incomplete.

Ask the user to clarify or rephrase within the VA flow.

Outside Knowledge Base scope

The Index lacks relevant data.

Add new, relevant material to the Knowledge Base.

Search issue

Information exists but is not being retrieved.

Review and optimize source formatting.

Partial or inaccurate answer

Model retrieved but misunderstood content.

Improve Source structure or revise Response Guidelines.


Using the Q&A Node in your VA

The Q&A node is most effective when used as part of a broader conversational setup. The following are common patterns:

  • Collect Input node, then Q&A node, then return result.

  • Use as a fallback if other nodes fail.

  • Route back to the Q&A node after collecting more context.


Last updated

Was this helpful?