h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node operation "Finds Chunks Related to a Message Using Lexical Search" within a specified collection. It performs a lexical search on document chunks in the collection, filtered by specific topics (document IDs), and returns chunks sorted by relevance and similarity score to the input query message. This is useful for retrieving relevant pieces of information from large document collections based on user queries.

Common scenarios include:

  • Searching internal knowledge bases or document repositories to find relevant text snippets related to a user's question.
  • Filtering search results to specific documents within a collection using topic filters.
  • Implementing search assistants that provide contextually relevant document excerpts for further processing or display.

Example: Given a collection of technical manuals, a user can query "How to reset the device?" with topics filtering to certain manuals, and the node will return the most relevant text chunks matching the query.

Properties

Name Meaning
Collection ID ID of the collection to search within
Query The question or command from the end user to search the collection for
Topics A list of document IDs used to filter which documents in the collection to search
Additional Options Optional parameters:
- Offset: Number of chunks to skip before returning results
- Limit: Maximum number of results to return

Output

The output contains JSON data representing the search results. Each item corresponds to a chunk found in the collection that matches the query lexically. The chunks are sorted by their relevance and similarity score to the query message.

If binary data were involved, it would be summarized here, but this operation deals with textual chunk data only.

Dependencies

  • Requires an API key credential for authentication to the external service hosting the collections and search API.
  • The node sends a POST request to the endpoint /collections/{collection_id}/chunks/search with the query, topics, and optional pagination parameters.
  • The base URL and headers are configured via credentials and environment variables in n8n.

Troubleshooting

  • Missing or invalid Collection ID: Ensure the Collection ID is correctly provided and exists in the system.
  • Empty or malformed Query: The query string must be non-empty and properly formatted.
  • Invalid Topics format: Topics should be a valid list of document IDs; incorrect formatting may cause errors.
  • API Authentication Errors: Verify that the API key credential is valid and has permissions to access the collection.
  • Timeouts or Network Issues: Large queries or collections might cause delays; consider adjusting timeout settings if available.
  • Limit and Offset values: Ensure limit is a positive integer and offset is zero or positive to avoid unexpected results.

Links and References

  • h2oGPT Documentation (general project)
  • API endpoint reference for collections and chunk search (refer to your service's API docs)

This summary is based solely on static analysis of the provided source code and property definitions.

Discussion