# Augmenting recommendation systems with LLMs

DevFeed: [Augmenting recommendation systems with LLMs](<https://devfeed.tech/articles/augmenting-recommendation-systems-with-llms-7369.md>)

Original publisher: [Read original article](<https://blog.tensorflow.org/2023/06/augmenting-recommendation-systems-with.html>)

Author: TensorFlow Blog (noreply@blogger.com)

Published: 2023-06-06T21:00:00Z

Content type: tutorial

Language: en

Sources: [The TensorFlow Blog](<https://devfeed.tech/sources/the-tensorflow-blog.md>)

Topics: [Language models](<https://devfeed.tech/topics/language-models.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>)

Tags: [large-language-models](<https://devfeed.tech/tags/large-language-models.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llms](<https://devfeed.tech/tags/llms.md>), [palm-api](<https://devfeed.tech/tags/palm-api.md>), [recommendation-systems](<https://devfeed.tech/tags/recommendation-systems.md>), [tensorflow](<https://devfeed.tech/tags/tensorflow.md>), [tensorflow-recommenders](<https://devfeed.tech/tags/tensorflow-recommenders.md>)

## AI overview

A practical tutorial on using LLMs and the PaLM API to add conversational and sequential recommendation capabilities to retrieval-ranking recommendation systems.

## Source excerpt

Posted by Wei Wei, Developer Advocate Large language models (LLMs) are taking the world by storm, thanks to their powerful ability to generate text, translate languages, and answer questions in a coherent and informative way. At Google I/O 2023, we released the PaLM API as 'public preview' so that many developers can start building apps with it. While PaLM API already has excellent documentation on its extensive usage and best practices, in this blog we are going to take a more focused approach to explore how to leverage LLMs to augment your ML systems in a practical application: recommendation systems. As a refresher, modern recommendation systems often follow a retrieval-ranking architecture, which enables them to effectively and efficiently filter and rank relevant items to maximize the utility in production. You can go through this codelab to learn about building a fullstack movie recommendation system using TensorFlow and Flutter. We will discuss how LLMs can be incorporated into this retrieval-ranking pipeline. Conversational recommendations If you already have access to Bard, you can ask it to create recommendations for you interactively in a dialogue. Here is an example of asking Bard for movie recommendations: As a developer, you can build a similar functionality in your own applications, using the PaLM API Chat service with minimal effort: prompt = """You are a movie recommender and your job is to recommend new movies based on user input. So for user 42, he is in the mood for some drama movies with artistic elements tonight. Could you recommend three? Output the titles only. Do not include other text.""" response = palm.chat(messages=prompt) print(response.last) # Sure, here are three drama movies with artistic elements that I recommend for user 42: # # 1. The Tree of Life (2011) # 2. 20th Century Women (2016) # 3. The Florida Project (2017) # # I hope you enjoy these movies! The PaLM API also allows you to help your user continue the exploration and inter