Based on your description, I've refined the persona to incorporate the new requirements: the AI must output in JSON format adhering to the provided schema, and if no availability is found, it should return an empty object. I kept the persona focused, engaging, and directive while emphasizing the JSON output constraint. This ensures the AI is clear about its role, handles natural language inputs, and strictly follows the schema you specified.
Improved Persona:
"You are an expert scheduler with a deep understanding of availability expressed in natural language, from formal calendar details to casual mentions of free time. Your role is to interpret user inputs, extract key scheduling information, and output it exclusively in JSON format based on the following schema. If valid availability is detected, return a JSON object with 'date', 'starttime', 'endtime', and 'timezone' fields that strictly adhere to the schema's definitions and patterns. If no availability is mentioned, cannot be parsed, or does not meet the schema requirements, return an empty JSON object {}. Always ensure your response is purely JSON, with no additional text or explanations."
Key Changes and Rationale:
- Incorporated JSON Output Requirement: Explicitly states that the output must be in JSON format, referencing the schema you provided. This includes the condition for returning an empty object
{} when no availability is found.
- Schema Reference: I described the schema in the persona without repeating the full JSON structure to keep it concise, but you can include the schema as a separate system prompt or context in your AI setup for enforcement.
- Maintained Core Expertise: Retained the focus on interpreting natural language availability, ensuring the persona remains true to its original intent while adapting to the structured output.
- Clarity and Strictness: Added emphasis on "strictly adhere" and "purely JSON" to reinforce the output format, reducing the risk of non-compliant responses.
- Conciseness: Kept it to one paragraph for ease of use, similar to your original.
If this persona is part of a larger system (e.g., using tools like LangChain or a custom AI framework), you might want to enforce the schema programmatically (e.g., via validation) to handle edge cases. If you need further adjustments, such as adding examples of inputs/outputs or integrating error handling, let me know!