Node Details

  • Name: queryEngineToolLlamaIndex

  • Type: QueryEngineTool

  • Version: 2.0

  • Category: Tools

Input Parameters

  1. Base QueryEngine

    • Label: Base QueryEngine

    • Name: baseQueryEngine

    • Type: BaseQueryEngine

    • Description: The underlying query engine that this tool will use for processing queries.

  2. Tool Name

    • Label: Tool Name

    • Name: toolName

    • Type: string

    • Description: A unique identifier for the tool. Must be in lowercase with underscores (e.g., “my_tool”).

  3. Tool Description

    • Label: Tool Description

    • Name: toolDesc

    • Type: string

    • Description: A brief description of what the tool does or its purpose.

Output

The node initializes and returns a QueryEngineTool instance, which can be used in other parts of your application or workflow.

Usage

This node is typically used in scenarios where you need to:

  1. Integrate a query engine into a larger AI system.

  2. Create a tool that can be used by language models to access and query specific information.

  3. Build a modular system where different query engines can be swapped or combined.

Implementation Details

  • The node uses the QueryEngineTool class from the LlamaIndex library.

  • It takes the base query engine, tool name, and description as inputs.

  • The init method creates and returns a new QueryEngineTool instance with the provided parameters.

Base Classes

  • QueryEngineTool

  • Tool_LlamaIndex

This node serves as a bridge between raw query engines and higher-level AI applications, allowing for more flexible and powerful information retrieval systems.