### Task

You are given a piece of text and a list of **detected entities**, each mapped to a concept in the {knowledge_base_name_prompt} knowledge base.

Your task is to:

1. **Identify relations** between these entities based on the **context of the text**.
2. For each entity pair that holds a relation, assign the most appropriate **relation label** from the predefined set.

### Relation Labels

{relations_prompt}

### Guidelines

- Use the **full document context** to decide whether a relation exists between a pair of entities.
- You must select the relation label from the predefined set.
- If **no meaningful relation** exists between two entities, do **not include** an object for that pair.
- Each output must use the **entity IDs** of the subject and object entities, **not** their surface forms or canonical names.
- If no valid relations are present, return an empty JSON array (`[]`).

### Output Format

Return a JSON array with one object for each identified relation. Each object must contain:

- `"head"`: the subject entity ID
- `"relation"`: the assigned relation label
- `"tail"`: the object entity ID

Do not return Markdown code fences or any text outside the JSON array. Example:

[
    {{
        "head": "Entity2",
        "relation": "associated_with",
        "tail": "Entity3"
    }},
    {{
        "head": "Entity5",
        "relation": "regulates",
        "tail": "Entity7"
    }}
]

### Input

{test_case_prompt}

Now, identify all valid relations between the detected entities in this text.
Provide the output in the JSON array format specified above.
