Skip to content

A practical real-world example of automating contract processing with AI using Ruby

Notifications You must be signed in to change notification settings

sahmed007/ruby-contract-risk-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contract Risk Analysis with Ruby

A practical real-world example of automating contract processing with AI using Ruby.

This repository contains a real world example of how to use RubyLLM to extract information from contracts, enrich it with generated data, and export it to a CSV file.

Installation

Clone the repo and run bundle install to install dependencies.

bundle install

Usage

These examples use OpenRouter API for LLM calls. You will need to set up an OpenRouter API key by creating a .env file using the .env.example as a template.

If you would like to use a different LLM provider, you can modify the configuration in the main.rb file to use a different LLM provider along with the model of your choice as well. In this example, the meta-llama/llama-3.2-3b-instruct model is used.

The LLM calls are made using the RubyLLM gem. To see the complete list of models, you can go here.

In the main.rb file, you will see a step by step process of extracting information from contracts and exporting it to a CSV file. Simply run with ruby main.rb to see the results.

Contributing

Pull requests are always welcome.

License

MIT

About

A practical real-world example of automating contract processing with AI using Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages