{"id":17520697,"url":"https://github.com/gil--/shoppy-gpt","last_synced_at":"2025-04-23T16:10:10.009Z","repository":{"id":65759414,"uuid":"597929520","full_name":"gil--/shoppy-gpt","owner":"gil--","description":"A Nextjs + Pinecone + OpenAI GPT site to surface answers to Shopify help center content","archived":false,"fork":false,"pushed_at":"2023-02-06T14:52:29.000Z","size":171,"stargazers_count":64,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-23T16:09:52.414Z","etag":null,"topics":["nextjs","openai","pinecone","shopify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gil--.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-02-06T02:32:50.000Z","updated_at":"2024-11-05T21:11:52.000Z","dependencies_parsed_at":"2023-02-19T09:01:16.848Z","dependency_job_id":null,"html_url":"https://github.com/gil--/shoppy-gpt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gil--%2Fshoppy-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gil--%2Fshoppy-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gil--%2Fshoppy-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gil--%2Fshoppy-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gil--","download_url":"https://codeload.github.com/gil--/shoppy-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468270,"owners_count":21435452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","openai","pinecone","shopify"],"created_at":"2024-10-20T11:24:20.081Z","updated_at":"2025-04-23T16:10:09.986Z","avatar_url":"https://github.com/gil--.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This is a research demo. Support is not provided.\n\n# Shopify Help Center Search via GPT\nQuickly surface answers from Shopify's help center using GPT.\n\n## Technologies used\n- ScrapingBee to scrape list of help center urls\n- Mongodb to store scraped data\n- OpenAI to created embeddings vector points and completion prompt\n- Pinecone to store vectors in db\n\n## How this works\n1. Run `tasks/1-sitemap-to-csv.js` to convert Shopify's Help Center Sitemap.xml into CSV and drop all columns except urls.\n2. Convert CSV into array of links.\n3. 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.\n4. Run `tasks/3-generate-embeddings.js` to generate OpenAI embeddings and upsert into Pinecone.\n\n## Why?\nCreated 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.\n\n## How to optimize this further\n- Split article text into smaller documents to decrease cost of token usage. Split by H2/section. \n- Test different models to see one cost. Curie is 10x cheaper than Davinci.\n- Search documents with a normal search engine (Algolia) and pass that document into open AI rather than using embedding’s and Pinecone.\n- Cache results for common queries.\n- Test a shorter prompt to further save tokens.\n\n## Preview\n![preview.png](./preview.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgil--%2Fshoppy-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgil--%2Fshoppy-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgil--%2Fshoppy-gpt/lists"}