{"id":31027187,"url":"https://github.com/rizome-dev/go-verifiers","last_synced_at":"2025-09-13T18:57:16.248Z","repository":{"id":302172741,"uuid":"1011324097","full_name":"rizome-dev/go-verifiers","owner":"rizome-dev","description":"willccbb/verifiers, but pure golang","archived":false,"fork":false,"pushed_at":"2025-06-30T23:49:12.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T00:37:11.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/rizome-dev/go-verifiers","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rizome-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-30T16:31:37.000Z","updated_at":"2025-06-30T23:49:40.000Z","dependencies_parsed_at":"2025-07-01T00:47:15.805Z","dependency_job_id":null,"html_url":"https://github.com/rizome-dev/go-verifiers","commit_stats":null,"previous_names":["rizome-dev/go-verifiers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rizome-dev/go-verifiers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fgo-verifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fgo-verifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fgo-verifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fgo-verifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizome-dev","download_url":"https://codeload.github.com/rizome-dev/go-verifiers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fgo-verifiers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275013271,"owners_count":25390481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-13T18:57:14.953Z","updated_at":"2025-09-13T18:57:16.234Z","avatar_url":"https://github.com/rizome-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-verifiers\n\nA pure Go implementation of verifiers for reinforcement learning with LLMs, migrated from [willccbb/verifiers](https://github.com/willccbb/verifiers).\n\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/rizome-dev/go-verifiers)](https://pkg.go.dev/github.com/rizome-dev/go-verifiers)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rizome-dev/go-verifiers)](https://goreportcard.com/report/github.com/rizome-dev/go-verifiers)\n\n```shell\ngo get github.com/rizome-dev/go-verifiers\n```\n\nbuilt by: [rizome labs](https://rizome.dev)\n\ncontact us: [hi (at) rizome.dev](mailto:hi@rizome.dev)\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"log\"\n\n    \"github.com/rizome-dev/go-verifiers/pkg/envs\"\n    \"github.com/rizome-dev/go-verifiers/pkg/inference\"\n    \"github.com/rizome-dev/go-verifiers/pkg/parsers\"\n    \"github.com/rizome-dev/go-verifiers/pkg/rubrics\"\n    \"github.com/rizome-dev/go-verifiers/pkg/types\"\n)\n\nfunc main() {\n    // Configure environment\n    config := types.Config{\n        Model:        \"gpt-4\",\n        SystemPrompt: \"You are a helpful assistant.\",\n        MessageType:  \"chat\",\n        SamplingArgs: types.SamplingArgs{\n            Temperature: 0.7,\n            MaxTokens:   150,\n        },\n    }\n\n    // Create single-turn environment\n    env := envs.NewSingleTurnEnv(config)\n    env.SetParser(parsers.NewBaseParser())\n    env.SetRubric(rubrics.NewBaseRubric())\n\n    // Create client\n    client := inference.NewHTTPClient(\"http://localhost:8000/v1\", \"api-key\")\n\n    // Run rollout\n    ctx := context.Background()\n    prompt := env.FormatPrompt(\"What is 2 + 2?\")\n    rollout, err := env.Rollout(ctx, client, config.Model, prompt, \"4\", config.SamplingArgs)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    fmt.Printf(\"Response: %s\\n\", rollout.Response)\n    fmt.Printf(\"Score: %.2f\\n\", rollout.Score)\n}\n```\n\n## Package Structure\n\n```\npkg/\n├── types/       # Core types and interfaces\n├── envs/        # Environment implementations\n├── parsers/     # Response parser implementations\n├── rubrics/     # Evaluation rubric implementations\n├── inference/   # Inference client implementations\n├── tools/       # Tool implementations (calculator, search, etc.)\n├── trainers/    # Training utilities\n└── utils/       # Utility functions\n```\n\n## Key Components\n\n### Environments\n\n- **SingleTurnEnv**: For one-shot question-answer tasks\n- **MultiTurnEnv**: For multi-turn conversations and interactions\n- **DialogMultiTurnEnv**: Example implementation for dialog-based tasks\n\n### Parsers\n\n- **BaseParser**: Returns trimmed response as-is\n- **LastLineParser**: Extracts the last non-empty line\n- **RegexParser**: Extracts content matching a pattern (coming soon)\n\n### Rubrics\n\n- **BaseRubric**: Simple exact match evaluation\n- **MultiMetricRubric**: Supports multiple weighted metrics\n\n### Inference Client\n\n- **HTTPClient**: OpenAI-compatible HTTP client with connection pooling\n\n## Migration Status\n\n### ✅ Fully Implemented (Pure Go)\n\n**Core Infrastructure:**\n- Environment interface with BaseEnvironment\n- Parser interface with all implementations (Base, XML, Think, Smola)\n- Rubric interface with all implementations (Base, MultiMetric, Math, Tool, CodeMath, Judge, RubricGroup, SmolaToolRubric)\n- Type-safe message and configuration structures\n- HTTP inference client with OpenAI API compatibility\n- Concurrent batch processing utilities\n- Dataset interface with builder pattern\n\n**Environment Types:**\n- SingleTurnEnv - One-shot question/answer tasks\n- MultiTurnEnv - Multi-turn conversations\n- ToolEnv - JSON-based tool calling\n- SmolaToolEnv - SmolaAgents-style tool usage\n- CodeMathEnv - Mathematical expression evaluation (Go-based)\n- DoubleCheckEnv - Answer verification mechanism\n- EnvGroup - Multiple environments as unified interface\n\n**Parsers:**\n- BaseParser - Simple trimming\n- XMLParser - Field extraction with alternatives\n- ThinkParser - Extract content after \u003c/think\u003e\n- SmolaParser - XML with tool JSON support\n\n**Rubrics:**\n- BaseRubric - Exact match evaluation\n- MultiMetricRubric - Weighted metrics\n- MathRubric - Mathematical answer evaluation\n- ToolRubric - Tool usage evaluation\n- CodeMathRubric - Code/expression execution scoring\n- JudgeRubric - LLM-based evaluation\n- RubricGroup - Aggregate multiple rubrics\n- SmolaToolRubric - SmolaAgents tool scoring\n\n**Tools:**\n- Calculator - Mathematical expression evaluator\n- WebSearch - Web search with caching\n- Tool execution framework with JSON parsing\n\n**Utilities:**\n- Math utilities (boxed answer extraction, normalization)\n- Concurrent processing with progress tracking\n- Dataset manipulation and filtering\n\n### ⏳ Not Implemented\n\nThese components require external dependencies or services that don't align with pure Go:\n- Full training pipeline (GRPO trainer) - Requires deep learning framework\n- vLLM server implementation - Python-specific\n- HuggingFace dataset integration - Python ecosystem\n- TextArena and ReasoningGym environments - External dependencies\n- Python code executor - Replaced with Go expression evaluator\n\n## Key Differences from Python Implementation\n\n1. **Pure Go**: No Python dependencies, all mathematical evaluation done in Go\n2. **Better Concurrency**: Native goroutines instead of asyncio\n3. **Type Safety**: Compile-time type checking prevents runtime errors\n4. **Performance**: HTTP connection pooling and efficient concurrent processing\n5. **Simplified Architecture**: Cleaner interfaces without Python's complexity\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests.\n\n## License\n\nMIT License - see LICENSE file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizome-dev%2Fgo-verifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizome-dev%2Fgo-verifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizome-dev%2Fgo-verifiers/lists"}