git404hub

what is pl-ragas-analyzer fr?

molbr/pl-ragas-analyzer — explained in plain English

Analysis updated 2026-05-18

1PythonAudience · researcher

tl;dr

A research project that evaluates a simple RAG system over Brazilian government bills, using Claude as an automated judge.

vibe map

mindmap
  root((RAG Analyzer))
    What it does
      Evaluates RAG quality
      Claude as judge
      Brazilian bill corpus
    Tech stack
      Python
      Ragas
      Ollama embeddings
    Use cases
      Faithfulness scoring
      Ablation experiments
      Local judge comparison
    Audience
      Researchers
      RAG engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Measure how faithful and relevant a RAG system's answers are using six Ragas metrics.

VIBE 2

Run ablation experiments like no-retrieval, different retrieval widths, and injected noise to see how metrics react.

VIBE 3

Compare a local Ollama judge against Claude to see how much they agree on answer quality.

VIBE 4

Build a small Portuguese-language question answering pipeline over recent legislative bills.

what's the stack?

PythonRagasOllamaAnthropic API

how it stacks up fr

molbr/pl-ragas-analyzer0xustaz/streamgatea-bissell/unleash-lite
Stars111
LanguagePythonPythonPython
Setup difficultyhardhard
Complexity4/54/5
Audienceresearcherdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

in plain english

pl-ragas-analyzer is a small research project that studies how well a RAG system, meaning a retrieval-augmented generation setup that looks up documents before answering a question, can be evaluated rather than trying to build a great RAG system itself. The RAG part is intentionally simple: it uses plain cosine similarity over embeddings with no vector database at all. The real subject is measuring the quality of that retrieval and the answers it produces, using a tool called Ragas with Claude acting as the judge that scores each answer. The documents behind this project are recent bills from the Brazilian Chamber of Deputies, in Portuguese, submitted in June and July of 2026. Because these bills are newer than the training data of any language model, a correct answer can only come from the retrieval step finding the right document, not from the model already knowing the answer from memory. The data is pulled from a free, key-free government API. The project fetches around 100 bills, builds an embedding index using a local Ollama model, and then answers questions by finding the most relevant bills and asking Claude to respond in Portuguese based on what was retrieved. A separate evaluation script runs 16 hand-written questions through six Ragas metrics, including faithfulness, answer relevancy, and whether retrieval returned the right documents versus irrelevant noise, plus one custom metric checking whether an answer cites the bill's official number. Several ablation experiments are included too, such as running with no retrieval at all, changing how many documents are retrieved, injecting irrelevant documents on purpose, and combining exact number matching with vector search for bill numbers that plain embeddings cannot understand. The generator and judge can also be swapped to run entirely on local models through Ollama instead of the Anthropic API, which removes API cost and lets someone compare how well a local judge agrees with Claude's scoring. Setup requires Python 3.11, a running Ollama instance with an embedding model pulled, and an Anthropic API key for the default configuration, since running the full Claude-judged evaluation costs roughly one to two dollars per run. The README notes a few compatibility issues with specific Ragas and library versions but does not state a license for the project.

prompts (copy fr)

prompt 1
Walk me through setting up Ollama and fetching the bill corpus for pl-ragas-analyzer.
prompt 2
Explain what each of the six Ragas metrics measures and what kind of failure it catches.
prompt 3
Show me how the hybrid retrieval mode combines exact bill-number matching with vector search.
prompt 4
Help me understand how to swap the generator and judge to run fully on local models.

Frequently asked questions

what is pl-ragas-analyzer fr?

A research project that evaluates a simple RAG system over Brazilian government bills, using Claude as an automated judge.

What language is pl-ragas-analyzer written in?

Mainly Python. The stack also includes Python, Ragas, Ollama.

Who is pl-ragas-analyzer for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.