Skip to main content

What are NodeSets?

A NodeSet lets you group parts of your AI memory at the dataset level. You create them as a simple list of tags when adding data to Cognee:
These tags travel with your data into the knowledge graph, where they become first-class nodes connected with belongs_to_set edges — and you can later filter retrieval to only those subsets.

How they flow through Cognee

  • Remember:
    • NodeSets are attached as simple tags to datasets or documents
    • This happens when you first ingest data
    • The underlying graph-building step carries them into Documents, Chunks, and the entities extracted from those chunks
    • They are materialized as real NodeSet nodes in the graph and connected with belongs_to_set edges
  • Recall:
    • NodeSets help define meaningful retrieval subsets
    • Use recall() with node_name and node_name_filter_operator to scope retrieval to specific node-set subsets
  • Improve:
    • The default improvement path runs memify-style enrichment
    • Related enrichment flows can create node sets such as coding_agent_rules or user_sessions_from_cache

Why they matter

  • Provide a lightweight way to organize and tag your data
  • Enable graph-based filtering, traversal, and reporting
  • Ideal for creating project-, domain-, or user-defined subsets of your knowledge graph

See it in action

NodeSet Grouping is a short runnable guide that walks through all of this end to end: it remembers three passages under overlapping labels — ["AI", "FinTech"], ["AI"], and ["MedTech"] — renders the resulting graph so you can trace the belongs_to_set edges, and shows how to scope a later recall() to one group with node_name.

Remember

Where NodeSets are first attached

Improve

How enrichment flows add more NodeSet-based structure

Search

Use NodeSets as anchors in queries