Just AI automated JAICP DSL: AI agent writes patterns and tests in a minute instead of six hours
Just AI demonstrated its internal AI agent for the JAICP platform, which handles the tedious part of working with DSL: writing patterns, selecting phrase…
AI-processed from Habr AI; edited by Hamidun News
Just AI automated JAICP DSL work through an AI agent that writes patterns and autotests instead of humans. According to the team's estimate, a task that previously took around six hours of manual routine now takes approximately one minute—the developer only needs to review and adjust the result if necessary.
Why This Was Needed
The JAICP team works with a special DSL for describing patterns that help the bot understand user phrases. On paper, the task seems simple: take "yes," "hello," or "doesn't work" and describe them as a template. In practice, everything quickly becomes complicated: users write in slang, make mistakes, use colloquialisms, and do this in different languages.
For one project, Just AI had to account for Russian, English, German, and Turkish, and literal translation often doesn't work. Variability proved especially painful. A client provides a basic list of phrases, but for proper scenario coverage, a developer must manually come up with analogues, morphological forms, and non-standard formulations.
Autotests don't fully solve the problem either: even if a pattern can be generated by script, someone still needs to prepare input examples, check syntax, and ensure the DSL is used correctly. So the team decided not to limit itself to a regular LLM request but to build a separate agent that understands the platform context and takes the routine upon itself.
How the Agent Works
The solution is based on Claude Sonnet 4.5, chosen for stable DSL code generation and good instruction-following. The agent was given three working tools: searching for relevant documentation pieces in Jay Knowledge Hub, generating responses based on that knowledge base, and separate self-checking via Llm.sendRequest with GPT-4o-mini. This stack allowed not just "filling in" phrases but relying on real JAICP examples and catching part of the errors before delivering results to the user.
- Retrieves examples and rules from the JAICP knowledge base
- Generates patterns and explains their structure
- Shows which phrases the template covers
- Writes autotests based on those same examples
- Separates answers by language and doesn't mix them in one block
The key role was played not by the set of tools, but by the prompt. The team split it into general logic, a block for patterns, a block for autotests, and final self-checking. The instructions separately described semantic, morphological, and syntactic analysis, rules for optional blocks and synonym grouping, then forced the model to build optimized patterns, not literal enumerations. When models still started to "act up," the prompt was further refined and structured with DeepSeek's help, and for multilingual support, they added a simple rule: first determine the language, then apply its morphology.
Results and Numbers
The finished agent was connected to Telegram for faster scenario testing. As a result, the bot learned to gather a DSL pattern from a single user phrase, show the covered speech variants, and immediately generate autotests. An additional bonus was that the system began writing even DSL scenarios, though it wasn't specifically trained for this: the model pulled the necessary knowledge from documentation in the knowledge base. This format turned out to be useful not only for experienced developers but also for onboarding newcomers who need to see not just the final template but the logic of its construction.
"The agent also handles it in 1 minute—a 360x speedup."
The team calculated the numbers on a specific example: there are 20 phrases from a client that need to be converted into patterns in four languages, with added variability and test coverage. Manually, Russian takes about an hour, at least another three hours—for the other languages, plus an hour for autotests and another hour for inventing additional formulations. In total, that's a minimum of six hours of monotonous work without accounting for revisions. The agent produces the same template in about a minute, but the human still doesn't skip the final review—and that's exactly what makes this case realistic rather than promotional.
What This Means
The Just AI case shows that narrowly specialized AI agents are already useful not just for chats and search but for internal development on niche DSLs. If a team has documentation, clear rules, and repetitive manual work, an agent can eliminate hours of routine without complex architecture or extensive fine-tuning.
Want to stop reading about AI and start using it?
AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.