All projects

LexLoop

A contextual bandit learns which of three LLM agents solves a legal case best, rewarded via an LLM-as-a-judge rubric.

Reinforcement Learning, FHNW · HS 2026Team of 4In progress

Problem

Three LLM agents can work on the same legal case, but not equally well. The project lets a learner decide which agent to use for which case.

Approach and architecture

A contextual bandit picks one of three LLM agents for each case. Its reward comes from an LLM-as-a-judge rubric. The environment is built with Gymnasium (RL environments), model calls go through LiteLLM, and tests run with pytest.

My role

I built the environment, the run logging and the Apertus integration, and I am responsible for documentation and QA.

Status and results

In progress. The repository is private.

Stack

  • Python
  • Gymnasium (RL environments)
  • LiteLLM
  • pytest