ProtectedBaseAccess to the underlying TagEngineBase instance
Returns true if both the base engine and server capabilities are loaded
All loaded Tag entities
The vector service containing tag embeddings, or null if not yet loaded or no embedding model available
StaticInstanceUsed by MJTagEntityServer.Save() after a tag's persisted vector has been written: lift the vector from the entity into the in-memory cache without re-running embedding. No-op if the vector service hasn't been initialized.
Initialize the TagEngine by loading the base engine and building tag embeddings. Safe to call multiple times; subsequent calls are no-ops unless forceRefresh is true.
OptionalforceRefresh: booleanIf true, reload all data and rebuild embeddings
OptionalcontextUser: UserInfoRequired for server-side operations
Create a new Tag entity, save it, and add to local cache
Create or update a TaggedItem linking a tag to an entity record
Propose a hierarchical tag taxonomy for a content source WITHOUT persisting anything. Reuses ClusteringEngine over a sample of the source's content-item embeddings (clusters are LLM-named), and falls back to a single AI prompt over a sample of content when embeddings are unavailable.
ContentSource ID whose items seed the taxonomy.
Max number of content items to consider.
OptionalcontextUser: UserInfoUser context (required server-side).
Optionalprovider: IMetadataProviderOptional metadata provider override.
The proposed taxonomy tree + provenance metadata (nothing is saved).
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
Find a tag by its Name using case-insensitive string comparison
Build a hierarchical tree of TagTreeNode objects for LLM prompt injection.
OptionalrootID: stringOptionalctx: TagScopeContextPublic utility: rebuild persisted embeddings for tags whose model doesn't match the currently configured embedding model. Intended for one-shot admin invocation after the global tag-embedding model is changed, or for scheduled health jobs. Returns the count of tags refreshed.
OptionalcontextUser: UserInfoRe-embed a tag after it has been renamed or its description changed. Updates the vector in the active vector service. No-op if the vector service is not available (e.g., before BuildTagVectors has been called).
The tag entity with the updated name/description already saved
Remove a tag's embedding from the vector service (e.g., after deletion). No-op if the vector service is not initialized.
Resolve a free-text tag to a formal Tag record using exact match and semantic search.
Resolution strategy:
The free-text tag string to resolve
The weight to assign if creating a new tag (0.0 to 1.0)
Resolution mode:
If set, constrain semantic search to this subtree. Also used as parent for auto-grow.
Minimum similarity score (0-1) for a match to be accepted
The user context for the operation
Optionaloptions: ResolveTagOptionsThe matched or newly created MJTagEntity, or null if no match in constrained mode
Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: string
Server-only Tag Engine that wraps TagEngineBase via composition and adds semantic embedding support for tag resolution.
Uses SimpleVectorService to embed all tags for sub-millisecond local similarity matching. This enables the ResolveTag() method which maps free-text tag strings to formal Tag records.
Description
ONLY USE ON SERVER-SIDE. For client-side tag operations, use TagEngineBase directly.