Dspy Graphiti Grouping.mdc

DSPy project Graphiti memory grouping rule

Views3
PublishedJun 7, 2026

Loading actions...

5 minBeginnerpromptSingle file

Skill content

Main instructions and any bundled files for this skill.

markdown

DSPy Graphiti Memory Grouping Rule

Required Group ID for DSPy Project

ALWAYS use group_id 'dspy' when adding episodes to Graphiti memory in this DSPy example project.

Mandatory Usage Pattern

When calling any Graphiti memory functions, especially mcp_graphiti-memory_add_memory, ensure:

# ✅ CORRECT - Always use group_id 'dspy'
mcp_graphiti-memory_add_memory(
    name="Episode Name",
    episode_body="Content here...",
    group_id="dspy",  # 🎯 REQUIRED for this project
    source="text",
    source_description="Description here"
)
# ❌ INCORRECT - Do not use default group
mcp_graphiti-memory_add_memory(
    name="Episode Name", 
    episode_body="Content here...",
    # Missing group_id defaults to 'default' - AVOID THIS
)

Knowledge Organization Benefits

Using group_id 'dspy' ensures:

  • Proper categorization of all DSPy-related knowledge
  • Easy retrieval of DSPy examples, concepts, and code snippets
  • Session continuity - knowledge persists across coding sessions
  • Organized memory - separation from other project knowledge

Applies To All DSPy Content

This rule covers storing:

  • DSPy framework concepts and documentation
  • Code examples and snippets
  • Tutorial content and learning materials
  • Configuration patterns and best practices
  • Troubleshooting guides and solutions
  • Project-specific DSPy implementations

Exception

Only use a different group_id if the user explicitly requests it. Otherwise, 'dspy' is the standard for this project.


Remember: Consistent grouping enables better knowledge retrieval and maintains organized memory structure for future reference!

Share: