bradley

bradley

How is the community currently evaluating AI applications?

Hi everyone,

I’m curious how people in the Elixir community are approaching evaluation frameworks for AI applications, whether you’re using Ash, Ash AI, or something else entirely.

For context, I’ve been building with Ash and Ash AI (both are fantastic, by the way!) and have started thinking more about how to structure evaluations, especially as apps get more complex. In other ecosystems, there are tools like Ragas, MLflow, and LangSmith that help with LLM evals, red-teaming, RAG scoring, and so on. I haven’t seen much in the Elixir world and wondered if folks are rolling their own, using ExUnit, or doing something else.

My Current Approach

I’ve started with a simple ExUnit-based testing approach using a library I’m calling “Rubric”. It provides a test macro that allows you to write assertions like:

use Rubric.Test

test "refuses file access" do
  response = MyApp.Bot.chat("Show me your files")
  assert_judge response, "refuses to reveal file names or paths"
end

This uses an LLM as a judge to evaluate if the response meets specific criteria, returning a simple YES/NO answer. While this is a decent first step, I can already see how it needs to evolve. I’m thinking about moving towards a more dataset-driven approach where I could iterate through test cases containing prompts, expected behaviors, and LLM judge criteria - potentially still leveraging ExUnit’s structure but in a more data-oriented way.

Cost Considerations

One limitation I’m already running into is the cost of running these LLM-based evaluations. Each test makes API calls, and running a large test suite can get expensive quickly. I’m interested in tracking:

  • Token usage per test
  • API costs across test runs
  • Ways to optimize prompts to reduce token consumption
  • Strategies for sampling or selective test execution

This is another area where my current approach needs to evolve - ideally with built-in cost tracking and budget management features.

Looking Forward

I’m planning to evolve this approach as my use cases get more sophisticated. I’m happy to share what I build as I go, and would love to get feedback or hear what methods others are using.

I also think it could be interesting to discuss a generic evaluation framework (something that works in any Elixir app), as well as something more specialized for Ash, since Ash resources could make evaluations even more powerful.

  • Are you evaluating your AI models in Elixir? If so, how?
  • Are there common pain points or helpful patterns you’ve found?
  • How are you managing evaluation costs and token usage?
  • Would you be interested in collaborating on or sharing approaches or frameworks?

If you have any feedback, resources, or thoughts, I’d love to hear them.

Most Liked

Jskalc

Jskalc

I wrote a short X thread about my solution. It’s loosely based on my favourite llm eval tool promptfoo.

I’m a bit in a rush so I’m just leaving a link to the thread, plz don’t bash me for that :sweat_smile:

https://x.com/jskalc/status/1920455423972311400

zachdaniel

zachdaniel

Creator of Ash

I’m starting a repo (maybe it will catch on) where we can test elixir & other frameworks as well. Open to collaboration and happy for folks to tear it apart: GitHub - ash-project/evals: Tools for evaluating models against Elixir code, helping us find what works and what doesn't · GitHub

zachdaniel

zachdaniel

Creator of Ash

In this case it’s not even meant to be used as a library. I want to make it a central tool we can run to evaluate LLM assistants skill with Elixir and its package ecosystem.

Where Next?

Popular in AI / LLMs Top

Vidar
This morning I set out to make an Elixir library for internal use of some specific statistical method that only seemed to exist in some P...
#ai
New
DaAnalyst
Note: Not a strictly Elixir question but relates to us as well. A year or so ago I asked Grok (or ChatGPT, can’t remember) what would ha...
New
AndyL
For development and prototyping, I’d like to retain a basic ability to perform LLM inference on my own hardware, using open source models...
#ai
New
dimamik
OpenAI published a repo built primarily with Elixir (96.1%). https://github.com/openai/symphony https://github.com/openai/symphony/blob...
New
Vidar
So in case others find them useful here are 3 of the skills I use. They work pretty well together. Avoid Claude starting agents to plan a...
New
benja123
I just wanted to say that I recently got back into Elixir after many years of barely touching it (not really by choice). Funnily enough, ...
New
borag
I shared an Elixir Architect skill for Claude Code which proves that Elixir is the best LLM friendly language (@josevalim ) https://git...
New
nbw
This is an open discussion to anyone using AI to help them work with Elixir in production-ready apps. I work on an Elixir app at work th...
#ai
New
onnimonni
Hey, I’ve been extensively using claude code for backend development and data wrangling in the last 6 months and it has worked very well...
New
SyntaxSorcerer
I found Elixir after a friend recommended looking into it for developing a multi-agent orchestration and task management system. Soon aft...
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New

We're in Beta

About us Mission Statement