Tip: Use aliases and related on RetrievalEntry to surface templates under multiple names

Recommendation

When you add a RetrievalEntry to your corpus, populate its aliases and related tuples — even if you only have one alias today. DirectoryCorpus indexes every alias into alias_index at load time, so lookups by alternate name are instant without any extra work on your part.

Why: A template that can only be found by its exact path is half as discoverable as one that can be found by the terms your users actually type.

Tradeoff: Every alias you declare must be globally unique across the corpus. If two templates claim the same alias, DirectoryCorpus raises DuplicateAliasError at load time. Audit your alias names before adding them, especially when merging two corpora.

Key types

Source files

Tags: corpus, loader, markdown, attune-help