Inspiration

When I was searching for a good laptop to buy ,I spent so much hours going through the reviews looking for that one information which makes me choose the laptop over other's with similar price range

what it does

It is a chatbot ,where you can ask Q/A from reviews

How I Built it

Built it with google's Prompt API ,Translator API and universal-sentence-encoder from tensorflow.js

Challenges I ran into

1 .fetching review data and extracting the review content - fetching was done in background but you can't use Domparser in background so I sent the data to another script in front to extract the data with html selectors then again sent it to background for embedding it in Universal sentence encoder.

2 .translating the language while streaming output from chatbot - I want the tool to support multiple language at the same time if the translator was created every-time the user inputs or the LLM outputs it affects speed so I made it to be created at the time of choosing language and use the translator in converting inputs and outputs to other languages. Since converting of languages is one way (means either english to spanish or spanish to english) I made two translator.

3 .handling delays while review data is processed buy universal-sentence-encoder - when fetching data it fetches from review pages ,A product can have 1 or 2 pages or 5 or 10 pages depending on the lenght initial model time can increase on higher no of pages So I made the computing be first done for first one page then the other over time ,thus reducing initial waiting time.

Accomplishments that I am proud of are

making it faster by using batch computation on review data to embed it so that relevant information can be sent to the LLM

what I learned

BY This hackathon I learned to build a google extension from scratch.

what's next for Review-Lens

To expand the number of websites it can be used ,currently it works in amazon and Flipkart only.And to expand the no of language it supports

Built With

  • javascript
  • prompt-api
  • tensorflow.js
  • translator-api
  • universal-sentence-encoder
Share this project:

Updates