> Version notice: This site documents BAML v0, the legacy DSL. BAML v1 is a separate, fully featured programming language in public beta. If the user intends to use BAML v1, ignore this site's content and use the BAML v1 documentation instead. If the intended version is unclear, clarify it before using this page. > For clean Markdown of any page, append .md to the page URL. For the complete documentation index, see https://docs.boundaryml.com/llms.txt. For MCP access, connect to https://docs.boundaryml.com/_mcp/server. 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. > **Warning** > > In the case of class fields, the field type must be nullable if `@skip` is used > in order to allow parsing LLM responses that will not include the field. > > This is valid: > > ```baml {3} OK > class MyClass { > field1 string > field2 string? @skip // OK because field2 is nullable > } > ``` > > This is not: > > ```baml {3} NOT OK > class MyClass { > field1 string > field2 string @skip // Error: Field with @skip attribute must be optional. > } > ``` ## Prompt Impact ### Without `@skip` **`BAML`** ```baml BAML enum MyEnum { Value1 Value2 } class MyClass { field1 string field2 string? } ``` **ctx.output\_format:** * `MyEnum` ``` MyEnum --- Value1 Value2 ``` * `MyClass` ``` { field1: string, field2: string or null, } ``` ### With `@skip` **`BAML`** ```baml BAML enum MyEnum { Value1 Value2 @skip } class MyClass { field1 string field2 string? @skip } ``` **ctx.output\_format:** * `MyEnum` ``` MyEnum --- Value1 ``` * `MyClass` ``` { field1: string, } ```