How jonathandika/llm-recommender-system works
Main Components
• User Interface Layer: Represent two entry points – one via app.py (for the content-based, parallel variant) and another via app_RL.py (for the RL variant). Label these as “Streamlit UI – Content-Based” and “Streamlit UI – RL-based.”
• Data Handling & Storage: Show the “data” component that holds preprocessed datasets (e.g., .parquet files). Indicate that the system retrieves raw and cleaned user ratings and book data from this component.
• RAG and LLM Integration: Include modules like RAG.py and RAG_llm_as_recsys.py that integrate the Retrieval Augmented Generation approach.
• Parallel Processing: Illustrate both “modules/parallel” and “modules/original” components to capture different approaches in data preprocessing and recommendation generation – emphasize the parallelized operations that boost efficiency.
• Reinforcement Learning: Detail the “modules/reinforcement_learning” folder (containing RAG_RL.py and recommendation_system_RL.py) plus the “modules/helper/DQNAgent.py” to indicate the DDQN algorithm and feedback-loop mechanism.
• Helper/Utility Modules: Include “modules/helper” components such as indexing vector embeddings, Pinecone integrations, and a predictor for ratings. These are the underlying libraries and utilities that support the data retrieval, embedding generation, and similarity computations.
Relationships and Interactions
• Within the Core Processing Modules, indicate communication between the RAG components, parallel processing routines, and reinforcement learning feedback loops.
Architectural Patterns and Key Technologies
• That the project leverages parallel computing to optimize processing speeds – illustrate separation/branching between sequential (“original”) and parallelized (“parallel”) workflows.
• Use of a RAG model for integrating external LLM capabilities with recommendation logic.
• For the RL variant, clearly mark how the DDQN algorithm (found in modules/helper/DQNAgent.py) adapts to user interactions.
• Annotations should mention that the project uses streamlit for deploying its user interface.