Ruby Machine Learning

Open-source Ruby projects categorized as Machine Learning
Ruby Rubyml Rails AI LLM

Top 23 Ruby Machine Learning Projects

Machine Learning
  1. machine-learning-with-ruby

    Curated list: Resources for machine learning in Ruby

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. langchainrb

    Build LLM-powered applications in Ruby

  4. anystyle

    Fast citation reference parsing

  5. Awesome NLP with Ruby

    Curated List: Practical Natural Language Processing done in Ruby

  6. Rumale

    Rumale is a machine learning library in Ruby

  7. AITreasureBox

    🤖 Automatically collected AI repos, tools, websites, papers & tutorials. 实用AI百宝箱 💎

  8. tensorflow.rb

    tensorflow for ruby

  9. Eps

    Machine learning for Ruby

  10. dspy.rb

    The Ruby framework for programming—rather than prompting—language models.

    Project mention: Building an AI agent inside a 7-year-old Rails monolith | news.ycombinator.com | 2025-12-26

    Thanks for sharing your experience! I know there's many of us out there dabbling with LLMs and some solid businesess built on Ruby, lurking in the background without publishing much.

    Your single-tool approach is a solid starting point. As it grows, you might hit context window limits and find the prompt getting unwieldy. Things like why is this prompt choking on 1.5MB of JSON from this other API?

    When you look at systems like Codex CLI, they run at least four separate LLM subsystems: (1) the main agent prompt, (2) a summarizer model that watches the reasoning trace and produces user-facing updates like "Searching for test files...", (3) compaction and (4) a reviewer agent. Each one only sees the context it needs. Like a function with their inputs and outputs. Total tokens stay similar, but signal density per prompt goes up.

    DSPy.rb[0] enables this pattern in Ruby: define typed Signatures for each concern, compose them as Modules/Prompting Techniques (simple predictor, CoT, ReAct, CodeAct, your own, ...), and let each maintain its own memory scope. Three articles that show this:

    - "Ephemeral Memory Chat"[1] — the Two-Struct pattern (rich storage vs. lean prompt context) plus cost-based routing between cheap and expensive models.

    - "Evaluator Loops"[2] — decompose generation from evaluation: a cheap model drafts, a smarter model critiques, each with its own focused signature.

    - "Workflow Router"[3] — route requests to the right model based on complexity, only escalate to expensive LLMs when needed.

    And since you're already using RubyLLM, the dspy-ruby_llm adapter lets you keep your provider setup while gaining the decomposition benefits.

    Thanks for coming to my TED talk. Let me know if you need someone to bounce ideas off.

    [0] https://github.com/vicentereig/dspy.rb

  11. wp2txt

    A command-line tool to extract plain text from Wikipedia dumps with category and section filtering

    Project mention: Show HN: WP2TXT – Wikipedia dump text extractor with category/section filtering | news.ycombinator.com | 2026-02-20
  12. XGBoost

    High performance gradient boosting for Ruby

  13. LightGBM

    High performance gradient boosting for Ruby

  14. Scoruby

    Ruby Scoring API for PMML

  15. weka

    Machine Learning & Data Mining with JRuby

  16. gitingest

    Gitingest is a command-line tool that fetches files from a GitHub repository and generates a consolidated text prompt for your LLMs. (by davidesantangelo)

  17. Ruby Linear Regression

    Linear regression implemented in Ruby.

  18. instruct

    Instruct LLMs to do what you want in Ruby

  19. ruby-dnn

    ruby-dnn is a ruby deep learning library.

  20. kobako

    Embeddable Wasm sandbox for running untrusted mruby code from Ruby applications.

  21. Ruby Datumbox Wrapper

    Simple Ruby Datumbox Wrapper

  22. poml

    Ruby implementation of Prompt Orchestration Markup Language (by GhennadiiMir)

  23. Edits

    Edit distance algorithms inc. Jaro, Damerau-Levenshtein, and Optimal Alignment

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Ruby Machine Learning discussion

Log in or Post with

Ruby Machine Learning related posts

  • ruby_llm VS langchainrb - a user suggested alternative

    2 projects | 14 May 2025
  • langchainrb VS ruby_llm - a user suggested alternative

    2 projects | 14 May 2025
  • Train Your Own LLM: A Deep Dive with Ruby

    16 projects | dev.to | 11 Apr 2025
  • Ruby vs. Python comes down to the for loop (2021)

    2 projects | news.ycombinator.com | 22 Apr 2024
  • Langchain.rb

    1 project | news.ycombinator.com | 21 Jan 2024
  • AnyStyle

    1 project | news.ycombinator.com | 11 Jan 2024
  • Un repo con herramientas, documentación y recursos para el manejo de lenguaje natural en Ruby

    1 project | /r/technopreneursAI | 24 Oct 2023
  • A note from our sponsor - SaaSHub
    www.saashub.com | 15 Aug 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Machine Learning projects in Ruby? This list will help you:

# Project Stars
1 machine-learning-with-ruby 2,215
2 langchainrb 1,990
3 anystyle 1,281
4 Awesome NLP with Ruby 1,076
5 Rumale 914
6 AITreasureBox 852
7 tensorflow.rb 832
8 meme-search 716
9 Eps 692
10 dspy.rb 235
11 wp2txt 195
12 XGBoost 121
13 LightGBM 84
14 Scoruby 70
15 weka 65
16 gitingest 61
17 Ruby Linear Regression 53
18 instruct 49
19 ruby-dnn 46
20 kobako 12
21 Ruby Datumbox Wrapper 10
22 poml 7
23 Edits 3

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com