# Gorse — Open-Source Recommendation System in Go > Gorse is a self-hosted recommendation engine written in Go that delivers real-time personalized content, product, and item suggestions through a simple REST API with no machine learning expertise required. ## Install Save as a script file and run: # Gorse — Open-Source Recommendation System in Go ## Quick Use ```bash docker compose -f https://raw.githubusercontent.com/gorse-io/gorse/release-0.4/docker-compose.yml up -d # Dashboard: http://localhost:8088 — API: http://localhost:8087 curl http://localhost:8087/api/recommend/user1?n=10 ``` ## 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. ## Sources - https://github.com/gorse-io/gorse - https://gorse.io/docs/ --- Source: https://tokrepo.com/en/workflows/b5450c9e-3f0f-11f1-9bc6-00163e2b0d79 Author: Script Depot