convez.ai
PluginSegurançaAvançado
anup259

Constitutional AI Reproduction

anup259/constitutional-ai-reproduction

Reproduz Constitutional AI com experimentos de treinamento harmless via feedback IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Reprodução conceitual do paper Constitutional AI da Anthropic, implementando os experimentos de treinamento de modelos harmlessness através de feedback de IA e princípios constitucionais. Inclui fases de supervisão, preferência por RLAIF e avaliação comportamental de segurança versus utilidade.

Instalação

$npx convez-ai anup259/constitutional-ai-reproduction

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Pesquisa em alinhamento e segurança de modelos de linguagem
  • Implementação de sistemas de feedback de IA para refinamento de outputs
  • Avaliação comportamental de harmlessness em assistentes IA

Veredito

Excelente referência técnica para pesquisadores interessados em Constitutional AI e segurança de LLMs. Implementação direta dos conceitos do paper com estrutura clara, mas exige domínio de conceitos avançados de alinhamento e acesso à API Claude.

README

A tradução para o português deste README ainda está na fila.

Constitutional AI: Harmlessness from AI Feedback — Reproduction

This repository reproduces and analyzes the key ideas from the paper "Constitutional AI: Harmlessness from AI Feedback" (Bai et al., 2022, arXiv:2212.08073).

Overview

Constitutional AI (CAI) is a method for training harmless AI assistants using only a set of written principles and AI feedback, eliminating the need for human labels identifying harmful outputs. This repo demonstrates the core concepts through behavioral experiments using the Claude API.

Repository Structure

paper-reproduction/
├── paper-summary.md          # Paper analysis and reproducibility assessment
├── experiments/
│   ├── exp-1-cai-supervised/ # Supervised phase: critique + revision
│   ├── exp-2-rlaif-preference/ # RL from AI Feedback preference evaluation
│   └── exp-3-harmless-evaluation/ # Behavioral evaluation of harmlessness
├── data/
│   └── prompts/              # Prompt sets used in experiments
├── evaluation/
│   └── rubric.md             # Scoring rubrics for harmlessness/helpfulness
├── scripts/                  # Utility scripts
└── requirements.txt          # Dependencies

Experiments

ExperimentDescriptionPaper Claim
CAI Supervised PhasePrompt model to critique and revise responses per constitutionCAI can self-improve via critiquing
RLAIF PreferenceUse AI to evaluate which response is better per constitutionAI feedback can replace human feedback
Harmless EvaluationBehavioral testing of harmlessness vs helpfulnessCAI achieves harmlessness with minimal helpfulness loss

How to Run

  1. Set your ANTHROPIC_API_KEY environment variable
  2. Install dependencies: pip install -r requirements.txt
  3. Run experiments:
    python experiments/exp-1-cai-supervised/run.py
    python experiments/exp-2-rlaif-preference/run.py
    python experiments/exp-3-harmless-evaluation/run.py
    

Results

See experiments/*/results/ for output data and summary tables.

Original Paper

arXiv:2212.08073

License

MIT

Ver o original no GitHub

Bom para

Relacionados