Skip to content

DocSearch Node

The DocSearch Node in GALE's Agent Flow improves how information is found and processed. It uses advanced searching called Retrieval Augmented Generation (RAG).

By connecting to your Search AI App, the DocSearch Node provides high-quality search results that are relevant to the current context. These results are delivered right inside the agent workflow.

Key Features

  • RAG Searching Framework:

    RAG blends traditional retrieval systems (e.g., search, databases) with generative LLM capabilities, ensuring more accurate, relevant, and up-to-date results tailored to your needs.

    RAG enhances generative AI outputs through these key steps:

    • Retrieval & Pre-processing: Powerful search algorithms query external data (e.g., web pages, databases). Retrieved data is pre-processed through tokenization, stemming, and stop-word removal.
    • Grounded Generation: Pre-processed data integrates with the LLM, enriching its context for more accurate, informative, and engaging responses.

  • Integration with SearchAI
    • The DocSearch Node connects to a configured Search AI App via GALE’s integration page.
    • It accesses indexed resources from the Sources repository within Search AI to retrieve relevant information.
  • Dynamic Input Queries
    • Accepts search input either as a variable or static text.
    • Facilitates seamless query processing by Search AI, which identifies and extracts/retrieves contextually relevant chunks from the available resources using SearchAI’s Answer Generation, corresponding to the input query and the meta filters provided via the Advanced Search API. Learn more.
  • Configurable Meta filters

    • You can configure optional meta filters to narrow the search field with the query.
    • If meta filters are not provided, the query is applied to all the documents uploaded to that connection. Learn more.
  • Redirection Capability

    • Includes an option to redirect users to the Search AI App directly from the node.
  • Enhanced Search Relevance

    • By prioritizing results using RAG criteria, the node provides precise, complete, and context-aware answers.
    • Improves search relevance by focusing on delivering responses tailored to user intent.
  • Contextual Personalization

    • Ensures results are personalized to the query context, enhancing user experience and satisfaction.
  • Connectivity with Other Nodes

    • Connect the DocSearch Node inputs and outputs to other nodes for seamless integration and data flow within the Agent Flow Canvas.

Configuration Overview

Configuring the DocSearch Node consists of the following steps:

  1. Set up a Search AI application and the information source for GALE integration.
  2. Link the Search AI application in GALE.
  3. Add and configure the DocSearch node.

Step 1: Set up Search AI App

The integration of Search AI with GALE involves setting up a Search AI application, configuring it for integration, and modifying GALE to interact with Search AI in response to specific conditions or events. Search AI provides REST APIs that enable seamless interaction with any application.

Follow the detailed steps here to complete the configuration.

Note

To receive answers from Search AI, you must enable the Answer Generation option under the API scopes section.

After fetching the Search AI application credentials, configuring the source, and enabling the channel communication via API, you must link the app in GALE.

Steps to integrate Search AI in GALE

  1. Sign in to your GALE account.
  2. Navigate to the Settings console.
  3. Click Integrations on the left navigation menu.
  4. Scroll down to Search AI and click Link an App. link an app

  5. In the Search AI window, provide the required information that you copied from the SearchAI application in Step 1.

  6. Click Test to test the connection.
  7. If the connection is successful, click Confirm. searchai connection form

A success message is displayed and the connection is listed for SearchAI. listed connection

If the connection fails with the following message, check and re-enter the correct Search AI app credentials.

connection failure

Note

Currently, we support connections through Search AI. You must provide "https://platform.kore.ai" for the Search AI URL field.

Step 3: Add and Configure a DocSearch Node

Setting up a DocSearch node in an agent flow involves adding the node at the appropriate location in the flow and configuring various node properties.

Steps to add and configure the node

  1. On the Agents tab, click the name of the agent to which you want to add the node. The Agent Flow page is displayed. access agents menu

  2. Click Go to flow to edit the in-development version of the flow. go to agent flow

  3. In the flow builder, click DocSearch -> + New DocSearch on the Assets panel. Alternatively, click DocSearch in the bottom panel. add doc search node

  4. To provide a unique name, right-click the node and click Rename since the node is provided a default name.

    rename node

Alternatively, click the node and change the value for Node Name in the configuration panel. node name

  1. Enter an input variable for dynamic inputs or plaintext for hard-coded inputs in the Query field. This field captures the user’s search query. query field
  2. Select the Search AI connection you set up in Step 2 on the GALE integration page. search ai connection

Note

Use search to look up and select the required connection.

To set up a new connection, click + New Connection. This will redirect you to the GALE Integrations page. Follow the steps mentioned here to complete the integration.

  1. (Optional) Set Meta filters (click the expansion arrow to access the editor) to define rules that will narrow down the search results. For example, if the sources have multiple files, you can define the specific file names to look up in the meta filters code. Learn more. set meta filters

Note

  • If you do not provide any meta filters, the query is applied to all the documents uploaded to that connection.
  • The filters can be a context variable in the flow depending on the builder’s requirement.

  1. Enter the search query in the text field. enter the search query
  2. Click the Response tab and define the JSON structure for the agent's response to the user's query. click response tab
  3. Click Test to test the response.
  4. test response

The request and response are displayed in the Run window. run window

Use the extracted chunks (shown in the example below), as required to build the agent flow. extracted chunks