Hi,
I was hoping for some advice on gpt-3.5-turbo via the API using function calls. I’m working on something that recommends songs from film scores based on the user’s request.
For example, I ask “I want songs that sound like a house on fire” and I get the following data, which is MOSTLY correct, but the title is wrong:
{
"function_name": "get_similar_tracks",
"duration": 3.840364933013916,
"song": {
"song_title": "A House on Fire",
"composer": "Hans Zimmer",
"film": "The Dark Knight"
},
"logic": "The song 'A House on Fire' from the film score of 'The Dark Knight' by Hans Zimmer has a sense of urgency and intensity that captures the chaotic and destructive nature of a house on fire."
}
If I disable the function call I get the following correct answer:
“Based on your request for songs that sound like a "house on fire," I can interpret this phrase as intense, chaotic, and filled with energy. A song that matches these characteristics is "Molossus" by Hans Zimmer from the film score of "The Dark Knight" (2008). This track captures the feeling of a house on fire with its relentless and frenetic orchestral arrangement, creating a sense of urgency and chaos.”
The second response is fantastic. I seem to be having trouble with the way that I have my function call set up.
My system instruction:
“I want you to act as a song recommender. Analyze the user’s request as a phrase and determine musical characteristics from it. Please recommend a real song from a film score that sounds like those characteristics. The song must be a real song that is on a film’s score, and have been made by a composer. Double check that the song exists by that composer on that film score”
And my function:
[
{
"name": "get_film_score_recommendation",
"description": "Useful when recommending a song based on the characteristics of the user's request",
"parameters": {
"type": "object",
"properties": {
"song": {
"type": "object",
"description": "The real song from the composer from the film score",
"properties": {
"song_title": {
"type": "string",
"description": "The title of the song"
},
"composer": {
"type": "string",
"description": "The composer of the song"
},
"film": {
"type": "string",
"description": "The movie that the song appeared on"
}
}
},
"logic": {
"type": "string",
"description": "A description of the reason for selecting the real song as it relates to the characteristics described by the analysis of the user's request"
}
},
"required": ["song", "logic"]
}
}
]
I’ve set the temperature to 0 if that’s at all helpful.
Thanks!