Cross-Provider Workflow

NVIDIA NIM Reranking to Notion Record

Version 1.0.0

Rerank candidate passages with NVIDIA NIM, then record the top hit in Notion.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

nvidia-nim notion

Workflows

rerank-and-record
Rerank passages with NVIDIA NIM and record the top hit in Notion.
Sends a query and candidate passages to NVIDIA NIM reranking, captures the index of the top-ranked passage, and records the result in a Notion page.
2 steps inputs: databaseId, model, passageA, passageB, query outputs: pageId, topIndex
1
rerank-passages
$sourceDescriptions.nvidiaNimApi.rankPassages
Rerank the candidate passages against the query.
2
record-result
$sourceDescriptions.notionApi.createPage
Record the top-ranked passage index in a Notion page.

Source API Descriptions

Arazzo Workflow Specification

ai-nvidia-rerank-to-notion-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: NVIDIA NIM Reranking to Notion Record
  summary: Rerank candidate passages with NVIDIA NIM, then record the top hit in Notion.
  description: >-
    A cross-provider AI enrichment chain that reranks candidate passages against a
    query using NVIDIA NIM's reranking endpoint and records the top-ranked result
    in a Notion database page. Demonstrates relevance scoring feeding a knowledge
    base across two providers in one Arazzo workflow.
  version: 1.0.0
sourceDescriptions:
  - name: nvidiaNimApi
    url: https://raw.githubusercontent.com/api-evangelist/nvidia-nim/refs/heads/main/openapi/nvidia-nim-reranking-api-openapi.yml
    type: openapi
  - name: notionApi
    url: https://raw.githubusercontent.com/api-evangelist/notion/refs/heads/main/openapi/notion-openapi.yml
    type: openapi
workflows:
  - workflowId: rerank-and-record
    summary: Rerank passages with NVIDIA NIM and record the top hit in Notion.
    description: >-
      Sends a query and candidate passages to NVIDIA NIM reranking, captures the
      index of the top-ranked passage, and records the result in a Notion page.
    inputs:
      type: object
      properties:
        query:
          type: string
        passageA:
          type: string
        passageB:
          type: string
        model:
          type: string
        databaseId:
          type: string
    steps:
      - stepId: rerank-passages
        description: Rerank the candidate passages against the query.
        operationId: $sourceDescriptions.nvidiaNimApi.rankPassages
        requestBody:
          contentType: application/json
          payload:
            model: $inputs.model
            query:
              text: $inputs.query
            passages:
              - text: $inputs.passageA
              - text: $inputs.passageB
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          topIndex: $response.body#/rankings/0/index
          topLogit: $response.body#/rankings/0/logit
      - stepId: record-result
        description: Record the top-ranked passage index in a Notion page.
        operationId: $sourceDescriptions.notionApi.createPage
        requestBody:
          contentType: application/json
          payload:
            parent:
              database_id: $inputs.databaseId
            properties:
              Name:
                title:
                  - text:
                      content: "Query '$inputs.query' top passage index $steps.rerank-passages.outputs.topIndex"
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          pageId: $response.body#/id
    outputs:
      topIndex: $steps.rerank-passages.outputs.topIndex
      pageId: $steps.record-result.outputs.pageId