Socket
Book a DemoInstallSign in
Socket

active_genie

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active_genie

0.30.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

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 extract, compare, score, and rank with consistency and model-agnostic. 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

  • Add to your Gemfile:
gem 'active_genie'
  • Install the gem:
bundle install
  • Generate the configuration:
echo "ActiveGenie.load_tasks" >> Rakefile
rails active_genie:install
  • 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_name: :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

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

License

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

FAQs

Package last updated on 15 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.