top of page

How to Build an Notion AI Assistant Based on Your Own Notes?

Intro

 

Notion is a powerful tool for managing knowledge. Its flexibility and extensibility make it an excellent personal knowledge library and shared workspace. Many people use it to store their knowledge and work in collaboration with others, facilitating the exchange of ideas and the creation of new knowledge.

However, this knowledge remains static, as users must search for the information they need and read through it to find the answers they're seeking. This process is neither particularly efficient nor intelligent.

Have you ever dreamed of having an AI assistant based on your Notion library? This assistant would not only assist you in reviewing your knowledge base, but also engage in the communication like a seasoned butler, even answering other people's questions as if you were the master of your personal Notion library.

How to Make Your Notion AI Assistant Come True?

Now, you can make this dream come true through Cyberwisdom TalentBot LLMops. Cyberwisdom TalentBot LLMops is an open-source LLMOps (Large Language Models Ops) platform.

Large Language Models like ChatGPT and Claude, have been using their impressive abilities to reshape the world. Their powerful learning aptitude primarily attributable to robust training data. Luckily, they've evolved to be sufficiently intelligent to learn from the content you provide, thus making the process of ideating from your personal Notion library, a reality.

Without Cyberwisdom TalentBot LLMops, you might need to acquaint yourself with langchain, an abstraction that streamlines the process of assembling these pieces.

How to Use Cyberwisdom TalentBot LLMops to Build Your Personal Notion AI Assistant?

 

The process to train a Notion AI assistant is relatively straightforward. Just follow these steps:

  1. Login to Cyberwisdom TalentBot LLMops.

  2. Create a new datasets.

  3. Connect with Notion and your datasets.

  4. Start training.

  5. Create your own AI application.

1. Login to Cyberwisdom TalentBot LLMops

 

Click here to login to Cyberwisdom TalentBot LLMops. You can conveniently log in using your GitHub or Google account.

If you are using GitHub account to login, how about getting this project a star? It really help us a lot!

2.jpg

2. Create new datasets

Click the Knowledge button on the top side bar, followed by the Create Knowledge button.

3.jpg

3. Connect with Notion and Your Knowledge

Select "Sync from Notion" and then click the "Connect" button..

4.jpg

Afterward, you'll be redirected to the Notion login page. Log in with your Notion account.

5.jpg

Check the permissions needed by Cyberwisdom TalentBot LLMops, and then click the "Select pages" button.

6.jpg

Select the pages you want to synchronize with Cyberwisdom TalentBot LLMops, and press the "Allow access" button.

7.jpg

4. Start training

Specifying the pages for AI need to study, enabling it to comprehend the content within this section of Notion. Then click the "next" button.

8.jpg

We suggest selecting the "Automatic" and "High Quality" options to train your AI assistant. Then click the "Save & Process" button.

10.jpg

Enjoy your coffee while waiting for the training process to complete.

9.jpg

5. Create Your AI application

 

You must create an AI application and link it with the knowledge you've recently created.

Return to the dashboard, and click the "Create new APP" button. It's recommended to use the Chat App directly.

11.jpg

Select the "Prompt Eng." and link your notion datasets in the "context".

12.jpg

I recommend adding a 'Pre Prompt' to your AI application. Just like spells are essential to Harry Potter, similarly, certain tools or features can greatly enhance the ability of AI application.

For example, if your Notion notes focus on problem-solving in software development, could write in one of the prompts:

I want you to act as an IT Expert in my Notion workspace, using your knowledge of computer science, network infrastructure, Notion notes, and IT security to solve the problems.

13.jpg

It's recommended to initially enable the AI to actively furnish the users with a starter sentence, providing a clue as to what they can ask. Furthermore, activating the 'Speech to Text' feature can allow users to interact with your AI assistant using their voice.

14.jpg

Finally, Click the "Publish" button on the top right of the page. Now you can click the public URL in the "Overview" section to converse with your personalized AI assistant!

15.jpg

Utilizing API to Integrate With Your Project

Each AI application baked by Cyberwisdom TalentBot LLMops can be accessed via its API. This method allows developers to tap directly into the robust characteristics of large language models (LLMs) within frontend applications, delivering a true "Backend-as-a-Service" (BaaS) experience.

With effortless API integration, you can conveniently invoke your Notion AI application without the need for intricate configurations.

Click the "API Reference" button on the page of Overview page. You can refer to it as your App's API document.

16.jpg

1. Generate API Secret Key

For sercurity reason, it's recommened to create new API secret key to access your AI application.

17.jpg

2. Retrieve Conversation ID

After chatting with your AI application, you can retrieve the session ID from the "Logs & Ann." pages.

18.jpg

3. Invoke API

You can run the example request code on the API document to invoke your AI application in terminal.

Remember to replace YOUR SECRET KEY and conversation_id on your code.

You can input empty conversation_id at the first time, and replace it after you receive response contained conversation_id.

curl --location --request POST 'https://api.Cyberwisdom TalentBot LLMops.ai/v1/chat-messages' \
--header 'Authorization: Bearer ENTER-YOUR-SECRET-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "inputs": {},
    "query": "eh",
    "response_mode": "streaming",
    "conversation_id": "",
    "user": "abc-123"
}'

Sending request in terminal and you will get a successful response.

If you want to continue this chat, go to replace the conversation_id of the request code to the conversation_id you get from the response.

 

And you can check all the conversation history on the "Logs & Ann." page.

3.jpg

Sync with notion periodically

If your Notion's pages have updated, you can sync with Cyberwisdom TalentBot LLMops periodically to keep your AI assistant up-to-date. Your AI assistant will learn from the new content.

4.jpg

Summary

In this tutorial, we have learned not only how to import Your Notion data into Cyberwisdom TalentBot LLMops, but also know how to use the API to integrate it with your project.

Cyberwisdom TalentBot LLMops is a user-friendly LLMOps platform targeted to empower more individuals to create sustainable, AI-native applications. With visual orchestration designed for various application types, Cyberwisdom TalentBot LLMops offers ready-to-use applications that can assist you in utilizing data to craft your distinctive AI assistant. Do not hesitate to contact us if you have any inquiries.

bottom of page