Introducing new OpenAI Plugins for Eventhouse (Preview)
We are excited to announce the release of two powerful AI plugins for Eventhouse: AI Embed Text Plugin and AI Chat Completion Prompt Plugin. These plugins are designed to enhance your data analysis capabilities and augment your workflows with OpenAI models, providing more granular control to power users who seek precision over model output or wish to fine-tune their workflows.
AI Embed Text Plugin
The ai_embeddings plugin allows embedding of text using language models, enabling various AI-related scenarios such as Retrieval Augmented Generation (RAG) applications and semantic search. The plugin uses Azure OpenAI embedding models and can be accessed using the user’s identity (impersonation).
This plugin is particularly useful for scenarios where you want to generate embeddings within Kusto Query Language (KQL) queries and utilize these embeddings to perform semantic searches, all within the Eventhouse context.
Example
The below query connects to OpenAI deployment of text-embedding-3-small model using ai_embeddings plugin and uses the generated embedding to search across the embeddings stored in Eventhouse using series_cosine_similarity function and returns the top 5 closest match.
let text = “animals that moo”;
let searched_text_embedding = toscalar(evaluate ai_embeddings(
text,
“https://myaccount.openai.azure.com/openai/deployments/text-embedding-3-small/
embeddings?api-version=2024-06-01;impersonate”));
//let searched_text_embedding=toscalar(az_openai_embedding_fl(text));
WikipediaEmbeddings25k
| extend similarity = series_cosine_similarity(searched_text_embedding, embedding_text)
| top 5 by similarity desc
| extend query = text
| project doc_title,doc_url, similarity
Output:
doc_title | doc_url | similarity |
Cattle | https://simple.wikipedia.org/wiki/Cattle | 0.81502092445794538 |
Bovid | https://simple.wikipedia.org/wiki/Bovid | 0.81323853841595239 |
Wildebeest | https://simple.wikipedia.org/wiki/Wildebeest | 0.801463472637917 |
Calf | https://simple.wikipedia.org/wiki/Calf | 0.80006018743212759 |
Moose | https://simple.wikipedia.org/wiki/Moose | 0.79986656871995843 |
You can learn more about Eventhouse vector database capabilities and semantic searches in the Empowering Real-Time Searches: Vector Similarity Search with Eventhouse blog post.
AI Chat Completion Prompt Plugin
The ai_chat_completion_prompt plugin leverages the power of GPT series and other OpenAI models to augment data analysis within the Eventhouse context.
Imagine you are a security analyst tasked with identifying malicious patterns in the logs you are analyzing. By utilizing the AI Chat Completion Prompt Plugin, you can significantly enhance your data analysis capabilities. This plugin allows you to:
- Generate Contextual Responses: Use OpenAI models to understand and interpret complex commands or decipher unknown traces within your logs.
- Automate Insights: Automatically generate insights and explanations for suspicious activities, helping you to quickly identify potential threats.
- Interactive Analysis: Engage in dynamic conversations with the AI to explore different aspects of the data, ask follow-up questions, and receive detailed responses that guide your investigation.
Example
For example, if you encounter an unfamiliar command in the logs, you can prompt the AI to explain its purpose and potential implications. This not only speeds up your analysis but also ensures a thorough understanding of the data, enabling you to make informed decisions and take appropriate actions.
let connection_string = “https://myaccount.openai.azure.com/openai/deployments/gpt4o/chat/completions?api-version=2024-06-01;impersonate”;
ProcessEvents
| take 1
| extend cmdln_with_timestamp = strcat(timestamp, ” :: “, process_commandline)
| order by timestamp asc
| summarize cmdlns_on_host = strcat_array(make_list(cmdln_with_timestamp), “\n”) by hostname
| project hostname, Prompt = strcat(“Give a human-readable overview of the activity on this host based on the following command lines:\n\n”, cmdlns_on_host)
| evaluate ai_chat_completion_prompt(Prompt, connection_string)
Output:
hostname | prompt | prompt_chat_completion |
EANA-DESKTOP | Give a human-readable overview of the activity on this host based on the following command lines:2022-01-04 05:00:01.070786 :: “C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe” –type=utility –utility-sub-type=chrome.mojom.UtilWin –lang=en-US | The activity log from the given timestamp shows that the Microsoft Edge Browser was in operation. The utility type is Chrome.Mojom.UtilWin, indicating that an Edge utility process was running – this type of process is often used for features like spell checking or GPU processing. Moreover, the language of the browser was set to English (US). Overall, it seems like a user was likely browsing the internet using Microsoft Edge at this time. |
Both the plugins are now available for Eventhouse and Azure Data Explorer. We are excited to see what you build with it. Submit your feedback on Fabric Ideas and join the conversation on the Fabric Community.
Learn more:
ai_embed_text plugin (Preview)
ai_chat_completion plugin (Preview)