AI Skill Hub 推荐使用:Ruby LLM 评估引擎 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
Ruby LLM 评估引擎 是一款基于 Ruby 开发的开源工具,专注于 Ruby、LLM、Rails 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
Ruby LLM 评估引擎 是一款基于 Ruby 开发的开源工具,专注于 Ruby、LLM、Rails 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/sinaptia/ruby_llm-evals cd ruby_llm-evals # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 ruby_llm-evals --help # 基本运行 ruby_llm-evals [options] <input> # 详细使用说明请查阅文档 # https://github.com/sinaptia/ruby_llm-evals
# ruby_llm-evals 配置说明 # 查看配置选项 ruby_llm-evals --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export RUBY_LLM_EVALS_CONFIG="/path/to/config.yml"
Test, compare, and improve your LLM prompts within your Rails application.
[!NOTE] This engine relies on ActiveJob, ActiveStorage, and RubyLLM. Make sure you have them installed and configured.
Add this line to your application's Gemfile:
gem "ruby_llm-evals"
And then execute:
$ bundle
To copy and migrate RubyLLM::Evals's migrations, run:
$ rails ruby_llm_evals:install:migrations db:migrate
And then mount the engine in your config/routes.rb:
Rails.application.routes.draw do
# ...
mount RubyLLM::Evals::Engine, at: "/evals"
end
Now you should be able to browse to /evals and create, test, compare, and improve your LLM prompts. Continue reading to see how a typical workflow looks like, and how you can leverage your app's data to add samples to your prompts.

chat = prompt.to_chat(variables: { "text" => "I love this product!" })
authenticate :user do mount RubyLLM::Evals::Engine, at: "/evals" end
See more examples [here](https://github.com/heartcombo/devise/wiki/How-To%3A-Define-resource-actions-that-require-authentication-using-routes.rb).
However, if you're using Rails' default authentication generator, or an authentication solution that doesn't provide constraints, you need to roll out your own solution:
ruby
constraints ->(request) { Constraints::Auth.authenticated?(request) } do mount RubyLLM::Evals::Engine, at: "/evals" end
RubyLLM::Evals::Engine.middleware.use(Rack::Auth::Basic) do |username, password| ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.ruby_llm_evals_username, username) & ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.ruby_llm_evals_password, password) end ```
chat.messages.count # => 1 (user message)
A typical workflow looks like this:
A prompt represents an LLM prompt template with:
{"max_tokens": 1000}).["Weather", "Calculator"]). See how tools are defined in RubyLLM.User) to structure the LLM's response, or use "other" to provide a custom JSON schema in the Schema Other field. See RubyLLM structured output.low, medium, high). See how thinking works in RubyLLM.Both the instructions and the message template can contain liquid tags that will be rendered at runtime. To add variables, enclose them with braces. Eg: {{name}}.
[!NOTE] In order to use a provider, you must have it configured in config/initializers/ruby_llm.rb as explained here
When creating/editing a prompt you can add samples, where you can define:
{ "name": "Patricio" }humanOnce you have a prompt with its examples you can run the evaluations. This will enqueue a job that will create an run and run each sample with the current prompt configuration.
The run will save the current prompt configuration for later analysis, such as the current provider/model, instructions, messages, variables, etc.
You can view the accuracy, cost, and duration of the entire run and each individual prompt execution.
If you chose the human review eval type, it's now that you can review if an eval passed or not.
When you find a run with particularly good results, you can pin it (only one per prompt). This helps you keep track of the best-performing prompt configurations as you iterate and experiment, but also will be how a prompt will be configured when you execute it (see below).
Suppose you want to categorize images. You can have a prompt (eg. image-categorization) and then add your data to the eval set:
prompt = RubyLLM::Evals::Prompt.find_by slug: "image-categorization"
Image.where(category: nil).take(50).each do |image|
sample = prompt.samples.create eval_type: :human_judge
sample.files.attach image.attachment.blob
end
Then you can iterate over the prompt trying to find the best configuration possible.
Once you've tested and refined your prompt, you can use it in your application code.
Execute prompts by their slug to get a response object with content and metadata. If a pinned run exists for this prompt, it will use the pinned run's configuration (model, provider, temperature, etc.) instead of the prompt's current settings:
```ruby
高质量的LLM评估引擎
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
总体来看,Ruby LLM 评估引擎 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | ruby_llm-evals |
| 原始描述 | 开源AI工具:LLM evaluation engine for Rails.。⭐21 · Ruby |
| Topics | RubyLLMRails |
| GitHub | https://github.com/sinaptia/ruby_llm-evals |
| 语言 | Ruby |
收录时间:2026-06-10 · 更新时间:2026-06-10 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。