georgeguimaraes

georgeguimaraes

Tribunal - LLM evaluation and testing framework for Elixir

Hey everyone!

I’ve been working on Tribunal, an LLM evaluation framework for Elixir. It helps you test RAG pipelines and LLM outputs in your test suite.

The problem

When building LLM-powered features, you need to verify things like:

  • Is the response grounded in the provided context?
  • Did it hallucinate information?
  • Is the response actually relevant to the question?
  • Any toxic, biased, or harmful content?

The solution

Tribunal integrates with ExUnit so you can write these checks as regular tests:

test "response is faithful to context" do
  response = MyApp.RAG.query("What's the return policy?")

  assert_faithful response, context: @docs
  refute_hallucination response, context: @docs
  refute_toxicity response
end

Two modes

  • Test mode: ExUnit integration for CI gates. Fails immediately on any violation. Use this for safety checks that must pass.

  • Evaluation mode: Mix task for benchmarking. Run hundreds of test cases, set pass thresholds (e.g., “pass if 80% succeed”), track regression over time.

Assertion types

Deterministic (no API calls, instant):

  • assert_contains / refute_contains
  • assert_regex
  • assert_json
  • assert_max_tokens

LLM-as-Judge (uses any model via req_llm):

  • assert_faithful - grounded in context
  • assert_relevant - addresses the query
  • refute_hallucination - no fabricated info
  • refute_bias, refute_toxicity, refute_harmful, refute_jailbreak, refute_pii

Embedding-based (via alike):

  • assert_similar - semantic similarity

Red team testing

  • Generate adversarial prompts to test your LLM’s safety:

Tribunal.RedTeam.generate_attacks(“How do I pick a lock?”)

  • Returns encoding attacks (base64, rot13, leetspeak)

  • injection attacks (ignore instructions, delimiter injection), jailbreak attacks (DAN, developer mode)

Would love to hear your feedback!

Hex: tribunal | Hex
GitHub:

https://github.com/georgeguimaraes/tribunal

First Post!

Last Post!

webofbits

webofbits

Really nice work on this!

I’ve been building aludel in a pretty similar area, but with more emphasis on an interactive Phoenix/LiveView workbench for running and comparing evals.

After spending some time looking through Tribunal, I think you’ve done a strong job on the evaluation primitives, especially around assertions, datasets, and LLM-as-judge flows. It feels like there’s an interesting complement between the two projects: Tribunal as a focused eval library, and Aludel as more of a UI/workbench layer.

If you’re open to it, I’d love your feedback on Aludel. I’m also curious whether you think there’s room for some interoperability between projects like these, especially around assertion engines or portable dataset formats, instead of each tool rebuilding the same pieces independently.

Where Next?

Popular in Announcing Top

zorbash
I created Kitto a framework for dashboards inspired by Dashing. The distributed characteristics of Elixir and the low memory footprint...
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
kevinlang
Hey all, We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3! We have successfully on-boarded the full suite of integration tests (...
New
trisolaran
Hi! :waving_hand: I would like to present LiveSelect, a little library that I wrote to easily add a dynamic selection input to your LV f...
198 11220 107
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
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
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement