Icon

02. GenAI_​Deployment_​Exercise

GenAI Learnathon: Enrich Data Analytics with GenAI

During this hands-on learnathon, you will get familiar with the free low-code tool KNIME Analytics Platform, techniques for fraud detection, and the use of GenAI via the KNIME AI Extension (Labs).

Without any coding experience you will learn to:

* Detect frauds in investment contracts visually and using statistical techniques

* Prompt engineer an LLM via the OpenAI integration

* Create a vector store from a corpus of different types of investment contracts (the knowledge base)

* Build and deploy a data app to display email alerts and make it available to authenticated users on a web browser

Other KNIME AI integrations we will discuss include GPT4All, Hugging Face, Chroma, FAISS and more.

URL: KNIME AI Extension (Labs) https://hub.knime.com/knime/extensions/org.knime.python.features.llm/latest/
URL: KNIME for Generative AI https://hub.knime.com/knime/collections/KNIME%20for%20Generative%20AI~D4ckx2q_J5FPBQXu

E) Deploy Fraud Detection with GenAI Alert on KNIME Business Hub

Step 1: Apply fraud detection on new contract data

Search, drag and drop a Model Reader and a Numeric Outliers (Apply) to read the outlier_detection.model.
This will apply the same outlier detection from the training in Part B on new contract data (Part B is included in the workflow GenAI Learnathon_Solution Workshop 1).

Step 2: Apply vector store on newly detected frauds to get context

Search, drag and drop a Model Reader and a Vector Store Retriever to read the vector_store.model.
This will apply the same vector store from Part D on new frauds (Part D is included in the workflow GenAI Learnathon_Solution Workshop 1).
Use the contract "type" to retrieve the relevant documents from the vector store. Make sure to have a flow variable connection between the Get API Key component and the Vector Store Retriever node.

Step 3: Apply prompt engineering and the LLM to perform RAG and generate new frauds email alerts

Use a String Manipulation to structure a prompt to create an email alert for each of the contracts. Have a look at the Hint for prompt engineering metanode.

Input the prompts to the LLM Prompter and pass the generated alerts to the component to visualize them.

Step 4: Deploy to KNIME Business Hub the resulting Data App

Upload this workflow and the folder "models" to a KNIME Hub team with an execution context and perform an ad-hoc execution. Make sure to reset the workflow when uploading.

Value Lookup
visualize & downloademail alerts
Email Preview
DB Table Selector
Double-click to configure
Get API Key
Extract Contract Data
SQLite Connector
OpenAI LLM Connector
PDF Parser
DB Reader
double-click to open
Hint for prompt engineering
OpenAI Authenticator

Nodes

Extensions

Links