How to Provide AI Instructions for Automated Notion Relations

Helps you craft more effective instructions to improve matching accuracy in AI Auto Relation.

AI Auto Relation uses state-of-the-art AI models to find matching pages in two Notion databases connected by a relation property.

But AI is only effective if we give it quality instructions and data!

In this article, I provide some pointers on how to provide effective instructions to the AI model, so it will do a better job of updating the relations for your databases.

Default AI Instructions in AI Auto Relation

The Basics

In order to give good instructions to the AI, we need to use persistent terminology.

For this, it's first good to understand how AI will actually go about updating the property:

  1. The AI will process each page in the source database that has the relation property we want to automate one by one.
  2. For each page, it will compare it with ALL pages in the target database and determine which are the best matches to use for that particular page.
AI Processing for Determining Relationships

AI Auto Relation will interpret any instructions you supply in the context of comparing one page from the source databases with all pages in the target database.

Thus, you can make it easier for AI to understand your instructions if you use the following terminology:

  • Source Database: The database that contains the relation property to automate. AI is also aware of the name of your source database.
  • Target Database: The database that contains the possible values for the relation property. AI is also aware of the name of your target database.
  • Source Page: The page in the source database it is currently comparing. AI will also be aware of all properties and content of your page (depending on your configuration).
  • Target Pages: The pages in the target database it is currently comparing to the source page. AI will also be aware of all properties and content of your target pages (depending on your configuration).
  • Relation Property: The relation property we automate. AI will also be aware of the name of your property.

Example Instructions

Given the above terminology, here some examples of instructions we could provide the AI with:

  • "Select a maximum of 1 target pages. If no good match is found, return 0."
  • "Select no more than the 3 most closely related target pages."

You can provide even better guidance by giving the AI more information about the databases involved and their relationship. For instance:

  • "The source database contains tasks and the target database projects these tasks may belong to. Each task is only allowed to belong to one project. Some tasks have no projects."

"Talking" to AI

Current AI models such as the GPT models underlying ChatGPT come very close to human comprehension in many tasks.

Therefore, if we want to give clear and effective instructions to AI, it is usually a good strategy to consider if our instructions would be clear to another person.

If you use confusing terminology or your ideas are not clear, AI will struggle to execute what you ask it to do.

It's the same for AI Auto Relation. Try to keep your instructions short, clear and precise.

If you struggle with this, a great tip is that you can use another AI to help you clarify your instructions. Below, I provide a template for a query you could give ChatGPT to improve your AI instructions for AI Auto Relation:

Help me simplify and improve the prompt for an AI system that automatically updates a relation between two databases. The system prefers the following terminology: Source Database: The database that contains the relation property to automate. Target Database: The database that contains the possible values for the relation property. Source Page: The page in the source database it is currently comparing. AI will also be aware of all properties and content of your page. Target Pages: The pages in the target database it is currently comparing to the source page. Relation Property: The relation property we automate. The AI system will iterate through all source pages and compare them with all target pages to identify the most closely related ones.
Here is my prompt so far: [your instructions]

Step by Step to Success

Giving clear instructions to AI is as much art as it is a science and it is definitely not easy.

Therefore it is usually good if you experiment first with a small subset of your data until you are satisfied AI Auto Relation is relating pages in the way you intend.

Another factor is the quality of the data in your Notion databases. AI can't work magic, and if the data in your databases is unclear it will be difficult for AI Auto Relation to set the right relations.

It can be especially helpful to review the pages in your target database and consider if it will be easy for AI to parse and identify relations.

Don't be discouraged if AI Auto Relation links the 'wrong' pages. With some experimentation and fine-tuning is is usually possible to get it to do what you want it to do.

And if you need any help, always be welcome to reach out and I will be happy to help!