Mistral Integration Documentation
Overview
The Mistral integration provides robust methods for interacting with the Mistral AI API, enabling features such as chat completions and specialized tile summary generation. This integration allows users to leverage AI capabilities for data analysis and insights generation directly within the Vantage analytics platform.
API Documentation
For comprehensive details on the Mistral API, refer to the official Mistral API Documentation.
Settings
-
API Key
- Input Type: String
- Description: This is the authentication key required to access the Mistral API. It identifies the user account and authorizes API requests. If not configured, the integration will throw an error during the authentication process.
- Default Value:
None(Must be configured)
-
Model
- Input Type: String
- Description: Specifies which Mistral model to utilize for API calls (e.g., 'mistral-large-latest' or 'mistral-medium-latest'). Changing this setting affects the processing capabilities, response quality, and accuracy depending on the specific model capabilities.
- Default Value:
mistral-medium-latest
-
Max Tokens
- Input Type: Numeric
- Description: Determines the maximum number of tokens (words or symbols) that the AI will use for generating outputs during chat completions. This setting controls response length, where lower values may result in truncated replies.
- Default Value:
500(forchatCompletion),1000(forstreamChatCompletion)
-
Temperature
- Input Type: Numeric
- Description: Controls the randomness of the AI response. A value from
0 to 1can be set, where lower values make the output more deterministic and higher values introduce variability. For chat completion uses, it determines the creativity of responses. - Default Value:
0.7(forchatCompletion),0.5(forgenerateTileSummary),0.6(forchatWithContext)
-
Tile Title
- Input Type: String
- Description: This is the title for the specific dashboard tile that the AI the summary pertains to. It helps provide context within user queries and ensures that the output is relevant to the designated tile.
- Default Value:
Untitled Tile
-
Tile Type
- Input Type: String
- Description: Indicates the type of visualization (like bar, line, or stat) used within a dashboard tile. This context can influence how the AI analyzes and summarizes data.
- Default Value:
unknown
-
Tile Data
- Input Type: Array/Object
- Description: This represents the dataset displayed in the tile. The AI uses this data to generate insights and summaries based on the visualized information. It must be provided in a suitable shape for effective processing.
- Default Value:
[]
-
Tile Config
- Input Type: Object
- Description: Contains additional configuration settings related to the functionality and appearance of the tile. This can include aesthetic adjustments or parameters that define how the data is generated or visualized.
- Default Value:
{}
-
Context
- Input Type: String
- Description: Provides any supplemental information that may enhance the AI’s understanding of the tile or query. It can influence responses but isn’t mandatory for every request.
- Default Value:
''(empty string)
-
User Question
- Input Type: String
- Description: Captures a follow-up question that a user may have about a specific tile's data. It focuses the AI’s response on answering specific queries rather than general summaries.
- Default Value:
''(empty string)
-
Data Filter Info
- Input Type: Any
- Description: This optionally holds context about filtering applied to the data being analyzed. It can support data summaries with additional context about the analytical conditions considered.
- Default Value:
null
How It Works
The Mistral integration functions primarily through several key methods that allow seamless interaction with the Mistral API:
-
Authorization: The API key is employed to set the
Authorizationheader withBearertoken authentication. This is mandatory for successfully authorizing requests. -
Chat Completion Methods: Users can engage in two forms of chat completions - regular and streaming. In both cases, the model specified and various options like
maxTokensandtemperaturegovern the responses generated. -
Tile Summary Generation: This method takes specific properties of tiles (titles, types, data) and generates AI-driven insights. Each summary is crafted based on the defined context and optionally includes user-oriented questions.
-
Conversation Continuation: The integration supports scenarios where users can interactively query data via a conversation history, providing continuous context for evolving dialogues on tile data.
Data Expectations
The integration expects well-structured data that corresponds with the defined settings for proper function. This includes:
- Model specification (as per available models)
- Message arrays for chat completions must contain structured objects
{ role, content } - Valid tile data to be presented in manageable formats (array or object)
Use Cases & Examples
Use Cases
-
Real-Time Data Insights for Operations Teams: Utilize the integration to analyze operational data displayed on a dashboard, allowing teams to respond quickly to changes in performance metrics.
-
AI-Powered Summaries for Executive Reports: Employ the AI to generate concise summaries of business dashboards, providing executives with immediate insights without sifting through raw data.
-
Interactive Data Exploration: Facilitate a conversational environment where analysts can inquire about dashboard tiles in real time, making data exploration more dynamic and engaging.
Example Configuration
Use Case: AI-Powered Summaries for Executive Reports
For an executive dashboard with various performance metrics:
{
"dashboardTitle": "2023 Q3 Performance Overview",
"dashboardOverview": "Summarizes key performance indicators and trends.",
"tiles": [
{
"title": "Sales Performance",
"config": {
"visualizationType": "bar",
"data": [
{ "month": "July", "sales": 1000 },
{ "month": "August", "sales": 1200 },
{ "month": "September", "sales": 1500 }
]
}
},
{
"title": "Customer Feedback",
"config": {
"visualizationType": "line",
"data": [
{ "week": 1, "feedback": 80 },
{ "week": 2, "feedback": 90 },
{ "week": 3, "feedback": 85 }
]
}
}
]
}In this configuration, the AI would analyze the combined data from both tiles—providing an executive with trends on sales performance and customer feedback in a synthesized report format.