Miriel AI icon

Miriel AI

Miriel AI - Query data or learn from input strings

Actions2

Overview

The node "Miriel AI" provides functionality to query data using Miriel AI's API or to submit learning data for processing. Focusing on the Query - Execute Query operation, this node allows users to send complex queries to Miriel AI's service and retrieve structured results including vector search results, graph data, and language model (LLM) outputs.

This node is beneficial in scenarios where you want to perform advanced semantic searches, metadata filtering, or leverage AI-powered insights over your datasets. For example, it can be used to:

  • Retrieve relevant documents or data points based on a natural language query.
  • Combine vector database queries with metadata filters to refine search results.
  • Obtain explanations or justifications from an LLM about the query results.
  • Customize the response format to fit specific application needs.

Properties

Name Meaning
Response Format Optional JSON object defining how the response should be formatted. Example: {"covered": ["string"], "personal": ["string"], "justification": "string"}.
User ID Optional user identifier to associate with the query.
Vector DB Query Optional string to specify a vector database query component.
Metadata Query Optional string to filter or query based on metadata.
Fast Mode Boolean flag to enable fast mode for the query, potentially trading off thoroughness for speed.
Project Optional project identifier string to scope the query within a specific project context.
Want Vector Boolean indicating whether to include vector search results in the response. Defaults to true.
Want Graph Boolean indicating whether to include graph-based results in the response. Defaults to true.
Want LLM Boolean indicating whether to include language model (LLM) results in the response. Defaults to true.
Number of Results Number specifying how many results to return. Default is 10.
Mock Response Optional string to provide a mock response for testing purposes instead of making a real API call.
Force Exhaustive Boolean flag to force exhaustive search rather than faster approximate methods. Defaults to false.
Model Optional string to specify which AI model to use for the query.

Output

The output is an array of JSON objects, each corresponding to one input item processed by the node. Each output item contains:

  • originalItem: The original query string or JSON input.
  • query: The query string sent to the API.
  • mirielResponse: The full raw response object returned by the Miriel AI API.
  • llmResult: Parsed JSON result from the LLM part of the response if available; otherwise, the raw string.
  • itemIndex: The index of the input item processed.

The node does not output binary data.

Dependencies

  • Requires an API key credential for Miriel AI's service.
  • Makes HTTP POST requests to Miriel AI endpoints:
    • Query endpoint: https://api.dev.miriel.ai/api/v2/query
  • The node expects the API key to be provided via n8n credentials configuration.
  • No other external dependencies are required.

Troubleshooting

  • No input data provided: The node throws an error if no input items are given. Ensure that the previous node provides data.
  • Invalid JSON in Response Format parameter: If the Response Format property contains invalid JSON, the node will throw an error. Validate JSON syntax before running.
  • Invalid API key: If the API key is incorrect or unauthorized, the node returns an error prompting to sign up or check the API key.
  • API call failures: Network issues or server errors will cause the node to throw errors with messages indicating the failure reason.
  • Parsing LLM result: If the LLM result is not valid JSON, the node returns the raw string without parsing.

To resolve these issues:

  • Verify input data presence and correctness.
  • Check and correct JSON formatting in parameters.
  • Confirm API key validity and permissions.
  • Review network connectivity and API service status.

Links and References

  • Miriel AI Website
  • Miriel AI API documentation (not publicly linked here, refer to Miriel AI support or developer resources)

Discussion