Overview
The Update Graph RAG Configuration endpoint allows you to modify the settings of graph RAG nodes within a flow. Graph RAG nodes process documents by building knowledge graphs with extracted entities and relationships, then use these graphs to provide contextually enriched retrieval results with semantic understanding.- Method:
PATCH - URL:
https://{flow_name}.flows.graphorlm.com/graph-rag/{node_id} - Authentication: Required (API Token)
Authentication
All requests must include a valid API token in the Authorization header:Learn how to generate API tokens in the API Tokens guide.
Request Format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
URL Parameters
| Parameter | Type | Description |
|---|---|---|
flow_name | string | Name of the flow containing the graph RAG node |
node_id | string | Unique identifier of the graph RAG node to update |
Request Body
Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
topK | integer | null | 5 | Number of top results to retrieve after knowledge graph processing. Set to null for unlimited processing |
Response Format
Success Response (200 OK)
Response Structure
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the update operation was successful |
message | string | Human-readable description of the operation result |
node_id | string | The ID of the updated graph RAG node |
Configuration Strategies
Graph RAG nodes support different configuration strategies based on knowledge graph complexity and retrieval requirements:Precision-Focused Strategy
Configuration:topK: 5-10
- Focus: High-relevance entity-based retrieval
- Resource Usage: Low system overhead
- Processing Speed: Fastest knowledge graph traversal
- Quality Profile: High precision with focused entity coverage
- Expert knowledge systems requiring precise entity matching
- Critical decision support with specific domain entities
- Real-time applications with strict performance requirements
- Scenarios where entity precision is more important than coverage
Balanced Strategy
Configuration:topK: 12-20
- Focus: Optimal balance of entity coverage and performance
- Resource Usage: Moderate system consumption
- Processing Speed: Good knowledge graph traversal performance
- Quality Profile: Balanced entity precision and relationship coverage
- General-purpose knowledge management systems
- Business intelligence with entity-relationship analysis
- Educational platforms requiring comprehensive knowledge coverage
- Multi-domain applications with diverse entity types
Comprehensive Strategy
Configuration:topK: 25-40
- Focus: Thorough knowledge graph exploration
- Resource Usage: Higher system consumption
- Processing Speed: More intensive graph traversal
- Quality Profile: High entity recall with comprehensive relationship mapping
- Research platforms requiring extensive entity analysis
- Complex domain knowledge systems
- Investigation and discovery applications
- Academic research with comprehensive knowledge requirements
Unlimited Strategy
Configuration:topK: null
- Focus: Complete knowledge graph analysis
- Resource Usage: Maximum system consumption
- Processing Speed: Most intensive processing
- Quality Profile: Maximum entity and relationship coverage
- Exhaustive knowledge discovery projects
- Complete domain analysis and mapping
- Research scenarios requiring full knowledge graph traversal
- Resource-unlimited comprehensive analysis
Code Examples
JavaScript/Node.js
Python
cURL
Error Responses
Common Error Codes
| Status Code | Description | Example Response |
|---|---|---|
| 400 | Bad Request - Invalid configuration parameters | {"detail": "Invalid topK value: must be a positive integer or null"} |
| 401 | Unauthorized - Invalid or missing API token | {"detail": "Invalid authentication credentials"} |
| 404 | Not Found - Flow or node not found | {"detail": "Graph RAG node not found"} |
| 422 | Validation Error - Configuration validation failed | {"detail": "Configuration validation failed: topK must be between 1 and 100 or null"} |
| 500 | Internal Server Error - Server error | {"detail": "Failed to update graph RAG configuration"} |
Error Response Format
Example Error Responses
Invalid Configuration
Node Not Found
Validation Error
Internal Configuration
Graph RAG nodes use predefined internal configurations that are automatically applied:Graph RAG Chunking Configuration
Graph RAG Retrieval Configuration
NLP Extraction Configuration
Best Practices
Configuration Management
- Start with Balanced: Begin with
topK: 15and adjust based on knowledge graph metrics - Monitor Entity Density: Track entities per chunk to guide configuration decisions
- Relationship Analysis: Consider relationship ratios when choosing strategies
- Incremental Adjustments: Make gradual changes and measure impact
Performance Optimization
Knowledge Graph Efficiency
- Entity Focus: Use precision strategy for entity-specific applications
- Relationship Mapping: Use comprehensive strategy for relationship-heavy domains
- Resource Planning: Plan system resources based on Top K configuration
- Processing Time: Balance knowledge coverage with acceptable processing time
Resource Management
- System Monitoring: Track resource usage across different configurations
- Batch Optimization: Consider entity extraction batch sizes
- Memory Usage: Monitor knowledge graph memory consumption
- Storage Impact: Plan for knowledge graph storage requirements
Quality Assurance
Knowledge Graph Quality
- Entity Validation: Regularly validate extracted entities for accuracy
- Relationship Quality: Monitor relationship extraction quality
- Graph Connectivity: Ensure optimal connectivity ratios
- Domain Alignment: Verify entity types align with your domain
Continuous Improvement
- Metrics Tracking: Monitor entity density and relationship ratios
- Performance Baselines: Establish knowledge graph quality benchmarks
- Regular Reviews: Schedule periodic configuration reviews
- A/B Testing: Test different configurations with real queries
Troubleshooting
Configuration Update Failed
Configuration Update Failed
Solution: Check that:
- The node ID is correct and exists in the specified flow
- The API token has sufficient permissions for flow modifications
- The topK value is valid (positive integer or null)
- The request body is properly formatted JSON
Poor Entity Extraction After Update
Poor Entity Extraction After Update
Solution: If entity extraction quality decreases:
- Verify that the new topK allows sufficient entity coverage
- Check if the configuration change affects knowledge graph completeness
- Review entity density metrics before and after the change
- Consider reverting to previous configuration if quality is significantly impacted
Low Graph Connectivity
Low Graph Connectivity
Solution: If relationship mapping suffers:
- Ensure topK is sufficient for relationship discovery
- Review if comprehensive strategy is needed for your domain
- Check that source documents contain relational content
- Validate that allowed relationship types are appropriate
Processing Performance Issues
Processing Performance Issues
Solution: If processing becomes too slow:
- Consider reducing topK to improve processing speed
- Monitor system resources during knowledge graph construction
- Review if precision strategy is more appropriate
- Check for bottlenecks in NLP extraction or graph storage
High Resource Usage
High Resource Usage
Solution: If resource consumption is excessive:
- Reduce topK to limit processing scope
- Monitor memory usage during knowledge graph operations
- Consider implementing resource monitoring and alerts
- Evaluate if unlimited strategy is necessary for your use case
Connection Issues
Connection Issues
Solution: For connectivity problems:
- Check your internet connection
- Verify the flow URL is accessible
- Ensure your firewall allows HTTPS traffic to *.flows.graphorlm.com
- Try updating the configuration from a different network
Advanced Configuration
Dynamic Configuration Based on Metrics
Multi-Node Configuration Management
Next Steps
After updating your graph RAG configuration, consider:List Graph RAG Nodes
Verify your configuration changes and monitor knowledge graph metrics
Run Flow
Execute your flow to test the updated graph RAG configuration
Monitor Performance
Track knowledge graph performance and entity extraction quality
Flow Overview
Learn about other flow management capabilities

