georgeguimaraes

georgeguimaraes

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 3 of 3 Posts Switch mode

stryderjzw

stryderjzw

Looks great! Will be giving it a try.

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.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

Other Trending Topics Top

juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New

We're in Beta

About us Mission Statement