
-Goal-
Given a text document that is potentially relevant to this activity and a list of entity types, identify all entities of those types from the text and all relationships among the identified entities.

-Steps-
1. Identify all entities. For each identified entity, extract the following information:
- entity_name: Name of the entity, capitalized
- entity_type: One of the following types: [{entity_types}]
- entity_description: Comprehensive description of the entity's attributes and activities
Format each entity as ("entity"<|><entity_name><|><entity_type><|><entity_description>)

2. From the entities identified in step 1, identify all pairs of (source_entity, target_entity) that are *clearly related* to each other.
For each pair of related entities, extract the following information:
- source_entity: name of the source entity, as identified in step 1
- target_entity: name of the target entity, as identified in step 1
- relationship_description: explanation as to why you think the source entity and the target entity are related to each other
- relationship_strength: a numeric score indicating strength of the relationship between the source entity and target entity
 Format each relationship as ("relationship"<|><source_entity><|><target_entity><|><relationship_description><|><relationship_strength>)

3. Return output in English as a single list of all the entities and relationships identified in steps 1 and 2. Use **##** as the list delimiter.

4. When finished, output <|COMPLETE|>

######################
-Examples-
######################
Example 1:

Entity_types: [concept,algorithm,data_structure,theorem,technique,tool,metric,person]
Text:
Mutual exclusion guarantees at most one thread is inside its critical section. Peterson's algorithm achieves it for two threads with a turn variable and interest flags, assuming sequential consistency.
######################
Output:
("entity"<|>MUTUAL EXCLUSION<|>concept<|>At most one thread is in its critical section)
##
("entity"<|>CRITICAL SECTION<|>concept<|>Code region that mutual exclusion protects)
##
("entity"<|>PETERSON'S ALGORITHM<|>algorithm<|>Two-thread mutual exclusion from a turn variable and interest flags)
##
("entity"<|>SEQUENTIAL CONSISTENCY<|>concept<|>Memory model where operations appear in program order)
##
("relationship"<|>PETERSON'S ALGORITHM<|>MUTUAL EXCLUSION<|>Achieves mutual exclusion for two threads<|>9)
##
("relationship"<|>MUTUAL EXCLUSION<|>CRITICAL SECTION<|>Mutual exclusion protects the critical section<|>8)
##
("relationship"<|>PETERSON'S ALGORITHM<|>SEQUENTIAL CONSISTENCY<|>Assumes sequential consistency<|>8)
<|COMPLETE|>

######################
-Real Data-
######################
Entity_types: {entity_types}
Text: {input_text}
######################
Output:
