Qdrant

Qdrant is a high-performance vector database for semantic search, recommendations, and RAG (Retrieval-Augmented Generation) applications.

Setup

# .env
QDRANT_URL=https://...
QDRANT_API_KEY=...
QDRANT_COLLECTION=documents

Storing vectors

capabilityId: qdrant-upsert
provider:
  type: qdrant
  operation: upsert

inputs:
  collection:
    type: string
  points:
    type: array
    items:
      type: object
      properties:
        id: string
        vector: array
        payload: object

outputs:
  status:
    type: string

Semantic search

capabilityId: qdrant-search
provider:
  type: qdrant
  operation: search

inputs:
  collection:
    type: string
  vector:
    type: array
    items:
      type: number
  limit:
    type: number
    default: 10

outputs:
  results:
    type: array
    items:
      type: object
      properties:
        id: string
        score: number
        payload: object

RAG workflow example

workflowId: rag-query
version: 1.0.0

steps:
  - id: generate-embedding
    capability: openai-embeddings
    inputs:
      text: ${input.query}

  - id: search-documents
    capability: qdrant-search
    inputs:
      collection: "documents"
      vector: ${steps.generate-embedding.output.embedding}
      limit: 5

  - id: generate-answer
    capability: openai-chat
    inputs:
      messages:
        - role: "system"
          content: "Answer based on the context provided"
        - role: "user"
          content: |
            Context: ${steps.search-documents.output.results}
            Question: ${input.query}