Overview
The List Smart RAG Nodes endpoint allows you to retrieve information about smart RAG nodes within a flow. Smart RAG nodes are all-in-one components that automatically handle document processing, chunking, embedding generation, and intelligent retrieval, providing a streamlined approach to building sophisticated RAG pipelines.- Method:
GET
- URL:
https://{flow_name}.flows.graphorlm.com/smart-rag
- 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 |
Parameters
No query parameters are required for this endpoint.Example Request
Response Format
Success Response (200 OK)
The response contains an array of smart RAG node objects:Response Structure
Each smart RAG node in the array contains:Field | Type | Description |
---|---|---|
id | string | Unique identifier for the smart RAG node |
type | string | Node type (always “smart-rag” for smart RAG nodes) |
position | object | Position coordinates in the flow canvas |
style | object | Visual styling properties (height, width) |
data | object | Smart RAG node configuration and results |
Position Object
Field | Type | Description |
---|---|---|
x | number | X coordinate position in the flow canvas |
y | number | Y coordinate position in the flow canvas |
Style Object
Field | Type | Description |
---|---|---|
height | integer | Height of the node in pixels |
width | integer | Width of the node in pixels |
Data Object
Field | Type | Description |
---|---|---|
name | string | Display name of the smart RAG node |
config | object | Node configuration including retrieval settings |
result | object | Processing results and status information (optional) |
Config Object
Field | Type | Description |
---|---|---|
topK | integer | Number of top results to retrieve during query processing (default: 5) |
Result Object (Optional)
Field | Type | Description |
---|---|---|
updated | boolean | Whether the node has been processed with current configuration |
processing | boolean | Whether the node is currently being processed |
waiting | boolean | Whether the node is waiting for dependencies |
has_error | boolean | Whether the node encountered an error during processing |
updatedMetrics | boolean | Whether evaluation metrics have been computed |
total_processed | integer | Total number of documents processed (if available) |
total_chunks | integer | Number of chunks generated during processing (if available) |
total_retrieved | integer | Number of documents retrieved in recent queries (if available) |
Code Examples
JavaScript/Node.js
Python
cURL
PHP
Error Responses
Common Error Codes
Status Code | Description | Example Response |
---|---|---|
401 | Unauthorized - Invalid or missing API token | {"detail": "Invalid authentication credentials"} |
404 | Not Found - Flow not found | {"detail": "Flow not found"} |
500 | Internal Server Error - Server error | {"detail": "Failed to retrieve smart RAG nodes"} |
Error Response Format
Example Error Responses
Invalid API Token
Flow Not Found
Server Error
Use Cases
Smart RAG Node Management
Use this endpoint to:- Configuration Overview: Review smart RAG settings and Top K configurations
- Performance Monitoring: Check processing status and document processing metrics
- Flow Analysis: Understand the intelligent RAG components in your pipeline
- Metrics Evaluation: Monitor retrieval quality and processing effectiveness
Integration Examples
Smart RAG Performance Monitor
Configuration Optimizer
Best Practices
Configuration Management
- Optimal Top K: Start with default values (5-10) and adjust based on quality requirements
- Performance Monitoring: Regularly check processing metrics and retrieval effectiveness
- Metrics Evaluation: Enable metrics on all nodes to track RAG pipeline quality
- Resource Management: Balance Top K values with system performance requirements
Performance Optimization
- Integrated Processing: Leverage smart RAG’s combined chunking + retrieval for simplified workflows
- Batch Operations: Monitor processing efficiency across multiple documents
- Quality Assessment: Use built-in metrics to evaluate retrieval relevance
- Resource Planning: Consider processing time and resource consumption for large document sets
Monitoring and Maintenance
- Regular Health Checks: Monitor smart RAG nodes for processing completion and errors
- Configuration Validation: Verify that Top K settings align with your quality requirements
- Performance Tracking: Monitor throughput metrics and processing times
- Quality Monitoring: Track retrieval effectiveness through updated metrics
Troubleshooting
Flow Not Found Error
Flow Not Found Error
Solution: Verify that:
- The flow name in the URL is correct and matches exactly
- The flow exists in your project
- Your API token has access to the correct project
- The flow has been created and saved properly
Empty Smart RAG Nodes Array
Empty Smart RAG Nodes Array
Solution: If no smart RAG nodes are returned:
- Verify the flow contains smart RAG components
- Check that smart RAG nodes have been added to the flow
- Ensure the flow has been saved after adding smart RAG nodes
- Confirm you’re checking the correct flow
Invalid Configuration Settings
Invalid Configuration Settings
Solution: If smart RAG nodes have invalid configurations:
- Verify Top K is a positive integer or null
- Ensure Top K value is reasonable for your use case (typically 1-50)
- Check that input nodes (datasets) are properly configured
- Validate that the node has proper connections to data sources
Processing Status Issues
Processing Status Issues
Solution: If nodes show persistent processing or error status:
- Check if processing is taking longer due to large document volumes
- Verify that upstream dataset nodes are configured correctly
- Monitor system resources and processing capacity
- Review error logs for specific processing issues
Missing Metrics Data
Missing Metrics Data
Solution: If nodes show
updatedMetrics: false
:- Ensure evaluation data (questions/testsets) are connected to the node
- Re-run the flow to trigger metrics computation
- Check that the evaluation process completed successfully
- Verify that evaluation inputs are properly formatted
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 accessing the endpoint from a different network