Inspiration

As international students who just moved to Amherst this fall. We realized different stores in the US had different price points for the same product. Although one could say "this" store usually sells "this" item cheap, it's not always the case.

What it does

We thus introduce "Amherst PricePatrol", a Gen-AI based comparison tool that uses web scraped data to compare the items you want to purchase from your favorite grocery stores on a single screen, making it way simpler to find the best deals in town.

How we built it

We used Python and AgentQL to scrape data from sites like Walmart, Price Chopper, and Aldi's, gathering prices, titles, and price per ounce for items in categories like coffee, bread, peanut butter, chicken, eggs, and milk for demo purposes. Our chatbot interface, built with LangChain, using gpt-3.5-turbo as the underlying LLM, and hosted on Streamlit, provides an interactive way for users to find the best deals.

Challenges we ran into

The most challenging part of this hack was figuring out which websites let you scrape information without blocking after a certain number of attempts. We hence had to come up with multiple workarounds and get our scraping code right so we could have a trustworthy database for the LLM to work with. An additional issue we faced was integrating the frontend and backend components of the project. While streamlit is a great platform for hosting LLMs, modifying its UI required us to dive deep into the nitty gritty of its documentation for us to get a desired result. Another interesting issue we faced was that many products, though similar in their product name, would differ in prices because of difference in quantity sold (e.g: a 1 dozen packet of eggs in Aldi's would cost $X while the same brand of eggs being sold in Walmart would cost a different price $Y because they were selling 6 in a pack). In order to make sure that the LLM was making the right comparison of prices between products, we had to ensure that the price values were normalized - so we wrote a python script for the same.

Accomplishments that we're proud of

Our core intention while kicking off this project was to ensure that we had a deliverable that would have a real, positive impact on a problem that people face on a daily basis. We're really glad that our final output is on the right track to mitigating an issue commonly faced by students in Amherst - by making their grocery-shopping experience way simpler.

What we learned

Our biggest takeaway from the project was fine-tuning the LLM to suit our needs specifically and make sure that it was fed information in the correct format for it to be able to process information correctly. This involved a lot of background work as it required us to first structure the CSV file in just the right way, then vectorize this data and store them as multiple chunks. It took us quite a number of trials before arriving at the correct number of chunks (900 in this case), such that document similarity was being performed correctly.

What's next for PricePatrol?

There's a bunch of interesting features that we'd like to add moving forward. This includes using a user's live location to suggest the closest location for them to get a certain item in Amherst. We also believe that giving real-time notifications on price drops/ deals could be a useful feature. Finally, we'd like to implement saving user preferences so better recommendations can be given on future purchases as well as providing easy access to frequently purchased items.

Built With

Share this project:

Updates