Sanity recently showcased how to use generative AI to infer user intent and make smarter product recommendations. For example, when users add running shoes to their wish list, you might want to show other running shoes that they might like. Alternatively, when users add running shoes to their cart, you'd want to recommend socks or other complementary products.

Streamline workflows

Language models allow teams to interact with data and documents in plain language, making information access and retrieval more intuitive and accessible.

If you use Sanity as your headless CMS, check out Sanity’s new API to add embedding capability out-of-the-box.

Sanity’s new feature enables content authors to find and add relevant content pieces. In this demo, the semantic reference search plugin automatically retrieves product entries based on campaign information the user has already written. Learn more about Sanity’s embeddings index API.

There are other ways to use AI to empower your marketing and product teams. Say you want to restock the most popular designs and sizes of your t-shirt inventory ahead of the fall season. One way to do this quickly is to upload sales data from Shopify to GPT-4 and query: “Tell me which sizes and colours/designs were the most popular, and how many I should order to fulfill anticipated orders over the next 3 months based on last year’s sales data.”

You can also use GPT-4’s Advanced Data Analysis capability (formerly known as Code Interpreter) to analyze and visualize data.

Examples of visualizations supported by GPT-4 (source: What AI can do with a toolbox).

Understanding pricing

AI models are getting smarter and cheaper every year, and with every new release.

You can access GPT-3.5 and GPT-4 via OpenAI’s chat interface with ChatGPT Plus, which costs $20/month. There’s a cap on how frequently you can query GPT-4 when using ChatGPT, but the limit is lifting quickly.

OpenAI bills API access (including Playground) separately on a per token basis.

It would cost approximately $0.13 with GPT-3.5 and $8 with GPT-4 to generate summarization data for 1,000 products like the one below.

// This JSON object has 262 characters.
{
  "productName": "Silk Cummerbund",
  "description": "Adjustable silk cummerbund",
  "price": "$259.99",
  "availableSizes": ["One Size"],
  "colours": ["Black"],
  "material": "Silk",
  "careInstructions": "Dry clean only",
  "rating": 4.3,
  "reviews": 355
}

Most of the costs associated with using Sentence Transformers is attributable to computing costs, billed on an hourly basis. You would pay $9 per month for access to Hugging Face’s APIs, plus computing costs (we recommend Spaces Hardware or Inference Endpoints), which start at 5 cents per hour for CPUs and 60 cents per hour for GPUs. You can also build an embedding model locally, which would also allow you to update it with new data, rather than building a new embedding model anytime new data is available.

An embedding model with 1,000 products would take seconds to process. A large real estate company with lots of historical data might need billions of tokens, which would take several hours to process with GPUs and days with CPUs.

Creating an embedding model with 1,000 products would cost $5-10 with OpenAI’s embedding model API.

Summary

Explore

Related Services

Sign up for our newsletter

A laptop with code flowing out, transforming into words 'GPT-4', 'PaLM', and 'Claude', set against a colour backdrop
Yena Lee, Strategist
Liam Gardner, Marketing Co-op Intern
Abdella Ali, Solutions Architect
Fidelia Ho, Editorial Content Lead
2023-10-27

Generate nuanced translations for your e-commerce site using AI. Learn how to set up, fine-tune, and integrate AI models seamlessly with your headless CMS for automatic content translation. Uncover practical steps for implementation, from choosing the right language model to architecting efficient translation workflows that align with your budget and goals.

person receiving mug from robot
Willian Corrêa, SVP of Technology, Engineering
2023-04-06

The future of digital experience platforms will be shaped by the ongoing evolution of technologies such as generative AI, voice and conversational interfaces, augmented and irtual reality (AR/VR), internet of things (IoT), and edge computing, as well as the growing importance of data privacy and security. By staying ahead of these developments and embracing the full potential of DXPs, organizations can maintain their competitive edge and ensure their long-term success in the digital age.

Preview of video recording of webinar, showing Rangle on the first slide
Scott Fuller, Developer
2023-03-03

We walk through the steps of using Sanity Connect to sync data between Shopify & Sanity.