Custom Instructions
Guide Zep’s graph extraction with domain-specific instructions
Available to Enterprise Plan customers only.
Why use custom instructions
Zep’s graph extraction uses general-purpose logic by default. Custom instructions let you provide domain-specific guidance, such as specialized terminology or relationship types to look for, resulting in more accurate and complete knowledge graphs for your use case.
Adding custom instructions
Project-wide instructions
When you omit user_ids and graph_ids, instructions are added to project-wide defaults:
Graph-specific instructions
To add instructions for specific users or graphs, provide user_ids or graph_ids:
Important behaviors
Scope hierarchy
Custom instructions can be applied at two levels:
When a graph has no specific instructions configured, it automatically falls back to project-wide defaults. This allows you to set baseline behavior while overriding it for specific graphs when needed.
Upsert behavior
Adding an instruction with an existing name updates the instruction text rather than creating a duplicate. This allows you to refine instructions over time without manually deleting the old version first.