zachdaniel

zachdaniel

Creator of Ash

Ash Framework: Official LLM development tooling and guidance

Hey folks! I’ve begun putting together some concrete, framework-wide tooling and guidance on the usage of LLMs in development. The goal here is not to push folks into using LLMs. The goal here is to make sure that those who want to use this technology have some resources to do so in the context of the tools that they want to use. This is a very important distinction. I know that there are folks out there experiencing some level of FOMO and/or worrying that they won’t have a good avenue to leverage technology that might (very important might) change the industry. My goal as a framework author and as someone who cares about this community, is to find ways to lift us all up together.

On to the concrete stuff, check out our new guide on working with LLMs.

A few of the bigger Ash packages have had usage-rules.md files, which you can (for now, the task itself may change later if we get greater adoption of the pattern) then include into your own project with mix ash_ai.gen.usage_rules <your_rules_file> package1 package2. The list so far is:

  • ash
  • ash_ai
  • ash_oban
  • ash_json_api
  • ash_graphql
  • ash_postgres
  • ash_phoenix

Most Liked

anibal

anibal

My first post here, I’m 56 years old. I have been doing software development for thirty something years, last fifteen years I have been in management, I am taking a sabbatical after 6 years as VP of Engineering at a large startup. A long time dream of mine was to program in Elixir, finally I am moving ahead with it, loving it so far.

When I started learning Elixir a few weeks ago, with printed books, I knew this language wasn’t going to have a first class support from LLMs for coding, like Typescript or Python, it is just a matter of training data and curation. But I guessed that eventually that would change, or I may find a way to supplement the training limitations through RAG or any other means.

I spent some time crafting guides, a lot of study notes, prompting and manual review, for different topics like testing, documenting and so on, like cheatsheets to hint agents to use certain patterns, usually with good results. But brute forcing documentation through “deep research” is slow.

And Ash has been particularly frustrating, the book helped a lot by the way, but the docs are not there yet and the number of options for anything you want to achieve are almost infinite. But I liked a lot the code once I managed to produce it. And of course, as everything in life, it is a compromise.

It is very clear for me the potential of having your app as a data structure in this times, a treasure trove for LLM. I’m eager to try translating this into MCPland. But on the other side I was thinking that, well, maybe in this time of easy to generate code, maybe disposable code it would be easier to go on with what LLMs already knew, “regular Elixir”.

I know a lot of people will be enabled by support artifacts like this to just let an llm/agent generate the code without caring, o rlearning, and that’s ok; but on the other side this is going to be an invaluable tool for learning and gaining adoption. And I wanted to say thanks for this initiative, it was much needed.

And I know, here is an incredible community, I didn’t remember I missed this from my old Ruby and Ruby On Rails times when everything was starting. Will be asking more here, just getting used to it, it is a bit overwhelming.

zachdaniel

zachdaniel

Creator of Ash

I totally agree, I think the usage rules files probably serve as some of the best quick reference we have now even for humans. Should probably put these into the hexdocs even :sweat_smile:

As for whether we’ve entered the world of “disposable code”, maybe but I think not :slight_smile: If you can have a recipe for building applications that stand the test of time and can be done at the speed of an LLM, then you’ll really be on top.

Early experimentation with a combined rules file leads to massive improvements in output of LLMs, and that is just with the ash ones not one for elixir, LiveView, etc.

Plus Claude 4 just came out which appears to have finally indexed some Ash stuff :slight_smile:

ghannam80

ghannam80

Actually I think this could be an opportunity for Ash to shine as its declarative model makes it perfect to generate high quality code using LLM that could provide even faster starting point to bring products live

zachdaniel

zachdaniel

Creator of Ash

I concur.

garrison

garrison

I’m curious, as the author of a relatively niche framework, and therefore as someone who of course knows Ash as well as it can be known: are current models capable of generating “useful” Ash code in your view?

There is some concern (including from myself) that if model-assisted programming does take off there will be a “winner takes all” economy where anything niche (perhaps Elixir itself) is squeezed out.

One thing I found interesting (and concerning) was the recent Camel research published last month, which detailed a potential solution for prompt injection attacks. The work itself is a big deal because it’s the first seemingly working strategy to deal with such attacks, but the concerning part is the authors elected to create a DSL with Python syntax to model the permission system.

That is to say, the work had nothing to even do with Python and yet they still felt the need to create something which looks like Python just to improve the results.

On the other hand, it sounds like giving models clear instructions on how to use Elixir and Ash can be helpful. Empirically, can anyone share how much of a difference these things make?

Where Next?

Popular in News & Updates Top

martosaur
InstructorLite - v1.1.1 and v1.1.2 Pass Gemini token in request header rather than in request parameter (as is shown in API reference :...
New
zachdaniel
Hey friends! A long time quality of life feature we’ve been wanting to add is the ability to refer to to-one relationships in calculation...
New
bartblast
Hologram v0.6.0 is here, bringing production-ready features to the full-stack Elixir web framework! This release focuses on enhanced secu...
New
jimsynz
As some of you know, I have been working on a tight integration between Ash and Reactor which has triggered a few small bug fixes in Spar...
New
zachdaniel
:police_car_light: New AshAuthentication Installers :police_car_light: The AshAuthentication igniter installers are released! Today on s...
New
bartblast
Backward Incompatible Changes Change template sigil from ~H to ~HOLO Require Elixir 1.15+ and Erlang/OTP 24+ New Features Add “select”...
New
sorenone
Oban v2.23.0 has been released. Sharpens resilience under database outages, catches misconfigured unique constraints at compile time, an...
New
fhunleth
We are thrilled to announce another update for Nerves Systems to nerves_system_br 1.22.5-based releases. Nerves systems are the device su...
New
fhunleth
Circuits.GPIO lets you read and write to I/O pins on embedded hardware like that used by Nerves. The new v2.0 version makes it possible t...
New
zachdaniel
Ash Framework 3.0: Release Candidates! The day is finally here! This is the culmination of years of work from the Ash team and community ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement