@alias / @@alias
The @alias
attribute in BAML is used to rename fields or values for better understanding by the LLM, while keeping the original name in your code. This is particularly useful for prompt engineering, as it allows you to provide a more intuitive name for the LLM without altering your existing codebase.
Prompt Impact (class)
Without @alias
BAML
ctx.output_format:
With @alias
BAML
ctx.output_format:
Prompt Impact (enum)
BAML
ctx.output_format:
Prompt Impact (enum value)
BAML
ctx.output_format: