IdeaNova AI-Powered Recommendations
1. Problem To Solve
IdeaNova, our client, currently receives media recommendations from a third-party service; however, this service is too costly, not accurate enough, and lacks functionality. Our goal is to create an AI-powered service that recommends media, restaurants, and attractions tailored to demographic profiles and viewing histories.
Additional considerations:
- Network connectivity
- IdeaNova primarily runs software on airplanes, so internet connectivity may be limited or unavailable at times.
- Resource requirements
- Airplanes often have low resource pools; it's important to minimize our resource footprint.
- AI model concerns
- Hallucinations & Non-determinism can cause AI-generated results to vary. Our backend needs to make responses insulated from these negative impacts.
- Model costs can sometimes be high. It's important to minimize tokens spent to keep costs low
2. Our Solution
We developed a custom AI recommendation service that emphasizes flexibility and control. The system is composed of a frontend, a backend, and a SQLite database. The entire project is dockerized, and can run on any system.
The backend is a Java Vert.x project with a modular architecture that utilizes dependency injection to allow polymorphic behavior. The backend takes user demographics and watch history data, then uses OpenAI's completions to infer high-level themes, such as genre interests or tastes. These inferred preferences are converted into vector embeddings, stored in a SQLite database. This setup allows for lightning-fast retrieval and offline capabilities.
Then, recommendations can be computed using the cosine similarity vectors. Comparing item vectors with user vectors enables the system to display results that are most semantically similar to the user's preferences. To improve consistency and accuracy, we use vector weighting via token duplication, based on the user's watch history.
For display and test purposes, we also provided a Typescript React frontend, served through Vite. The entire stack is fully containerized using Docker, and an Nginx reverse proxy securely routes traffic. This setup enables easy and rapid testing, as well as seamless deployment.