> For the complete documentation index, see [llms.txt](https://docs.clickai.vn/clickai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickai.vn/clickai-docs/clickai-docs-en/database/manage-document-metadata.md).

# Manage Document Metadata

## Table of Contents

·       \[What is Metadata?]\(#what-is-metadata)

·       \[Manage Metadata Fields]\(#manage-metadata-fields)

·       \[Edit Metadata]\(#edit-metadata)

·       \[Filter Documents with Metadata]\(#filter-documents-with-metadata)

·       \[FAQ]\(#faq)

&#x20;

## What is Metadata?

### Overview

Metadata is supplementary descriptive information attached to documents in a Knowledge Base. Metadata allows you to categorize, organize, and filter documents, significantly improving retrieval accuracy.

### Core Concepts

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Concept</td><td valign="top">Description</td><td valign="top">Example</td></tr><tr><td valign="top">Field</td><td valign="top">The label of a metadata field</td><td valign="top">"author", "language", "category"</td></tr><tr><td valign="top">Value</td><td valign="top">The information stored in a metadata field</td><td valign="top">"John Smith", "English", "policy"</td></tr><tr><td valign="top">Value Count</td><td valign="top">Number of values in a metadata field (including duplicates)</td><td valign="top">"3"</td></tr><tr><td valign="top">Value Type</td><td valign="top">The type of value a field can contain</td><td valign="top">String, Number, Time</td></tr></tbody></table>

&#x20;

ClickAI supports 3 value types:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Type</td><td valign="top">Description</td><td valign="top">Example</td></tr><tr><td valign="top">String</td><td valign="top">Text-based information</td><td valign="top">"Product Manual", "Vietnam"</td></tr><tr><td valign="top">Number</td><td valign="top">Numerical data</td><td valign="top">42, 3.14</td></tr><tr><td valign="top">Time</td><td valign="top">Dates/timestamps</td><td valign="top">"2024-01-15", "2024-03-20T10:30:00"</td></tr></tbody></table>

&#x20;

&#x20;

## Manage Metadata Fields

### Default Metadata Fields

Each Knowledge Base comes with default metadata fields:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Default Field</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">document_name</td><td valign="top">String</td><td valign="top">Document name</td></tr><tr><td valign="top">uploader</td><td valign="top">String</td><td valign="top">Person who uploaded</td></tr><tr><td valign="top">upload_date</td><td valign="top">Time</td><td valign="top">Upload date</td></tr><tr><td valign="top">last_update_date</td><td valign="top">Time</td><td valign="top">Last update date</td></tr><tr><td valign="top">source</td><td valign="top">String</td><td valign="top">Data source</td></tr></tbody></table>

&#x20;

### Create New Fields

1\.     Click +Add Metadata to open the New Metadata dialog

2\.     Choose the Value Type (String, Number, or Time)

3\.     Name the field

4\.     Click Save to apply

### Edit Field Names

5\.     Click the edit icon next to a field

6\.     Enter the new name

7\.     Click Save to apply

### Delete Fields

Click the delete icon next to the field to remove.

🚨 WARNING: Deleting a metadata field removes the field and all associated values from ALL documents in the Knowledge Base. This action cannot be undone.

&#x20;

## Edit Metadata

### Bulk Edit in the Metadata Editor

8\.     In the Knowledge Base, select documents using checkboxes on the left

9\.     Click Metadata in the bottom action bar

10\.  In the Metadata Editor:

·       Click +Add Metadata to add existing fields or create new ones via +New Metadata

·       New fields are automatically added to the Knowledge Base

·       Click Manage to access the Metadata Panel

11\.  (Optional) Enter values for new fields

12\.  Click Save to apply

Editor actions:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Action</td><td valign="top">How to</td></tr><tr><td valign="top">Add Values</td><td valign="top">Type directly in field boxes</td></tr><tr><td valign="top">Reset Values</td><td valign="top">Click the blue dot that appears on hover</td></tr><tr><td valign="top">Delete Values</td><td valign="top">Clear the field or delete the Multiple Value card</td></tr><tr><td valign="top">Delete Fields</td><td valign="top">Click the delete icon (fields appear struck through and grayed out)</td></tr></tbody></table>

&#x20;

📝 NOTE: Deleting a field from the editor only removes it from that document, NOT from the Knowledge Base.

### Edit on Document Details Page

13\.  Open the document details page

14\.  Click Edit in the top right

15\.  Click +Add Metadata to add fields

16\.  Edit values or delete fields

17\.  Click Save to apply

&#x20;

## Filter Documents with Metadata

Metadata allows you to filter documents during retrieval, narrowing the search scope and improving accuracy.

See details on using metadata filtering in applications at: \[Integrate Knowledge in Apps]\(./12-integrate-in-apps.md)

&#x20;

## FAQ

### What can I do with metadata?

·       Find information faster with smart filtering

·       Control access to sensitive content

·       Organize data more effectively

·       Automate workflows based on metadata rules

### Fields vs Values: What's the difference?

·       Field is the label (e.g., "category") — defines the type of information

·       Value is the specific content (e.g., "policy") — the actual data

### How do different delete options work?

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Action</td><td valign="top">Scope</td></tr><tr><td valign="top">Delete field from Metadata Editor</td><td valign="top">Only removes from current document</td></tr><tr><td valign="top">Delete field from Metadata Panel</td><td valign="top">Removes from ALL documents in Knowledge Base</td></tr><tr><td valign="top">Delete value</td><td valign="top">Only removes the value, field still exists</td></tr></tbody></table>

&#x20;

&#x20;

*📖 Previous: \[Documents & Chunks]\(./08-manage-documents-chunks.md) · Next: \[Knowledge Settings]\(./10-settings.md)*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clickai.vn/clickai-docs/clickai-docs-en/database/manage-document-metadata.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
