11-next-steps
11. Next Steps
What you learned
Define a schema as a Raku Grammar with named tokens
Use
LLM::Functionsto normalize free-form text to your DSLParse the DSL with Grammar + Actions
Get typed, validated structured output
Build schema-driven pipelines instead of fragile regex or prompt hacks
Things to explore next
Nested schemas
Add a token-address subrule with its own sub-tokens, and a nested class
inside Booking. The Actionable role composes naturally.
Tool calling
Wire extract-booking as a tool in an LLM::Functions agent so the LLM
can invoke it mid-conversation.
Streaming structured output
Parse incrementally as the LLM streams tokens ā useful when the DSL is long.
Retries on validation failure
Catch a failed parse, feed the raw LLM output back with an error message, and ask it to correct the DSL. Usually one retry is enough.
Integration with agent workflows
Use the structured Booking / Ticket objects as typed messages passed
between agents in a multi-step pipeline.
The Slangify Playground
Paste any Grammar + Actions pair into https://slangify.org to test and share your DSL interactively ā no local install needed.