Introduction
Gorse is an open-source recommendation system written in Go that automates collaborative filtering and content-based recommendations. It provides a REST API that returns personalized item suggestions without requiring teams to build their own ML pipelines or understand recommendation algorithms in depth.
What Gorse Does
- Generates personalized item recommendations for each user based on interaction history
- Supports collaborative filtering, content-based filtering, and hybrid approaches
- Provides a RESTful API for inserting feedback, users, items, and fetching recommendations
- Includes a web dashboard for monitoring recommendation quality and system health
- Auto-tunes model hyperparameters using random search to optimize recommendation accuracy
Architecture Overview
Gorse follows a master-worker architecture. The master node coordinates model training, data preprocessing, and API serving, while worker nodes handle the compute-intensive tasks of model fitting and recommendation generation. Data is stored in MySQL, PostgreSQL, or MongoDB for persistent state, with Redis or the built-in cache for low-latency recommendation serving. The system periodically retrains models in the background to incorporate new user feedback.
Self-Hosting & Configuration
- Deploy via Docker Compose with Redis and a SQL database (MySQL or PostgreSQL)
- Configure through a TOML config file specifying database URLs, model parameters, and cache TTL
- Scale horizontally by adding worker nodes for larger item catalogs and user bases
- Set recommendation refresh intervals based on how frequently your content changes
- Environment variables override config file values for container-based deployments
Key Features
- Zero ML expertise required: insert users, items, and feedback; Gorse handles model selection
- Auto hyperparameter tuning selects the best algorithm configuration automatically
- Multi-source recommendation blending: latest items, popular items, collaborative, and content-based
- Distributed architecture scales from a single Docker container to a multi-node cluster
- RESTful API with Swagger documentation for straightforward integration
Comparison with Similar Tools
- LensKit — Python library for offline recommendation research; not a deployable service
- Surprise — Python scikit for building and evaluating recommender systems; research-oriented
- Recbole — PyTorch-based framework for benchmarking; heavier and more research-focused
- Amazon Personalize — Managed AWS service; no self-hosting and usage-based pricing
- LightFM — Python library for hybrid recommendations; must be wrapped in a custom API
FAQ
Q: What types of feedback does Gorse support? A: Gorse accepts both explicit feedback (ratings) and implicit feedback (clicks, views, purchases). Implicit feedback is more common in production settings.
Q: How many items and users can Gorse handle? A: Gorse has been tested with millions of items and users. Performance depends on the number of worker nodes and the backing database capacity.
Q: Does Gorse support real-time updates? A: Yes. New feedback is ingested immediately via the API and influences the next recommendation refresh cycle. The cache TTL controls how quickly recommendations update.
Q: Can I use Gorse for content other than products? A: Yes. Gorse is domain-agnostic. It works for articles, videos, music, jobs, or any item type as long as you provide user-item interaction data.