Introduction
We have developed RecGen, a new open-source recommendation system built with the Django framework. The primary goal of RecGen is to enable anyone to create their own recommendation system without requiring software development expertise. Users can input recommendation content manually or import data using a simple Excel spreadsheet.
RecGen is designed for both the scientific community—offering a ready-made platform for testing recommendation research—and anyone interested in building a recommendation system on a topic of their choice. It specializes in self-assessment-based recommendations, where users answer a series of questions (an Audit) to evaluate their current situation within the system’s chosen topic. Based on this assessment, RecGen provides an overview of the user’s current state, highlights the gap between their situation and the ideal outcome, and offers context-appropriate recommendations to help them achieve that ideal.
How It Works
For the initial setup of the system, it is preferred to use the data import functionality. This allows domain experts to fill in the data into a spreadsheet document and import it in one go. Imported data can be later edited using the system’s UI.
Data Import
Data import can be done in 2 ways, either using inbuild data upload from excel spreadsheets, where administrators can download a pre-formatted Excel spreadsheet. Filling out spreadsheet sheets with relevant information (see included examples for more information) and then uploading it to the same page, will automatically generate all database entries for the recommendations system:
Data required for the recommendation system to function are: Category, Question, and Recommendation. Each of them is filled out in their corresponding spreadsheet sheets. There are two more sheets where the relationship between data is defined. Entity relations can be seen below:
Using inbuild data upload functionality, to prevent user error in data input, all data are validated. For example, validation of Questions from spreadsheets is seen below:
During validation, checks to validate if user input data at all, or if data already exists in database or simply to check if user has selected valid question type from options provided. Based on validation results, administrator will be informed about any data discrepancies. If validation is successful, the will start data input in database, data will be updated, created or rejected.
Here is a short example of a filled-out Question datasheet:
Of course, there will be situations where data for the recommendations system will need to be updated. No worries, just update the original Excel spreadsheet with new or changed data and upload it again. All changes to the recommendation system will be automatic.
If usage of spreadsheet is not favorable, administrator can use prepared forms for data input. In case of using input forms from inside of system, certain sequence of inputs is required. First and foremost, Categories need to be created. After creation of categories, Recommendations are created, where administrator can assign any Recommendation to most appropriate Category. Only after Categories and Recommendations are in the system, then Questions can be created. See form below:
The same is created for all input classes (Category, Question, Recommendation). These forms will allow making adjustments to data in system, as usage of spreadsheets upload and manual data input is interchangeable.
Audit System Usage
After successful data input into database, either using spreadsheet upload or manual input via user interface. The first change that will be seen is the Audit page with all questions defined and categorized into their respective categories:
Any registered user will have access to the audit page with all data included. By selecting any of the categories and performing an audit by pressing “Perform an audit” specific categories question will be shown to the user as a quiz to fill out:
Questions in each category audit page are generated based on question type that was selected during the spreadsheet completion or manual data input in user interface shown before. During opening of any Category audit, Django framework uses predefined parameters for each question type (variable in code: answer_type) and generates audit page for user to fill out:
It checks if the user has previously filled out said Categories audit page, collects data if there is any from past answers and prepares page. After filling out audit page, add data are saved in database and used to represent the users results in said categories and provide recommendations associated with it. After finishing the audit, the user will be taken to the Dashboard to see the results:
Repeat it several times to have recommendations for different categories:
Once the user has completed at least one audit questionnaire they will be presented with the recommendations. The more audit categories they will fill out the more recommendations will be presented, and existing recommendations will be accurate, as recommendation can be associated with more than one Category and require for more accurate recommendation, data from several Categories. Recommendations are available on the same dashboard page, below the compliance level chart and audit results.
Users can see how much their answers meet recommendations defined by administrators. Recommendations will be shown only for categories where the audit results are lower than 70%. This value (RECOMMENDATION_THRESHOLD), same as many others are adjustable in .env file:
More in-depth information about Recommendations on the systems Recommendations page, where all information about recommendations that systems users have acquired, be it compliance of 0% or 100%. In this page, all users’ answers will be shown, as well as goal set by systems administrator that needs to be achieved.
If you have any questions or suggestions, please reach out to us on our GitHub page: https://github.com/flpp20191/RecGen.
Acknowledgement
This research was funded by the Latvian Council of Science, project “Testing Interventions and Developing a Knowledge-based Recommendation System to Reduce Plate Waste in School Catering in Latvia”, project No. lzp-2022/1-0492
Citation
Kodors, S.; Apeinans, I.; Zarembo, I.; Lonska, J. RecGen: No-Coding Shell of Rule-Based Expert System with Digital Twin and Capability-Driven Approach Elements for Building Recommendation Systems. Appl. Sci. 2025, 15, 10482. https://doi.org/10.3390/app151910482
Top comments (0)