deletecontext
Remove incorrect, duplicate, or outdated elements from qualitative research knowledge graphs, ensuring accuracy and refining analytical frameworks by deleting entities, relations, or observations.
Instructions
A precise tool for removing elements from the qualitative research knowledge graph, enabling researchers to maintain data accuracy and refine their analytical framework.
When to use this tool:
Removing incorrect or duplicate research entities
Deleting erroneous relationships between research elements
Clearing outdated observations from research entities
Restructuring your research framework as analysis evolves
Removing pilot or test data that shouldn't be included in final analysis
Cleaning up the knowledge graph during research refinement phases
Eliminating deprecated codes, themes, or concepts that no longer fit your analytical framework
Removing sensitive information that should not be retained
Reorganizing your analytical structure by removing and recreating elements
Updating status assignments when research activities change state
Modifying priority assignments as research focus shifts
Restructuring sequential relationships between research processes
Key features:
Provides targeted deletion capabilities for three distinct types of knowledge graph elements: entities, relations, and observations
Maintains knowledge graph integrity during deletion operations
Supports batch deletion of multiple items in a single operation
Returns clear confirmation of deletion results
Preserves the overall structure of the research knowledge graph while removing specific elements
Performs validation to ensure deletion requests are properly formatted
Handles status and priority relation management
Supports modification of sequential process relationships
Parameters explained:
type: The type of deletion operation to perform
Accepts: "entities", "relations", or "observations"
Determines how the data parameter is interpreted
data: The elements to remove from the knowledge graph (structure varies by type):
For "entities": Array of entity names to delete
Example: ["Participant_A", "Interview_3"]
For "relations": Array of relation objects, each containing:
from: Name of the source entity
to: Name of the target entity
relationType: Type of relationship to remove (e.g., "participated_in", "codes", "has_status", "has_priority", "precedes")
For "observations": Array of objects, each containing:
entityName: Name of the entity to remove observations from
indices: Array of numeric indices identifying which observations to remove
Deletion behavior by type:
Entities: Removes the specified entities and all their associated relations from the knowledge graph
Relations: Removes only the specified relationships, leaving the connected entities intact
Observations: Removes specific observations from entities while preserving the entities themselves
Status and Priority Management:
When deleting status or priority entities, be aware of the impact on entities that reference them
For changing an entity's status or priority, first delete the existing has_status or has_priority relation, then create a new one
Consider the research workflow implications when removing status entities or relations
Deletion of a status entity will remove all has_status relations pointing to it
Sequential Process Management:
Removing precedes relations affects the logical flow of research processes
Consider restructuring sequential relationships after deletion to maintain process continuity
When reorganizing research phases, update all affected precedes relations
Safety considerations:
Entity deletion is permanent and will also remove all relationships involving those entities
Consider exporting or backing up your research knowledge graph before performing large-scale deletions
For sensitive operations, consider removing specific observations rather than entire entities
When removing codes or themes, consider the impact on your analytical framework
Status changes should be carefully managed to maintain accurate research progress tracking
Changes to sequential relationships may affect dependent research activities
Return information:
JSON response indicating success or failure
For successful operations:
Success flag set to true
Confirmation message
For failed operations:
Success flag set to false
Error message describing the issue
You should:
Be specific in your deletion requests to avoid unintended data loss
Use relations deletion when you want to disconnect entities without removing them
For observations, provide the exact indices to ensure only the intended content is removed
When restructuring your analysis, consider how deletions will affect related elements
Use deletecontext in conjunction with buildcontext to refine and evolve your research framework
Regularly review your knowledge graph for elements that may need to be removed or updated
Consider the cascading effects of entity deletion on your overall research structure
Use observation deletion for minor corrections rather than removing entire entities
When updating entity status, delete the old has_status relation before creating a new one
Maintain logical consistency when modifying sequential process relationships
Input Schema
Name | Required | Description | Default |
---|---|---|---|
data | Yes | Data for the deletion operation, structure varies by type but must be an array | |
type | Yes | Type of deletion operation: 'entities', 'relations', or 'observations' |