Knowledge Management Permissions (Query Metadata) Overview
Feature Description
When implementing an AI dialogue system, detailed control over the available scope of "Knowledge Base / AI Assistant / Chat Platform" is usually needed due to different user permissions and usage requirements.
In MaiAgent, you can use Query Metadata attached to different conversation/identity levels to determine "what content this person/conversation can reference".
What is Query Metadata?
Query Metadata is a set of dynamic conditions that limit the query scope, specifying what "Knowledge Base, FAQ, documents matching tag conditions" and other data content users can query under a certain chat platform.
It doesn't replace roles or contacts, but rather makes these identities "work conditionally", implementing conversation-level least privilege control.
Roles/Contacts/Conversations are containers, Query Metadata is the actual condition settings that control visible scope
Permission Level Concept
Before service construction, Agent confirms all available knowledge bases through Query Metadata at different levels, with permission levels referenced in the following order:
AI Assistant > Chat Platform > User (Message/Contact/Role) > query_metadata > Query Permissions
You can specify permissions at each level using either graphical interface or JSON format
Reference these documents for operation:
Contact/Role are identity containers
Message corresponds to controlling which knowledge bases to use during internal conversations through filtering
query_metadata
is the "filter condition set" actually executed during conversations
Document Filter Condition Decision Levels

The open filtering logic is:
Through layer-by-layer transmission, Query Metadata becomes the actual decision basis for AI response logic
Practical Application Scenarios
Visitor
Knowledge Base: General
File Documents: None
Tags: Visitor
FAQ: 1
, 2
Get documents with Visitor
tag from General
knowledge base and FAQ 1
, FAQ 2
Regular Member
Knowledge Base: General
File Documents: A
, B
, C
Tags: None
FAQ: None
Get documents A
, B
, C
from General
knowledge base and all FAQs
Customer Service
Knowledge Base: Employee
File Documents: None
Tags: CS
FAQ: None
Get documents tagged as CS
from Employee
knowledge base and all FAQs
Internal Employee
Knowledge Base: Employee
File Documents: A
, B
Tags: None
FAQ: None
Get documents A
, B
from Employee
knowledge base and all FAQs
Administrator
Knowledge Base: Employee
, General
File Documents: None
Tags: None
FAQ: None
Get all document content and FAQs from Employee
and General
knowledge bases
Summary: The Value of query_metadata for Enterprises
🎯 Multi-dimensional Identity Cross-Control (Role + Region + Product Line)
🎯 Real-time Query Control: No need to copy assistants, just change conditions to adapt to different scenarios
🎯 Flexible Large Knowledge Base Management: Tags and knowledge bases can be split and authorized according to scenarios
It is recommended to incorporate query_metadata into the core product architecture, allowing enterprises to achieve maximum authorization flexibility with minimum settings, ensuring knowledge security while improving conversation experience and operational efficiency.
Last updated
Was this helpful?