Retrieval endpoints allow you to manage document search and retrieval components in your GraphorLM flows. Retrieval nodes perform similarity search operations to find relevant documents for user queries in RAG (Retrieval-Augmented Generation) systems.

What are Retrieval Nodes?

Retrieval nodes are components that:
  • Execute Similarity Search: Perform vector-based document retrieval
  • Filter Results: Apply score thresholds to ensure quality
  • Enable RAG Systems: Provide retrieval foundation for Q&A systems
Retrieval component

Available Endpoints

Node Structure

Each retrieval node contains:
{
  "id": "retrieval-1748287628686",
  "type": "retrieval",
  "data": {
    "name": "Document Retrieval",
    "config": {
      "searchType": "hybrid",
      "topK": 15,
      "scoreThreshold": 0.75,
      "retrievalQuery": "Find relevant information about: {query}"
    },
    "result": {
      "updated": true,
      "processing": false,
      "total_retrievals": 1247
    }
  }
}

Configuration Parameters

Search Types

  • similarity: Vector-based semantic matching
  • hybrid: Combines semantic and keyword search
  • keyword: Traditional term-based search
  • semantic: Advanced contextual understanding

Key Parameters

  • topK: Maximum documents to retrieve (1-100)
  • scoreThreshold: Minimum similarity score (0.0-1.0)
  • retrievalQuery: Custom query template

Example Configurations

General Purpose (Hybrid)

{
  "searchType": "hybrid",
  "topK": 15,
  "scoreThreshold": 0.7
}

High Precision (Similarity)

{
  "searchType": "similarity",
  "topK": 10,
  "scoreThreshold": 0.8
}

Fast Search (Keyword)

{
  "searchType": "keyword",
  "topK": 12,
  "scoreThreshold": 0.6
}

Authentication & URL Structure

Base URL

https://{flow_name}.flows.graphorlm.com/retrieval[/{node_id}]

Authentication

Authorization: Bearer YOUR_API_TOKEN
Generate API tokens through the API Tokens guide.

HTTP Methods

  • GET: List and retrieve retrieval nodes
  • PATCH: Update retrieval configurations

Response Format

{
  "id": "retrieval-node-id",
  "type": "retrieval", 
  "data": {
    "name": "Node Name",
    "config": {
      "searchType": "hybrid",
      "topK": 15,
      "scoreThreshold": 0.75
    },
    "result": {
      "updated": true,
      "processing": false,
      "total_retrievals": 1247
    }
  }
}

Error Handling

Status CodeDescriptionSolution
400Invalid parametersCheck configuration values
401Authentication failureVerify API token
404Node/flow not foundCheck flow name and node ID
422Validation errorReview required fields
Error response format:
{
  "detail": "Descriptive error message"
}

Quick Start

  1. List nodes: Review existing retrieval configurations
  2. Choose strategy: Select appropriate search type
  3. Configure parameters: Set topK and scoreThreshold
  4. Test and iterate: Optimize based on results

Next Steps