GithubHelp home page GithubHelp logo

gil-- / shoppy-gpt Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 13.0 171 KB

A Nextjs + Pinecone + OpenAI GPT site to surface answers to Shopify help center content

JavaScript 100.00%
nextjs openai pinecone shopify

shoppy-gpt's Introduction

**This is a research demo. Support is not provided.

Shopify Help Center Search via GPT

Quickly surface answers from Shopify's help center using GPT.

Technologies used

  • ScrapingBee to scrape list of help center urls
  • Mongodb to store scraped data
  • OpenAI to created embeddings vector points and completion prompt
  • Pinecone to store vectors in db

How this works

  1. Run tasks/1-sitemap-to-csv.js to convert Shopify's Help Center Sitemap.xml into CSV and drop all columns except urls.
  2. Convert CSV into array of links.
  3. Run tasks/2-scrape.js to scrape the article text from every link using ScrapingBee and isnert text into Mongodb using url as unique index.
  4. Run tasks/3-generate-embeddings.js to generate OpenAI embeddings and upsert into Pinecone.

Why?

Created this as a research experiment in order to learn OpenAI embeddings + Pinecone. Added bonus was to have a way to quickly surface answers for my Shopify platform questions.

How to optimize this further

  • Split article text into smaller documents to decrease cost of token usage. Split by H2/section.
  • Test different models to see one cost. Curie is 10x cheaper than Davinci.
  • Search documents with a normal search engine (Algolia) and pass that document into open AI rather than using embedding’s and Pinecone.
  • Cache results for common queries.
  • Test a shorter prompt to further save tokens.

Preview

preview.png

shoppy-gpt's People

Contributors

gil-- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.