Making a Document that Provides Recommendations
To make a document that provides recommendations to the user, all you need to do is state the input you want to analyze and the type of recommendation you want to make in the document’s body. The Logic API will automatically handle the rest.
Step 1: Creating the document
For this example, let’s create a document that recommends songs to the user based on their input. The document will analyze the user’s input and provide a recommendation. For the input on this document, we will use the contents of a CSV file of songs from a playlist. It’s easy to convert Spotify playlists to CSV files, and we can use this to create an app that reads from the Spotify API later.Step 2: Explain the goal
Let’s start by explaining what we want the Logic API to do. We want the document to analyze the user’s input and provide a recommendation based on the input. The document will read from a CSV file of songs from a playlist, analyze the user’s taste, and provide 5 recommendation songs. We want the document to take note of the following:- The songs in the playlist
- The artists of the songs
- The albums of the songs
- The release dates of the songs
- The genres of the songs
Step 3: Explain the input
To give the Logic API some exta context, lets make sure to explain the input we want to analyze. We will be providing a CSV file of songs from a playlist. The CSV file will contain the following data:CSV file contents
Step 4: Give an example
We also want to provide an example of the CSV file contents and an example recommendation.Examples
Step 5: Testing this iteration of the document
Using thePreview
button, we can test this document to see if it works as expected.
Logic API Output