Toolverse
All skills

add-reward

by inclusionAI

Guide for adding a new reward function to AReaL. Use when user wants to create a reward function.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Backend
Views
5

About this skill

Guide for adding a new reward function to AReaL. Use when user wants to create a reward function.

How to use

  1. Utwórz nowy plik Python w katalogu areal/reward/ o nazwie <nazwa>.py, gdzie <nazwa> to identyfikator Twojej funkcji nagród.

  2. W pliku zdefiniuj główną funkcję <nazwa>_reward_fn() przyjmującą parametry: prompt (tekst wejściowy), completions (odpowiedź modelu), prompt_ids i completion_ids (tokeny), answer (opcjonalna odpowiedź wzorcowa) oraz dodatkowe dane z datasetu.

  3. Zaimplementuj logikę obliczania nagrody wewnątrz funkcji — typowo porównaj ekstrakcję odpowiedzi z wartością wzorcową i zwróć 1.0 dla poprawnej odpowiedzi lub 0.0 dla błędnej. Dodaj obsługę wyjątków z logowaniem.

  4. Utwórz funkcję pomocniczą _extract_answer() do parsowania odpowiedzi z formatu zwracanego przez model — przykład pokazuje ekstrakcję z notacji \boxed{}.

  5. Zarejestruj nową funkcję w pliku areal/reward/__init__.py, dodając jej nazwę do listy VALID_REWARD_FN.

  6. Skill będzie automatycznie dostępny gdy użytkownik poprosi o dodanie funkcji nagród lub wspomni o obliczaniu nagród w kontekście AReaL.

Related skills

architecture-decision-records

by wshobson

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Backend
29130

using-superpowers

by obra

Use when starting any conversation - establishes mandatory workflows for finding and using skills, including using Skill tool before announcing usage, following brainstorming before coding, and creating TodoWrite todos for checklists

Backend
65167

travel-planner

by ailabs-393

This skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first use, collects comprehensive travel preferences including budget level, travel style, interests, and dietary

Backend
4379

sql-optimization-patterns

by wshobson

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

Backend
40163

postgresql-psql

by timelessco

Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and

Backend
34173

stripe-integration

by wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

Backend
40147