File Tagging
Tags are metadata labels associated with documents that provide additional context beyond the document's title or content. For example, a document titled "China Shift Policy" can be tagged with country:china. Unlike document titles, which may not always carry over to all chunks of the document, tags are consistently passed along with every chunk. This ensures that no matter where in the document a search lands, the context of what the document is about is preserved.
Key Benefits
- Persistent context -- Tags travel with all document chunks, ensuring search relevance even when headings are not carried forward.
- Enhanced personalization -- Agents can prioritize results based on user attributes from the Tag Extractor agent (for example, if a user's region is China, documents tagged with "China" are ranked higher). This ensures chunks are most relevant, reducing noise from unrelated documents.
- Flexible organization -- Files can be grouped logically across multiple dimensions (for example, product, location, band).
Features
- Metadata-based search -- Tags add a structured layer of information, improving precision in search and retrieval.
- Custom tag creation -- Tags can represent multiple categories like country, product name, or band. Tags can also be multi-level (accepted up to 3 levels).
- Taggable file uploads -- With the FileUploadWidget, users can associate previously created tags with new documents.
- Validity dates -- A type of tag that allows users to add a "Valid from" date and/or "Valid till" date for each document. These are auto-extracted when there is a clear "Valid from DD/MMM/YYYY and Valid till DD/MMM/YYYY" line on the first page of the document. They can be manually added as well and are used to expire documents after a certain date or make documents available only after a certain date.
How to Use
Set Up Tags
Manually add all tags and possible levels using the File Tagging Widget (available by default when the EX template is used).
Tag Files Manually
When uploading files using the FileUploadWidget, assign the tags created earlier with each file.
Bulk Tag Files
You can also bulk tag files by clicking on Bulk Upload and uploading the file tags in CSV format.
Managing Validity Dates
Validity dates are auto-extracted from files when there is a clear "Valid from DD/MMM/YYYY and Valid till DD/MMM/YYYY" line on the first page of the document. They can be manually added or edited. Files take one of four states when validity-date-based filtering is activated in the Knowledge Search Agent:
| Valid From | Valid Till | Behavior |
|---|---|---|
| Present | Present | Document is valid within the specified date range |
| Present | Absent | Document is valid for all dates after "Valid from" |
| Absent | Present | Document is valid for all dates up to "Valid till" |
| Absent | Absent | Document is always valid |
Leverage Tags in Search
- Tags are always passed alongside content chunks.
- Agents and retrieval systems can prioritize or filter search results using these tags for higher accuracy and relevance.
- If "Filtering based on validity dates" is enabled in the file search agent, files that are invalid as of the user query date will not be searched. Documents without validity dates are always searched.