microsoft / AI-Chat-App-Hack

HackTogether: The Microsoft Python Chatbot Hack | Register, Hack, Win

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project: SecureBot - your cybersecurity helper

Diego0106 opened this issue · comments

Project name

SecureBot

Description

SecureBot

SecureBot Logo (1)

This innovative solution is crafted using Microsoft Copilot Studio, integrating Power Platform components and Azure Functions to harness Python's versatility for dynamic code execution. At its core, SecureBot specializes in cybersecurity, offering real-time insights and answers drawn from an extensive knowledge base of over 80 documents, including podcasts, videos, websites, and books.

Utilizing Azure Cognitive Search, SecureBot excels in retrieving precise information, ensuring users have access to the latest and most relevant cybersecurity advice and data. Whether you're a professional in the field, a student learning about cybersecurity, or simply curious, SecureBot is designed to assist you with accurate information retrieval, leveraging AI to navigate through a vast array of resources efficiently.

SecureBot’s purpose is to empower users—whether professionals, students, or the curious—with accurate and up-to-date cybersecurity insights, all while navigating through a vast array of resources efficiently. 🛡️🔍🤖

RAG improvements for Spanish data

search_client = SearchClient(vector_store_address, index_name, AzureKeyCredential(vector_store_password)) r = search_client.search(search_text=query_text, query_language="es-es", vector=compute_embedding(query_text), select=["content", "sourcefile"], top_k=3, vector_fields="embedding", search_mode="all")

This code snippet contributes to enhancing search results in Spanish by leveraging Azure Cognitive Search in conjunction with a hybrid search approach. Initially, a search client is created, configuring it to access the vector store and index specified. Subsequently, a search query is executed, where the query_text parameter is set to Spanish ("es-es"), indicating the language of the query. Additionally, the vector parameter incorporates computed embedding vectors, which capture the semantic meaning of the query text, thus improving the relevance of search results. By utilizing a hybrid method that combines traditional text-based search with semantic understanding through embedding vectors, the search algorithm can deliver more accurate and contextually relevant results, particularly beneficial when dealing with Spanish language queries where semantic nuances play a crucial role in search relevance.

To obtain answers in English, I used prompting techniques so that the model gave me answers in the language that the user was speaking. This is done automatically in the azure function triggered by a power automate flow that translates the question into Spanish using Azure AI translator.

Architecture

Architecture

SecureBot leverages Microsoft Copilot Studio, integrating Power Platform components and Azure Functions. These components work in harmony to provide real-time insights and answers from an extensive knowledge base of over 80 documents, including podcasts, videos, websites, and books. The architecture includes:

Copilot Studio: The development environment where SecureBot is crafted.
Power Automate: Integrated with Copilot Studio for automation workflows and trigger Azure functions and APIS.
Azure Functions: The dynamic code execution engine.
Python: Used for its versatility in SecureBot’s code execution.
Azure Translator Service: Allow language translation.
Azure Cognitive Search: The powerhouse for precise information retrieval.
Blob Storage: Stores data, including content like PDFs and videos.

How does RAG work?

A RAG bot is short for Retrieval-Augmented Generation. This means that we are going to "augment" the knowledge of our LLM with new information that we are going to pass in our prompt. We first vectorize all the text that we want to use as "augmented knowledge" and then look through the vectorized text to find the most similar text to our prompt. We then pass this text to our LLM as a prefix.

RAG

Extra features

analyzeip

SecureBot also allows you to analyze the risks of an IP using APIs to collect information and analyze it with Azure OpenAI.

Power Automate Flows

Flow to Retrival infromation Azure function and translate question in English with azure Translator.
PA_FlowRetrival

Flow to Analyze Ip in azure function
PA_FlowAnalyzeIP

Note
I submitted my project but when I saw the broadcast it did not appear, so I am submitting it again with my other github account

Submit

I registered with the email diegoandres9801@outlook.com

Language

English, Spanish

Project Repository URL

https://github.com/Diego0106/SecureBot

Deployed Endpoint URL

https://web.powerva.microsoft.com/environments/Default-24884996-6863-4925-a1ba-f1a160b581e2/bots/cr794_ciberseguridad/canvas?__version__=2

Project video

https://beducacion-my.sharepoint.com/:v:/g/personal/diego_ramos_grupobusiness_it/EVKWE4nlk79GqMhxyIcV2P4B-_Qjjzqphk_Z3U1iyBeC8Q?e=ptYQvt

Team members

Diego0106

Showcase Consent

Yes