SmartGent Enterprise Search icon

SmartGent Enterprise Search

Search enterprise data using SmartGent AI-powered search

Overview

This node integrates with the SmartGent Enterprise Search API to enable two main operations:

  • Get Chatbots: Retrieves a list of available chatbots configured in the SmartGent system. This is useful for users who want to see which chatbots they can query or manage.
  • Search: Executes a search query using a selected chatbot, returning relevant enterprise data powered by SmartGent's AI search capabilities.

Typical use cases include:

  • Discovering and selecting chatbots for enterprise knowledge bases.
  • Performing AI-powered searches across enterprise documents, FAQs, or datasets via a chosen chatbot.
  • Filtering and limiting search results based on user-defined criteria.

For example, a user might first retrieve all chatbots to present options in a UI, then perform a search query on a specific chatbot to get targeted information.

Properties

Name Meaning
Operation Choose between "Get Chatbots" (retrieve chatbot list) or "Search" (perform a search query).
Chatbot Name or ID Select the chatbot to use for searching. Available only when Operation is "Search".
Search Query The text query to send to the selected chatbot for searching. Required for the "Search" operation.
Additional Options Collection of optional fields to customize the search:
- Max Results Maximum number of search results to return (number).
- Include Pricing Whether to include pricing information in the search results (boolean).
- Search Filters One or more filters to apply on specific fields during search. Each filter has:
  Field The field name to filter on (string).
  Value The value to match for the specified field (string).

Output

The node outputs JSON data structured as follows depending on the operation:

  • Get Chatbots:

    {
      "operation": "getChatbots",
      "success": true,
      "chatbots": [ /* array of chatbot objects with details */ ],
      "chatbotCount": 5,
      "timestamp": "2024-06-xxTxx:xx:xx.xxxZ"
    }
    
    • chatbots contains the list of available chatbots retrieved from the API.
    • chatbotCount indicates how many chatbots were returned.
  • Search:

    {
      "operation": "search",
      "chatbotGuid": "selected-chatbot-id",
      "query": "user search query",
      "results": { /* search results object from API */ },
      "timestamp": "2024-06-xxTxx:xx:xx.xxxZ",
      "resultCount": 10
    }
    
    • results contains the detailed search results returned by the SmartGent API.
    • resultCount shows the number of results returned.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the SmartGent Enterprise Search API.
  • The node makes HTTP requests to the SmartGent API endpoints:
    • GET /api/v1/rag/enterprise/group/chatbot to fetch chatbots.
    • POST /api/v1/rag/enterprise/groupsearch to perform searches.
  • The API base URL and API key must be configured in the node credentials.

Troubleshooting

  • Common Issues:

    • Invalid or missing API key will cause authentication failures.
    • Network connectivity issues may prevent reaching the SmartGent API.
    • Providing invalid chatbot IDs or queries may result in empty or error responses.
    • Misconfigured filters or additional options could lead to unexpected search results.
  • Error Messages:

    • Errors thrown during execution include descriptive messages such as "Failed to execute SmartGent Enterprise Search: [error message]".
    • If continueOnFail is enabled, errors are returned as part of the output JSON with an error field describing the issue.
  • Resolutions:

    • Verify that the API key credential is correctly set up and valid.
    • Check network access to the SmartGent API endpoint.
    • Ensure chatbot IDs used in the "Search" operation exist and are fetched via "Get Chatbots".
    • Validate input parameters, especially filters and max results, conform to expected formats.

Links and References

Discussion