Mandy Hale

Full stack developer & innovator

thumbnail

LLM-Powered Book Search

PythonOpenAiLangchainGradio

Data is essential for driving good decision-making, particularly in impact-focused spaces. Keen to explore projects where I can expand my skillset in working with data and Python, I decided to build an LLM-powered book recommender.

Project overview

Data is essential for driving good decision-making, particularly in impact-focused spaces. Keen to explore projects where I can expand my skillset in working with data, I decided to build an LLM-powered book recommendation system. Following a freeCodeCamp tutorial, I created a system that not only recommends books but also lets users filter by category and emotional tone. This project was my first step into data science and Large Language Models (LLMs), combining my curiosity with practical application.

Tech stack and implementation

The project leverages Python, OpenAI, LangChain, and Gradio to create a user-friendly book recommendation dashboard. At its core, the system comprises four key components:

  1. A vector database for similarity-based book recommendations
  2. A zero-shot classification model for fiction/non-fiction categorisation
  3. A fine-tuned text classification model for emotional tone analysis
  4. An intuitive Gradio interface for demonstration purposes

Growth reflections

As my first Python project, I encountered and overcame several challenges. The syntax differences compared to JavaScript and PHP, which I am more familiar with, initially posed hurdles. But as I began to recognise similar patterns I became more confident working with teh python codebase. A particularly proud moment came when I independently debugged and resolved a data duplication issue in my final implementation, applying the Python skills I'd learned throughout the course to correct my problem.

The project was a great way to explore the capabilities of LLMs and to gain skills in working with Python and data. Working with real data from KaggleHub taught me valuable lessons about data cleaning, analysis, and the importance of data quality in machine learning applications. I learned to make practical decisions about feature implementation based on data consistency—such as limiting category classification to fiction/non-fiction due to data sparsity in more specific categories. I also learned how to see the opportunity with long text descriptions to analyse emotional tone alongside text similarity and enhance the recommendation system.

Where to from here?

Building this book recommender has sparked my interest in data storytelling and LLM applications. As a next step, I am looking to deepen my understanding of working with data and natural language processing models through Hugging Face's NLP course. The experience of working through this tutorial has been a valuable stepping stone in my journey to use AI and data science for strategic solutions in business and decision-making. Give it a go below, and let me know what you think!

2025 — Mandy Hale | Full stack web developer and creative problem solver.