Skip to content

An LLM-based dinner recipe recommender system for inspiration and weekly menus. Publicly available at https://ukesmeny.onrender.com.

Notifications You must be signed in to change notification settings

Eirsteir/ukesmeny

Repository files navigation

Ukesmeny

An LLM-based dinner recipe recommender system for inspiration and weekly menus. All recipes are from Meny.no. Publicly available at https://ukesmeny.onrender.com.

The main application is a chainlit chat application with a simple UI, which can be run locally or deployed to a server. It is a RAG (retrieval augmented generation) application built with LangChain which feeds scraped and preprocessed recipes from Meny.no into gpt-turbo-3.5. Retrieval occurs over a LanceDB vector store.

This project also contain a number of experiments with different models and datasets using LangChain and other ML models.

Installation

Configure the environment variables in a new .env file and add the following:

OPENAI_API_KEY=YOUR_API_KEY

You can generate an OpenAI key here. Then, run these commands to start the application:

pip install -r requirements.txt
chainlit run app.py -w

The application will be available at http://localhost:8000/.

Data

Data is scraped from meny.no and comprises around 500 recipes with descriptions, ingredients, and instructions. The data is stored in data/recipes.pkl and can be updated by running python scrape.py.

Vector embeddings are generated for each recipe using text-embedding-ada-02 from OpenAI. The embeddings can be generated by running the notebook neo4j/preprocess.ipynb. They are required to run the application.

Experiments

A few experiments are included in this project. They are all based on the same dataset, but use different models and approaches.

Neo4j

These experiments use Neo4j to store the recipes, ingredients and weekly menus including their relations. The tests include RAG with Neo4j in LangChain, training of Graph Neural Networks with Pytorch Geometric including tags prediction and other graph algorithms like GraphSAGE.

PostgreSQL

Experiments with RAG over PostgreSQL in LangChain. Uses LLM to generate SQL for querying over relational data in natural language.

Notes

This project is a work in progress. It is not intended for production use.

All OpenAI API tokens are revoked. You will need to generate your own to run the application.

About

An LLM-based dinner recipe recommender system for inspiration and weekly menus. Publicly available at https://ukesmeny.onrender.com.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published