Document management: tags and metadata

Because a knowledge base may contain a large number of documents or FAQs to manage, MaiAgent provides tag management and metadata management features so you can categorize and organize large volumes of documents and FAQs.

Tag Management

When your knowledge base contains a large amount of data, a tag system can help you quickly organize document and FAQ attributes or control reference data permissions. For example:

Product information knowledge base (categorized by product information)
|-- #tent 
|-- #4-person-tent 
|-- #three-season-tent 
|-- #SnowPeak
Tutorial content knowledge base (categorized by permission level)
|-- #non-member
|-- #regular-member 
|-- #VIP

Add Tag

  1. Click the Add button

  1. Enter the tag name

  1. After pressing Add, the tag you just entered will be displayed as follows, including ID, name, etc.

ID can be used when opening document permissions. For details, seeTechnical Manual — Query Metadata Controls

Add a tag to a document

After adding tags, go to the document page

  1. Click Edit File Info

  1. Select tags

Depending on the document's needs, add the corresponding tags (you can select multiple tags)

In this way, the added tags will appear after the corresponding document:

Add tags to an FAQ

If you want to add hierarchical classification or tag management to FAQs, you can:

  1. Enter the FAQ management interface in the knowledge base, select the FAQ to edit, then click the Edit button

  1. Select the tag(s) to add, and after adding click "Confirm"

The added tags will appear in the FAQ field


Tag permission access control

You can control which users see which content based on tags. For example, VIP customers can see more advanced product tutorial demos while non-members only see general tutorial demos.

Both FAQs and documents can apply filters

AND filter

The AND filter selects content that meets all tag conditions simultaneously.

For example: if this conversation relates to tutorials for non-members, you can use tag filters to only open documents that meet both "non-member" and "tutorial" tags for the AI assistant to use.

As shown: after filtering the AI assistant can only use documents about beginner camping, preventing disclosure of unrelated information to non-member conversations.

OR filter

For conversations with members, you can use the OR filter so that documents matching either regular member or non-member can be referenced by the AI assistant:

Members can see more documents than non-members, achieving permission tiering.

You can switch the filtering mechanism by clicking "AND" or "OR" in the tag filter

Refer to the filter results:Internal conversation feature

Document metadata management

What is metadata?

Metadata is like a document's "ID card," recording detailed information about the document to help the system better manage and use these documents.

E.g.: beginner-camping.pdf

Metadata settings:
├── Document version: v2.1
├── Creation date: 2024-03-15
├── Last updated: 2024-11-20
├── Next review: 2025-05-20
├── Updating department: Marketing Department
└── Version status: Reviewed and approved for release

Why use metadata?

When data is large and complex, using metadata helps you more conveniently and quickly maintain data quality and assists you to:

Improve management efficiency

  • Quickly identify document status and version information

  • Be more organized when batch-managing large numbers of documents

  • Reduce the time spent manually searching and verifying

Ensure content quality

  • Use the latest document versions

  • Track document update history and version status

  • Ensure the AI uses the latest and reviewed content

  • Set regular review reminders to maintain data quality

Add metadata to a document

  1. Go to the document page and click Edit Document Info:

  1. Switch to the metadata tab and enter the corresponding metadata

MaiAgent uses key-value pairs to access metadata

After entering, click "Add Metadata" button to add the key-value pairs you just entered (you can add multiple metadata entries at once).

After adding, you will see the metadata you added appear in the field.

Add metadata to an FAQ

  1. Enter the FAQ management interface in the knowledge base, select the FAQ to edit, then click the Edit button

  1. Switch to the metadata page, enter the data and click Add Metadata

After entering all values, click "Confirm"

The added metadata will appear in the FAQ list

url is a reserved word in the metadata system. If you set url: https://...your-specified-url then the url you set will override the original file location when viewing cited snippets in a conversation and instead open the URL you specified.

Before setting url

As below, before setting a url value, clicking a referenced node (e.g.: beginner-camping.pdf) lets you view the original document (you can set in the Inbox whether to allow users to download the original document file):

View referenced node
View original file location

After setting the url (using Google as an example)

Clicking the referenced node file again (camping-notes.txt) will no longer show the document preview but will be overridden to open the Google homepage:

When you set the url field in metadata, users who see the AI assistant reference that document in a conversation can click directly to jump to the link you set to obtain more complete information

Last updated

Was this helpful?