google-reviews-analyzer
Google Reviews Analyzer
Introduction
It gather the reviews of businesses using SerpApi. And then structure the data to feed into OpenAI LLM with the use of Langchain LLM framework. With custom prompting, we produce the result as below.
Example Reults
Sample analysis
1. Food Quality (👍): ⭐⭐⭐⭐⭐
2. Service (👍): ⭐⭐⭐⭐
3. Cleanliness (👎): ⭐⭐
4. Price (👍): ⭐⭐⭐⭐
5. Taste (👍): ⭐⭐⭐⭐⭐
6. Portions (👍): ⭐⭐⭐⭐
7. Variety (👍): ⭐⭐⭐
8. Atmosphere (👍): ⭐⭐⭐⭐
9. Value (👍): ⭐⭐⭐⭐
10. Parking (👍): ⭐⭐⭐
Launch it with Vercel
or run it locally
Prerequisite
Before running the application, we have to get the necessary API key:
- Duplicate the file
.env.example
and rename it to.env
- We need 2 API keys from SerpApi and OpenAI for
SERPAPI_KEY
andOPENAI_API_KEY
respectively.
Installation
First, install the dependencies
npm install
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Building Blocks
- Next.JS - React framework for the web application
- Langchain - Framework for the LLM
- OpenAI - LLM provider
- SerpApi - Data provider for the businesses reviews on Google. Related documentations: Google Maps API and Google Maps Reviews API.
Future Improvements
Quick analysis is fine, it helps you to understand the review as quick and intuitive as possible. But what if you can chat with it? Sort of like interviewing your customers. I believe we can get more in depth understanding out of it.