The File Search feature works great at generating very accurate responses using entries in “Text”. However, I would also like it to proivde the “URL” corresponding to “Text” if requested by the user. Currently the responses will not contain the “URL” corresponding to the “Text” that was used to generate the response.
What is the best way to do this? Can this be handled with modifying my prompt and describing the dataset, or should I use fine-tuning?
At this point I don’t want to leverage something like RAG with an external database to add on the URL in the response, maybe we handle that in the next version. For now I just want to leverage the built-in features in the Assistants.
Yes I am including the requirement to include the corresponding URL, but it is not obeying the instruction. It will say that it does not have the URL in its model.
That’s happening likely because you are not providing a valid UTF-8 encoded json file.
In my test, it works successfully.
I tested with the following:
json file:
{
"articles": [
{ "Title": "8 Psychology Basics You Need to Know",
"Description": "Start your study with these key psychology facts and concepts",
"Text": "Human psychology is defined as the science of the mind and behavior. It encompasses the scientific study of the mind and behavior and the application of these principles to help prevent, treat, and diagnose mental health conditions. Psychologists explore both typical and atypical behavior to understand the human experience fully.",
"URL": "https://www.verywellmind.com/psychology-basics-4157186"
},
{ "Title": "INTRODUCTION TO PSYCHOLOGY",
"Description": "Chapter 1. Introducing Psychology",
"Text": "Psychology is the scientific study of mind and behavior. The word “psychology” comes from the Greek words “psyche,” meaning life, and “logos,” meaning explanation. Psychology is a popular major for students, a popular topic in the public media, and a part of our everyday lives. Television shows such as Dr. Phil feature psychologists who provide personal advice to those with personal or family difficulties. Crime dramas such as CSI, Lie to Me, and others feature the work of forensic psychologists who use psychological principles to help solve crimes. And many people have direct knowledge about psychology because they have visited psychologists, for instance, school counselors, family therapists, and religious, marriage, or bereavement counselors.",
"URL": "https://open.lib.umn.edu/intropsyc/part/chapter-1-introducing-psychology/"
},
{ "Title": "TTS API",
"Description": "The basics of our text-to-speech API",
"Text": "With the new text-to-speech API, developers can generate high quality spoken audio from text. We’re initially offering six preset voices to choose from and two model variants, tts-1 and tts-1-hd. tts-1 is optimized for real-time use cases and tts-1-hd is optimized for quality. Pricing starts at $0.015 per 1,000 input characters (not tokens).",
"URL": "https://help.openai.com/en/articles/8555505-tts-api"
}
]
}
Instructions:
Refer to the provided json file for knowledge. Only use the knowledge from file. Include the corresponding link attribute of the object you answer from in your reply using markdown.
Chat:
User
can you tell me where can I learn about the max size of input for a tts request?
Einstein
You can learn about the maximum size of input for a TTS request on the TTS API documentation page. The API offers a detailed overview of the service, including information on the input size limitations and pricing. You can access the information here: TTS API Documentation .
It is still not working, it is giving a URL that is not found in my dataset. It does this repeatedly, even though I have stated elsewhere in the instructions not to do this.