The @skip attribute in BAML is used to exclude certain fields or values from being included in prompts or parsed responses. This can be useful when certain data is not relevant for the LLM’s processing.

Prompt Impact

Without @skip

BAML
1enum MyEnum {
2 Value1
3 Value2
4}

ctx.output_format:

MyEnum
---
Value1
Value2

With @skip

BAML
1enum MyEnum {
2 Value1
3 Value2 @skip
4}

ctx.output_format:

MyEnum
---
Value1