Skip to main content
Version: v2.4.0

VecSearch Flow

The VecSearch flow implements a Retrieval-Augmented Generation (RAG) pipeline with conditional nodes for query rephrasing, store discovery, retrieval, and document grading. It is exposed through the AgentSpec REST API under the name vecsearch_flow.

  • The system prompt is fetched from the prompt registry (optimizer_vs-tools-default). If unavailable, a default instruction is used.
  • build_vecsearch_flow creates a portable AgentSpec Flow with conditional nodes based on the user's vector search settings (rephrase, discovery, grade).
  • Rephrase (optimizer_vs_rephrase) rewrites the user question using conversation history to improve retrieval quality.
  • Discovery (optimizer_vs_discovery) lists available vector stores when Store Discovery is enabled, allowing the LLM to select the most relevant store.
  • Retriever (optimizer_vs_retriever) performs the core vector similarity search and always runs.
  • Grade (optimizer_vs_grade) filters retrieved documents for relevance before answer generation.
  • The final LLM node generates the answer using the system prompt and the retrieved (or graded) documents.
  • Unlike NL2SQL, VecSearch does not require a database connection name — it operates entirely through vector search tools.
  • When a small model is selected in the GUI, its first CPU-optimization pass disables Store Discovery, Rephrase, and Grade. You can re-enable these options; API and persisted settings are otherwise used as configured. See Model Configuration for details.