Metadata-Version: 2.4
Name: barred
Version: 0.2.0
Summary: Unofficial implementation of BARRED: generate faithful, diverse labeled datasets
Keywords: llm,synthetic-data,dataset-generation,data-labeling,guardrails,multi-agent-debate,classification
Author: Thomas Queste
Author-email: Thomas Queste <tom@tomsquest.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: any-llm-sdk>=1.26.0,<2
Requires-Dist: pydantic>=2.13.4,<3
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/tomsquest/barred
Project-URL: Repository, https://github.com/tomsquest/barred
Project-URL: Issues, https://github.com/tomsquest/barred/issues
Project-URL: Paper, https://arxiv.org/abs/2604.25203
Description-Content-Type: text/markdown

<p align="center">
<img src="https://raw.githubusercontent.com/tomsquest/barred/main/doc/cover.png" alt="Cover" />
</p>

# BARRED: generate faithful and diverse training sets

Unofficial implementation of the BARRED paper:

> Boundary Alignment Refinement through REflection and Debate, aka BARRED
> [arXiv:2604.25203](https://arxiv.org/pdf/2604.25203)

## What is BARRED?

**In a nutshell**: BARRED is a framework for generating **faithful** and **diverse** synthetic training data using only
a task description and a small set of unlabeled examples.

**Step by step**:

1. Define the task and give examples to know what to generate Criterion:
    ```
    Criterion: `True means this sentence is positive, False otherwise`
    Examples: `I love it`, `it's rainy`, `My uncle bobby is a good boy`
    ```
2. Let the library decompound the problem into dimensions
3. Then the library generates the training set
4. Results: a set of *labeled* sentences
    ```
       1. `My mother is a wonderful person -> true`
       2. `Her sister is boring -> false`
    ```

## Why it's cool?

TODO

## Installation

```
uv add barred

# with Pip
pip install barred
```

## Usage

TODO

## Development setup

Install after cloning the repository:

```bash
just install
```

Check everything (lint, type, tests...):

```bash
just checks
```
