GENERAL INSTRUCTIONS
-----------------
In our system, the behavior of a conversational AI agent is guided by "guidelines". The agent makes use of these guidelines whenever it interacts with a user (also referred to as the customer).
Each guideline is composed of two parts:
- "condition": This is a natural-language condition that specifies when a guideline should apply.
          We examine each conversation at its current state and test this condition
          to determine whether the guideline should participate in generating
          the next reply to the user.
- "action": This is a natural-language instruction that should be followed by the agent
          whenever the "condition" part of the guideline applies to the conversation in its particular state.
          Any instruction described here applies only to the agent, and not to the user.

Use only the information provided in this prompt about the user and the company. Do not make any assumptions beyond what is explicitly stated.

Task Description
----------------
Your task is to evaluate the relevance and applicability of a set of provided 'when' conditions to the most recent state of an interaction between yourself (an AI agent) and a user.

A guideline should be marked as applicable if it's condition is relevant to the latest part of the conversation and in particular to the most recent user message. Do not mark a guideline as
applicable solely based on earlier parts of the conversation if the topic has since shifted, even if the previous topic remains unresolved or its action was never carried out.

Handling sub issues:
If the conversation moves from a broader issue to a related sub-issue, meaning a related detail or follow-up within the same overall issue, you should still consider the guideline as applicable
if it is relevant to the sub-issue, as it is part of the ongoing discussion.
In contrast, if the conversation has clearly moved on to an entirely new topic, previous guidelines should not be marked as applicable.
A guideline should be marked as NOT applicable when the user explicitly pauses or sets aside their original inquiry to address something else, even if they indicate they may return to it later.
This ensures that applicability is tied to the current context, but still respects the continuity of a discussion when diving deeper into subtopics.

Evaluating Sub-Issues vs. Topic Changes:
When evaluating whether the conversation has shifted to a related sub-issue versus a completely different topic, consider whether the user remains interested in resolving their previous inquiry that fulfilled the condition.
If the user is still pursuing that original inquiry, then the current discussion should be considered a sub-issue of it. Do not concern yourself with whether the original issue was resolved - only ask if the current issue at hand is a sub-issue of the condition.

Core Principles:
- Mark as applicable only if the condition is relevant to what the user is saying RIGHT NOW in their latest message
- You are only evaluating whether the 'when' condition is met, not whether it would be appropriate to take the associated action. Focus solely on condition applicability, not action appropriateness or relevance.

Note: You will be given a guideline or a set of guidelines to evaluate. Evaluate each guideline independently, they are provided together only for efficiency.

The exact format of your response will be provided later in this prompt.



Examples of Guideline Match Evaluations:
-------------------
Example #1: ###

- **Interaction Events**:
[
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "Hi, I'm planning a trip to Italy next month. What can I do there?"
    }
  },
  {
    "event_kind": "message",
    "event_source": "ai_agent",
    "data": {
      "message": "That sounds exciting! I can help you with that. Do you prefer exploring cities or enjoying scenic landscapes?"
    }
  },
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "Can you help me figure out the best time to visit Rome and what to pack?"
    }
  },
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "Actually I'm also wondering \u2014 do I need any special visas or documents as an American citizen?"
    }
  }
]


- **Guidelines**:
1) Condition The customer is looking for flight or accommodation booking assistance. Action: Provide links or suggestions for flight aggregators and hotel booking platforms.
2) Condition The customer asks for activities recommendations. Action: Guide them in refining their preferences and suggest options that match what they're looking for
3) Condition The customer asks for logistical or legal requirements.. Action: Provide a clear answer or direct them to a trusted official source if uncertain.


- **Expected Result**:
```json
{
  "applies": {
    "1": false,
    "2": false,
    "3": true
  }
}
```

Example #2: ###

- **Interaction Events**:
[
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "Hi, I'm interested in your Python programming course, but I'm not sure if I'm ready for it."
    }
  },
  {
    "event_kind": "message",
    "event_source": "ai_agent",
    "data": {
      "message": "Happy to help! Could you share a bit about your background or experience with programming so far?"
    }
  },
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "I've done some HTML and CSS, but never written real code before."
    }
  },
  {
    "event_kind": "message",
    "event_source": "ai_agent",
    "data": {
      "message": "Thanks for sharing! That gives me a good idea. Our Python course is beginner-friendly, but it does assume you're comfortable with logic and problem solving. Would you like me to recommend a short prep course first?"
    }
  },
  {
    "event_kind": "message",
    "event_source": "user",
    "data": {
      "message": "That sounds useful. But I'm also wondering \u2014 is the course self-paced? I work full time."
    }
  }
]


- **Guidelines**:
1) Condition The customer mentions a constraint that is related to commitment to the course. Action: Emphasize flexible learning options
2) Condition The user expresses hesitation or self-doubt.. Action: Affirm that it's okay to be uncertain and provide confidence-building context
3) Condition The user asks about certification or course completion benefits.. Action: Clearly explain what the user receives


- **Expected Result**:
```json
{
  "applies": {
    "1": true,
    "2": true,
    "3": false
  }
}
```




You are an AI agent named Morty.

The following is a description of your background and personality: ###
Helps customers understand things likehow to approach buying a house and getting a mortgage.
###



The user you're interacting with is called Guest.



The following is a list of events describing the most recent state of the back-and-forth
interaction between you and a user: ###
['{"event_kind": "message", "event_source": "user", "data": {"participant": "Guest", "message": "hi! new to home buying, where to start? looking to buy a house"}}']
###



- Guidelines List: ###
1) Condition: The customer sounds new to the home buying process and is asking for advice on how to get started.. Action: Congratulate them on the big step
###



IMPORTANT: Please note there are exactly 1 guidelines in the list for you to check.

OUTPUT FORMAT
-----------------
- Specify the applicability of each guideline by filling in the details in the following list as instructed:
```json
{
    "applies": {
        "1": "<bool, whether the guideline 1 should apply in the current context of the conversation>"
    }
}
```