Linked Entities
A rule only becomes useful once it’s connected to something worth returning. The Associated Entities card on a rule’s detail page lets you link the rule to resources that should come back when it matches.
Entity types
Section titled “Entity types”The entity types you can link today are:
- Context - reusable knowledge or system instructions, from the Context feature.
- Prompt - a versioned prompt, from Prompt Hub.
- Evaluation - an Evaluation Type, from the Evaluations feature.
Linking an entity
Section titled “Linking an entity”- In the Associated Entities card, choose an Entity Type.
- Pick from a dropdown of existing entities of that type - Context, Prompt, and Evaluation each have their own picker, populated from what already exists.
- Click Associate.
If the list is empty, you’ll see “No entities associated yet.”
Removing a link
Section titled “Removing a link”Click the remove (X) icon next to a linked entity. You’ll be asked to confirm:
Remove entity association? This will remove the link between the rule and this entity.
This only removes the link between the rule and the entity - it doesn’t delete the Context, Prompt, or Evaluation Type itself.
What happens when a rule matches
Section titled “What happens when a rule matches”When a rule matches at evaluation time, all of its linked entities are returned. If the caller asks for it, their full data is included too - for example, a Context’s content, or a Prompt’s compiled text. See the Evaluate API page for the exact response shape.
Linking from the other side
Section titled “Linking from the other side”You can also start the link from a Context or Prompt’s own page instead of from the rule:
- From a Context, see Linking rules to a Context.
- From a Prompt, see Linking rules to a Prompt.
Both flows open the same “Create rule and link to…” dialog described in Create & Manage Rules, pre-filled with the link back to that Context or Prompt.