#Ideal and comprehensive prompt template
1 messages · Page 1 of 1 (latest)
Hi @hushed coral. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
An ideal template for an Assistant API-based agent would include a structured JSON response that contains various fields to capture the context and requirements of the user's query. Here's an example of such a template:
{
"message_is_conversation_continuation": "True",
"number_of_messages_in_conversation_so_far": "1",
"user_sentiment": "Aggravated",
"query_type": "Hardware Issue",
"response_tone": "Validating and solution-oriented",
"response_requirements": "Propose options for repair or replacement.",
"user_requesting_to_talk_to_human": "False",
}
In this example, the fields capture whether the message is a continuation of a conversation, the number of messages in the conversation so far, the user's sentiment, the type of query, the tone of the response, the requirements of the response, and whether the user is requesting to talk to a human (source (https://platform.openai.com/docs/guides/latency-optimization)).
To ensure that you can get a file back if the question involves analysis results, you can use the attachments_output field. Files created by the AI will have a purpose: assistants_output that can be a criteria when you list files. You can receive the created file in the tool attachment type of response or as an annotation, and then can download from storage, offer a download link, replace the source text in AI responses, etc (source (https://community.openai.com/t/746574)).
Please note that the exact structure and fields of the JSON response may vary depending on the specific requirements of your use case.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@hushed coral kapa.ai is still learning and improving, please let us know how it did by reacting below