# Integration with AI Features

## **How to Use Vectors in Diaflow Vector Node**

Prerequisites: You have vectors uploaded and an automation flow created.

**Search Data from Vectors:**

<figure><img src="/files/JCBnPfa5Jwu8HTH62zRK" alt=""><figcaption></figcaption></figure>

1. Add Diaflow Vector node to your flow
2. Set Action to “Search data from Vectors”
3. Choose data source:

* All data from vectors: Searches entire knowledge base
* From vector groups: Select specific groups
* From vector files: Select specific files

4. Configure Input field with search query or dynamic reference
5. Connect to LLM node(s) to analysis the data which queried at Diaflow Vector node
6. Setup output and execute the flow

<figure><img src="/files/j8hYkDTSHCHq0DjVDEB4" alt=""><figcaption></figcaption></figure>

**Add Data to Vectors:**

<figure><img src="/files/79ljsT1qZTNaDCJE6Yn1" alt=""><figcaption></figcaption></figure>

<br>

1. Set Action to “Add data to Vectors”
2. Choose Destination:

* Root: Adds to main directory
* Group: Select target group

3. Configure Input with file path or URL
4. Set Advanced Configurations:

* Chunking Method, Chunk Size, and Chunk Overlap

5. Connect LLM model(s)&#x20;
6. Setup output and execute the flow

Expected Result: Data is processed and becomes available for search operations.

<br>

UI Enhancements:

<figure><img src="/files/CKE0ltfWgrmO7bKWRXOt" alt=""><figcaption></figcaption></figure>

* Selected files/groups display count (e.g., “Selected 6 files”)
* View Files/Groups button shows detailed selection list

<br>

## **How to Integrate with Chat Simple Mode**

Prerequisites: You have vectors uploaded and want to create a knowledge-based chatbot.

Steps:

1. Navigate to Chat,  Simple Mode
2. In Knowledge Source section:

* Select Vector data sources from Resource - Vector
* Choose scope: Root, Group, or Files

3. Configure AI Engine (provider, model)
4. Set up personality and prompts
5. Check by asking some questions.
6. Publish your chatbot if you want everyone to be able to access it.

Data Integration:

* Vector context appears as {{vec-0.output}} in prompts
* Follow-up questions consider both conversation and vector context

Expected Result: Chatbot responses include relevant information from your knowledge base.

<br>

## **How to Use Vectors in Page Generation**

Prerequisites: You want to generate documents (blogs, contracts) using your knowledge base.

<figure><img src="/files/qMd0E4mWJanWWhefrsVU" alt=""><figcaption></figcaption></figure>

Steps:

1. Navigate to Page on the sidebar, then generate document type
2. Complete initial input step
3. Click Setting icon
4. Knowledge source screen appears, select data you want to use
5. Setup AI Engine
6. Use a prompt to search the knowledge base you selected
7. AI generates content incorporating vector knowledge

<figure><img src="/files/ltbK8sM7SsYM9sVyucgj" alt=""><figcaption></figcaption></figure>

Source Integration:

* Documents: Summarized paragraphs used as context
* Articles: Main body text provides supporting ideas
* URLs: Text extracted without HTML/scripts
* Groups: Aggregates most relevant vectors

Expected Result: Generated content reflects knowledge from selected vector sources.

<br>


---

# 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.diaflow.io/productivity-tools/diaflow-vectors/how-to-guides/integration-with-ai-features.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.
