Documentation Index
Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
Use this file to discover all available pages before exploring further.
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: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 and Chunks
- They are materialized as real
NodeSetnodes in the graph and connected withbelongs_to_setedges
- Recall:
- NodeSets help define meaningful retrieval subsets
- Use
recall()withnode_nameandnode_name_filter_operatorto 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_rulesoruser_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
Example: tagging data with NodeSets
What just happened?
- You reset Cognee’s memory so you’re working with a clean graph.
- You remembered two documents, each tagged with one or more
NodeSetlabels.- The first document is only linked to
AI_Memory. - The second document is linked to both
AI_MemoryandGraph_RAG.
- The first document is only linked to
- During
remember(), Cognee:- Created
NodeSetnodes (AI_Memory,Graph_RAG) in the graph. - Attached each document to the corresponding NodeSets.
- Extracted entities and relationships from the documents, then linked those entities back to the same NodeSets.
- Created
- “Cognee” appears in both documents → connects to both NodeSets.
- “AI memory” appears only in the first → connects only to AI_Memory.
- “Vector search” appears only in the second → connects to both since that document belongs to AI_Memory and Graph_RAG.
Filtering searches by NodeSet
Filtering searches by NodeSet
When filtering with multiple NodeSet names, you can control matching behavior by choosing whether results must be connected to all selected names or to any selected name;
by default, Cognee uses the any selected name behavior (OR-style matching).
This behaviour is controlled by passing the wanted value (
AND or OR) via the node_name_filter_operator parameter in recall().Node-set filtering works with graph-completion search types (
GRAPH_COMPLETION, GRAPH_COMPLETION_COT, GRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_SUMMARY_COMPLETION, TEMPORAL). It is not applied for CHUNKS, SUMMARIES, RAG_COMPLETION, CYPHER, or NATURAL_LANGUAGE.Scoping queries to specific NodeSets
Scoping queries to specific NodeSets
Use the same NodeSet names you assigned during
remember() to limit retrieval to a focused subset of your graph. This is useful when one dataset contains multiple topics, teams, or workflows but you only want answers grounded in one slice of that memory.In practice, NodeSets let you keep a shared dataset while still asking targeted questions like “show only finance concepts” or “search just the Graph_RAG material” without splitting everything into separate datasets.Navigating data by project or domain
Navigating data by project or domain
Remember
Where NodeSets are first attached
Improve
How enrichment flows add more NodeSet-based structure
Search
Use NodeSets as anchors in queries