Tổng quan

AI: Cơ sở tri thứcProfessional Edition+

Introduction

AI knowledge base nodes allow workflows to manage knowledge base documents directly. When business data changes, you can synchronize added, updated, and deleted records to the knowledge base, keeping knowledge base content aligned with your business collections.

This documentation uses a Q&A scenario as an example: administrators maintain standard answers and common phrasings for each answer. Workflows synchronize the answer body and related questions to the same target knowledge base, so AI employees or other processes can later use those knowledge base documents.

Example scenario

The example uses two business collections:

  • Answers: stores answer content that can be synchronized to the knowledge base
  • Questions: stores common phrasings related to each answer

Answers is the source collection for knowledge base documents. When an answer is added, a document is created. When an answer is changed, the document is updated. When an answer is deleted, the document is removed.

Questions is not an independent source of knowledge base documents. It is attached to answers through the Answers.questions relation field and supplements the different phrasings that can point to the same answer.

Before synchronization, prepare a Local knowledge base. You can name it according to your environment. The Create, Update, and Delete workflows only need to select the same knowledge base.

Answers collection structure

Answers mainly uses three fields:

  • Title: used as the knowledge base document name
  • Content: used as the knowledge base document body
  • questions: relation to the Questions collection for related questions

questions is a one-to-many relation field. Its source collection is Answers, target collection is Questions, both source key and target key use ID, and the foreign key is stored in Questions.

This relation field is preloaded when creating and updating documents. It writes related questions into Related questions, so one answer can be retrieved not only by body text but also by common phrasings.

Tip

If your knowledge base documents do not need related questions, you do not need a relation field like questions. A stable Key field and body content are enough for create, update, and delete synchronization.

Workflow responsibilities

The core of this example is three synchronization workflows. They process the same Answers data and write to the same target knowledge base:

ScenarioTriggerNodePurpose
Add answerAnswers collection After record addedCreate documentWrite the new answer to the AI knowledge base
Update answerAnswers collection After record updatedUpdate documentUpdate the document by the same Key
Delete answerAnswers collection After record deletedDelete documentDelete the document by the same Key

Key is the most important field in the synchronization chain. Create, update, and delete workflows must use the same Key rule. The example directly uses the record ID of the Answers collection.

Operation guides

Verify the synchronization chain

After configuring the Create, Update, and Delete workflows, use the same Answers record to verify the full synchronization chain.

After adding an answer, check in this order:

  1. Go to Documents in the target knowledge base, confirm that the new document appears, and check that Status is Success. See knowledge base document management for details.
  2. Click Segments for the document and confirm that Related questions includes common phrasings from Answers.questions. See segment management for details.
  3. Go to Hit tests, enter a keyword from the answer body or a related question, and confirm that the synchronized answer can be hit. See hit tests for details.

After the add synchronization is correct, update the same Answers record and confirm that the target knowledge base document changes. Finally, delete the record and confirm that the corresponding document is removed from the target knowledge base.