Method IsReservedMetadataKey
IsReservedMetadataKey(string)
Determines whether the specified metadata key is reserved for internal use by the document RAG system.
public static bool IsReservedMetadataKey(string key)
Parameters
keystringThe metadata key to check.
Returns
- bool
trueif the key is reserved for internal use; otherwise,false.
Examples
// Filter out reserved keys when processing custom metadata
foreach (var kvp in reference.Metadata)
{
if (!DocumentMetadata.IsReservedMetadataKey(kvp.Key))
{
Console.WriteLine($"Custom metadata: {kvp.Key} = {kvp.Value}");
}
}
Remarks
Reserved keys are used internally to store standard document metadata such as document ID, document name, page number, and source URI. These keys should not be used for custom metadata to avoid conflicts.
The reserved keys are:
- Document ID key
- Document name key
- Page number key
- Source URI key