Defining Smart Rules through Knowledge Scope Rules

Purpose

Each Space represents a specific use case, and different use cases require different files. By specifying Knowledge Scope rules, users can ensure they only interact with relevant files.

Smart Rules do not replace the access rights on folder level. They just offer an additional layer of filtering on top of access rights filtering.

What can be filtered?

All metadata defined for an uploaded file can be used for filtering. Any user with access to the knowledge base can view a file's metadata when examining its chunks. For instance, the following properties of the file could be used for filtering:

Screenshot 2024-09-16 at 15.19.30.png
All keys on the metadata object can be filtered when creating smart rules

 

Some of the default file properties have been added as options to the Knowledge Scope Rules UI when creating a smart rules, while still allowing users to type in a custom rule property.

Screenshot 2024-09-18 at 13.39.55.png

Define Knowledge Scope Rules

Note: Knowledge scope rules apply to all AI assistants designed for internal document search, except for the following: Context Memory Search, Document Summarizer, and Investment Research Assistant.

The Knowledge Scope Rules interface is part of the Space Management and lets the user define smart rules on their space that will have an impact on what files the space takes into account when performing a search. 

In the space management section there is a new section called Knowledge Scope Rules.

The user can easily create new Knowledge Scope Rules by either typing a name for the scope or clicking on "Create Knowledge Scope Rules."

Rule vs group

After entering a name for the Knowledge Scope, the user can now define rules and groups.

  • A Rule targets a specific property. Each file uploaded in Unique has predefined properties, such as Folder Path, MIME Type, or Title. Additionally, there can be custom properties from external sources, which may vary by company. Therefore, the user can enter any property name.

  • A Group is a combination of two or more rules that are evaluated together

Examples

  1. Rules only:

  1. Rule + Group:

File Path filter

When selecting the “File Path” property for a smart rule, the user can specify the file path and browse through all folders and files to find the right files that should be added to the smart rule. 

The user can also select whether all files located directly in the selected folder should be filtered (“is in folder” option), or if all files in the subfolders of the selected folder should be filtered as well (“is in folder and subfolders” option).

When clicking Specify the user can select a folder path like so:

And after confirming the the selected folder path the path is shown in the smart rule

Custom rule property

It is possible to define a custom rule property. Depending on where the file is coming from, we have different metadata available.

For example a file coming from confluence has a url property:

This url property could be used to define a Smart Rule. For confluence pages that could be useful for allowing the user to chat against files in a specific confluence space.

A smart rule could look like this:

Knowledge Scope Preview Mode

When creating a Knowledge Scope with smart rules, the user can click the "Preview" button. This will display a preview of all the files filtered by the currently defined smart rules.

Knowledge Scope vs Folder Access

It is important to remember that files are filtered not only by Knowledge Scope rules but also by the folder access rights defined in the knowledge base. Therefore, if a user defines a Knowledge Scope rule for a specific folder and intends to target a particular group of people, the user must ensure that all those individuals have access to that folder.

Folder path filtering for files uploaded before Sep. 18th 2024

At the moment, two requests to the node-ingestion API (markAllForRebuildingMetadata and rebuildMetadata) must be manually executed to rebuild all metadata and add the folderIdPath property for files uploaded before September 18, 2024.

Otherwise only files uploaded after September 18, 2024 will be filtered by the knowledge scope rules.

 


Author

@Thea Kitzinger

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service