# Step 2. - Integrating AI Node

With the initial setup complete, the next stride involves incorporating a [Generative AI intent recognition](https://docs.borndigital.ai/for-advanced-users/intent-recognition-tips/fine-tuning-intent-recognition-using-generative-ai). This addition enriches customer interactions by enabling recognition of greetings or conversation conclusions, thus enhancing user experience with responsive engagement.

**Defining Fallbacks**

A fallback mechanism is crucial when specific intents are unrecognizable. In such cases, the interaction defaults to a ['AI' node](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/ai-node), ensuring the customer receives pertinent responses to their inquiries.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2FxyVCDpxZ2WDhK58yhIhd%2FBD_simple_two.gif?alt=media&#x26;token=d120c34c-ced6-4eda-b56e-0f7ef69bad19" alt=""><figcaption><p>Step 2: - Adding the intent and AI node</p></figcaption></figure>

<details>

<summary>Step-by-step guide</summary>

1. **Access an 'Answer' Node**: Initiate by selecting an existing 'Answer' node.
2. **Generate a New Intent**: Employ Generative AI intent recognition to create a 'goodbye' intent.
3. **Establish a Fallback**: Set up a fallback 'AI' node for unrecognizable queries.
4. **Create an 'END' Node**: Designate this as the target for the 'goodbye' intent.
5. **Configure the 'AI' Node**: Tailor the system message to meet your requirements.
6. **Incorporate a Follow-Up 'Message' Node**: Position this after the 'AI' node to query additional customer questions.
7. **Link for Continuous Interaction**: Connect this 'Message' node back to the 'Answer' node, enabling an infinite interaction loop.

</details>

**Implementing AI Node**

An[ 'AI' node](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/ai-node) is established with a predefined system message (for details, refer to the [linked resources](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/ai-node)). Post-response, a subsequent ['Message' node](https://docs.borndigital.ai/digital-agent/conversation-flow/nodes-explained/message-node) inquires if the customer has further questions, linking back to the 'ANS\_ask' node to foster a continuous dialogue loop. This structure is pivotal for crafting a seamless ask-and-answer loop within the virtual assistant, laying the groundwork for our [Conversation Flow builder](https://docs.borndigital.ai/digital-agent).

**Proceeding to Further Development**

As this step lays the foundational AI integration, it's crucial to progress to [STEP 3 - Training and Testing Your Project](https://docs.borndigital.ai/digital-agent/building-new-projects/knowledge-base-project/step-3.-finalizing-with-testing-and-training), to refine and validate the system's functionality.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.borndigital.ai/digital-agent/building-new-projects/knowledge-base-project/step-2.-integrating-ai-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
