Signpost AI Logo
WorkersTools

Search

📸 Screenshots

Here are visual examples of this section:

Search - Worker Configuration Interface Search - Worker Configuration Interface

1. Overview and Purpose

The Search worker performs vector similarity searches across different knowledge bases and search engines. It supports multiple backends including Supabase vector databases, Databricks vector search, and external engines like Weaviate and Exa. The worker returns relevant documents based on semantic similarity to the input query.

2. Configuration Parameters

  • engine: Specifies the search engine to use - "weaviate", "exa", "supabase", or "databricks"
  • maxResults: Maximum number of search results to return (default: 5)
  • domain: Array of domains to restrict search scope for external engines
  • distance: Similarity threshold for filtering results (default: 0.5 for external, 0.3 for Supabase)
  • collections: Array of collection IDs to search within for Supabase engine
  • toolDescription: Description text when worker is used as a tool
  • databricksEndpoint: API endpoint URL for Databricks vector search
  • databricksIndex: Index name for Databricks vector search

3. Input/Output Handles

  • input: Input handle - accepts search query string
  • output: Output handle - returns array of VectorDocument objects
  • textOutput: Output handle - returns search results formatted as markdown text
  • references: Output handle - returns array of reference objects with links and titles
  • tool: Input handle - enables use as a tool in agent workflows
  • engine: Input handle - accepts engine type override
  • domain: Input handle - accepts domain restrictions array
  • distance: Input handle - accepts similarity threshold override
  • maxResults: Input handle - accepts result limit override
  • collections: Input handle - accepts collection IDs for Supabase searches

4. Usage Examples with Code

// Basic search configuration
const searchWorker = {
  parameters: {
    engine: "supabase",
    maxResults: 10,
    distance: 0.3,
    collections: ["collection-1", "collection-2"]
  }
}

// Tool usage in agent
const tool = {
  parameters: {
    query: "artificial intelligence applications"
  }
}

5. Integration Examples

This worker integrates with knowledge management workflows by providing semantic search capabilities. It can be chained with other workers to retrieve relevant context before generating responses or used as a tool that agents can call dynamically during conversations.

6. Best Practices

  • Use lower distance thresholds (0.2-0.4) for more precise matches, higher values (0.6-0.8) for broader results
  • Configure appropriate maxResults based on downstream processing capacity
  • For Supabase searches, ensure collections contain properly embedded documents
  • Test different engines to find the best match for your specific use case and data types

7. Troubleshooting Tips

  • Verify API keys are properly configured for your chosen search engine
  • Check that collection IDs exist and contain embedded documents for Supabase searches
  • Ensure Databricks endpoint and index parameters are correctly formatted
  • If no results are returned, try increasing the distance threshold or broadening the search query