For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
      • Displayable Nodes
        • Agent Node
        • Inline Prompt Node
        • Inline Subworkflow Node
        • Prompt Deployment Node
        • Search Node
        • Subworkflow Deployment Node
        • API Node
        • Code Execution Node
        • Templating Node
        • Guardrail Node
        • Map Node
        • Conditional Node
        • Merge Node
        • Error Node
        • Final Output Node
      • Datasets
      • CLI
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
LogoLogo
BlogLog InRequest Demo
Workflows SDKAPI ReferenceDisplayable Nodes

Search Node

Example Usage
1from vellum import (
2 SearchRequestOptionsRequest,
3 SearchWeightsRequest,
4 SearchResultMergingRequest,
5 SearchFiltersRequest,
6)
7from vellum.workflows.nodes.displayable import SearchNode
8
9class MySearchNode(SearchNode):
10 query = "Hello, world"
11 document_index = "my_document_index"
12 options = SearchRequestOptionsRequest(
13 limit=8,
14 weights=SearchWeightsRequest(
15 semantic_similarity=0.8,
16 keywords=0.2,
17 ),
18 result_merging=SearchResultMergingRequest(
19 enabled=True
20 ),
21 filters=SearchFiltersRequest(
22 external_ids=None,
23 metadata=None,
24 ),
25 )
26 chunk_separator = "\n\n#####\n\n"
Example Outputs
1from vellum import SearchResult, SearchResultDocument
2
3MySearchNode.Outputs(
4 text="Goodbye, world",
5 results=[
6 SearchResult(
7 text="Goodbye, world",
8 score=0.5,
9 keywords=[...],
10 document=SearchResultDocument(
11 id="<id>",
12 label="My Document",
13 external_id="<external-id>",
14 metadata={},
15 ),
16 meta=None,
17 ),
18 ...
19 ],
20)
Was this page helpful?
Previous

Subworkflow Deployment Node

Next
Built with

vellum.workflows.nodes.SearchNode

Used to perform a hybrid search against a Document Index in Vellum.

Attributes

document_index
Union[UUID, str]Required

Either the UUID or name of the Vellum Document Index that you’d like to search against

query
strRequired

The query to search for

options
SearchRequestOptionsRequest

Runtime configuration for the search

chunk_separator
str

The separator to use when joining the text of each search result

Outputs

text
str

The concatenated text output from the search

results
List[SearchResult]

The raw results from the search