0.02
A long-lived project that still receives updates
ActiveGenie is a Ruby gem that helps developers build reliable, future-proof GenAI features without worrying about changing models, prompts, or providers. Like Lodash for GenAI, it offers simple, reusable modules for tasks like data extraction, scoring, and ranking, so you can focus on your app’s logic, not the shifting AI landscape. Behind the scenes, a custom benchmarking system keeps everything consistent across LLM vendors and versions, release after release.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

ActiveGenie 🧞‍♂️

The Lodash for GenAI: Real Value + Consistent + Model-Agnostic

Gem Version Ruby

ActiveGenie is a developer-first library for GenAI workflows, designed to help you compare, rank, and score LLM outputs with consistency and model-agnostic flexibility. Think of it as the Lodash for GenAI: built for real value, consistent results, and freedom from vendor lock-in. It solves the biggest pain in GenAI today: getting predictable, trustworthy answers across use cases, models, and providers.

Behind the scenes, a custom benchmarking system keeps everything consistent across LLM vendors and versions, release after release.

For full documentation, visit activegenie.ai.

Installation

  1. Add to your Gemfile:
gem 'active_genie'
  1. Install the gem:
bundle install
  1. Generate the configuration:
echo "ActiveGenie.load_tasks" >> Rakefile
rails g active_genie:install
  1. Configure your credentials in config/initializers/active_genie.rb:
ActiveGenie.configure do |config|
  config.providers.openai.api_key = ENV['OPENAI_API_KEY']
end

Quick start example

Extract structured data from text using AI-powered analysis, handling informal language and complex expressions.

text = "Nike Air Max 90 - Size 42 - $199.99"
schema = {
  brand: {
    type: 'string',
    enum: ["Nike", "Adidas", "Puma"]
  },
  price: {
    type: 'number',
    minimum: 0
  },
  size: {
    type: 'number',
    minimum: 35,
    maximum: 46
  }
}

result = ActiveGenie::DataExtractor.call(
  text,
  schema,
  config: { provider: :openai, model: 'gpt-4.1-mini' } # optional
)
# => {
#      brand: "Nike",
#      brand_explanation: "Brand name found at start of text",
#      price: 199.99,
#      price_explanation: "Price found in USD format at end",
#      size: 42,
#      size_explanation: "Size explicitly stated in the middle"
#    }

Documentation

For full documentation, visit activegenie.ai.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the Apache License 2.0 License - see the LICENSE file for details.