Genertaive AI Guide | Presentation and Docuemnts

Generative AI Guide

Gen AI Guide Oveview

Generative AI learn from data and generate new trajectories of data. This capability make it useful for creative application. It also help in personalization

Generative AI Applications

Gen AI and Large Langauge Model can do many traditional data science tasks with ease e.g. sentiment analysis, text classification, summarization, SEO generatio. LLM can also understand code and generate code in may programming languages

Gen AI - Double Edge Sword

Challenges in GenAI

Gen AI data generation is uncontrolled. It raised many challenges. Output can be unnatural, unethical or even illigal.

Opportunities from GenAI

Ability to create new data make GenAI very powerful. It can create new design, personalized output. It can be useful in automation, drug discovery.

GenAI and LLM Updates

What is happening in Gen AI

How LLM are Evolving Every Month

Large Language Model Guide

LLM Overview

Understand and generate human language, performing tasks like writing different kinds of creative content, translating languages, and answering your questions in an informative way.

Multi Model LLM Overview

process and generate information beyond just text. They can handle data like images, audio, or even video, allowing them to understand the world in a more comprehensive way.

Foundation Model Guide

Foundation Model

Unlike traditional AI models trained for specific tasks, foundation models go through a general learning process. This allows them to be adapted to a wide range of tasks by "fine-tuning" them with additional focused training

Foundation Model Benfits

Their versatility is key, as a single foundation model can be fine-tuned for various tasks across different fields, from healthcare to manufacturing. This adaptability saves significant time and resources compared to training new models from scratch for each specific need. Additionally, the pre-training process imbues foundation models with a strong understanding of underlying patterns, leading to potentially more accurate results. This efficiency and potential for improved performance make foundation models a game-changer in accelerating AI development and innovation.

Foundation Model Selection Criteria

Foundation Model

. Here are factors what to consider:
Task Alignment: First and foremost, the model's capabilities should align with your desired outcome. Is it text generation, image recognition, or something else entirely?
Data Compatibility: Does the model understand the type of data you'll be feeding it, like text, code, or images?
Model Size and Performance: Larger models often perform better but require more resources to run. Consider the trade-off between accuracy and efficiency for your project.
Fine-tuning Potential: Does the model allow for further training on your specific data to enhance its performance for your unique use case?
Accessibility: Finally, consider factors like licensing costs and the ease of obtaining and using the model.

Foundation Model vs LLM Selection

Selecting a foundation model and selecting an LLM (Large Language Model) are closely related, but not exactly the same. Here's how they differ:
Focus: An LLM is a specific type of foundation model trained primarily on text data. So, all LLMs are foundation models, but not all foundation models are LLMs. Foundation models can also be trained on other data types like images or code.
Application: When you choose an LLM, you're essentially selecting a pre-built model for tasks involving understanding and generating text. Foundation models, on the other hand, offer a broader range of potential applications depending on the data they're trained on. You might choose a foundation model for tasks like image recognition or code generation, areas where an LLM wouldn't be ideal.

Foundation Model Vendors

Open AI

The OpenAI API provides access to powerful large language models like GPT known for their impressive text generation and translation capabilities. It offers a pay-as-you-go pricing structure, making it a good option for exploring LLM functionalities or for projects with specific needs. In recent versions, OpenAI has demonstrated great capabilities on multi model.

Google Gemini

Gemini API, on the other hand, is Google's offering in the LLM arena. It boasts similar text-based functionalities as OpenAI, but also holds potential for future development beyond text. Currently in free access with usage limits, Gemini allows experimenting and building various applications like chatbots or creative tools. Its ability to integrate with other Google Cloud services might be an advantage for projects within the Google ecosystem.

Prompt Engineering

Prompt Engineering

Prompts enable you to guide genAI model to produce outcome in required format. Prompt help GenAI to break a complex problem into smaller task and enable reasoning

Prompt Templates

Use a prompt template for consistency. Replace the placeholder element in prompt templates. Save time and effort by reducing the need to write multiple similar prompts.



Prompts enable you to guide genAI model to produce outcome in required format. Prompt help GenAI to break a complex problem into smaller task and enable reasoning

Prompt Templates

Use a prompt template for consistency. Replace the placeholder element in prompt templates. Save time and effort by reducing the need to write multiple similar prompts.

Fine-tuning a Foundation model

When to Fine-tune

Medical Diagnostics
Legal Document Analysis
Customer Service Chatbots
Financial Market Analysis

when Fine-tuning not needed

General Knowledge Queries
Content Generation for Broad Audiences
Proof of Concept
Educational Tools

Guardrails for Gen AI

Generative AI Guardrails

Generative AI guardrails are a set of rules and limitations designed to keep AI outputs safe and aligned with ethical principles. This includes filtering harmful content, preventing bias, and safeguarding against the misuse of sensitive information.

LLM Guardrails

LLM guardrails, a specific type of generative AI guardrail, focus on large language models (LLMs) � AI systems that generate text, translate languages, and write different kinds of creative content. LLM guardrails address unique challenges like prompt injection vulnerabilities, where malicious prompts can trick the LLM into revealing sensitive data.

GenAI Security Enablement

Gen AI : Attack Surface

The very power of Generative AI (GenAI) introduces new attack surfaces that require vigilance. These vulnerabilities stem from GenAI's ability to process and generate data, making it susceptible to manipulation. Malicious actors could exploit this in several ways:
Poisoning the Data Well: Training data with biased or inaccurate information can lead to biased or misleading outputs from the GenAI model. This could be used to generate fake news or manipulate public opinion.
Crafting Malicious Prompts: GenAI models rely on prompts to guide their outputs. Crafting prompts specifically designed to deceive the model could lead to the generation of harmful content like phishing emails or deepfakes.
Model Hijacking: If security measures are lax, attackers could potentially gain access and manipulate a GenAI model itself, causing it to generate harmful outputs or leak sensitive information.

Action Plan to Secure Gen AI

Secure Data: Mitigate the risk of biased or poisoned data by implementing data quality checks, cleaning processes, and responsible sourcing practices. Anonymize sensitive information before feeding it into GenAI models.
Secure Model: Employ robust access controls to restrict unauthorized access to GenAI models. Regularly monitor model behavior to detect potential manipulation or drift in outputs. Consider explainability techniques to understand how the model arrives at its results.
Secure Infrastructure: Utilize secure cloud environments or on-premise hardware with proper security configurations to host GenAI models. Implement intrusion detection and prevention systems to safeguard against cyberattacks.
Other Considerations: Regularly assess and update security measures as the GenAI landscape evolves. Foster a culture of security awareness within your organization, educating employees on responsible GenAI usage and potential risks.

Gen AI Enablement Framework

Structured Framework

The GenAI Enablement Framework provides a structured approach to navigate the adoption of Generative AI (GenAI) within your organization. This framework outlines key guidelines to ensure a smooth integration process.
Structure: It defines a step-by-step approach, beginning with assessing your current capabilities and identifying potential use cases. The framework then guides you through data preparation, model selection, and integration with existing workflows.
Guidelines: These guidelines address potential risks and challenges associated with GenAI adoption. Risks may include bias in model outputs or security concerns. The framework suggests mitigation strategies and best practices to address these risks.
Challenges: The framework acknowledges the challenges of adopting a new technology, such as the need for specialized expertise or potential changes to existing workflows. It offers guidance on overcoming these challenges, such as training programs or resource allocation strategies.
Cost and Benefit: A crucial aspect of the framework is a cost-benefit analysis. It helps you assess the investment required in infrastructure, training, and potential ongoing maintenance against the anticipated benefits of GenAI adoption. This analysis can include potential cost savings through automation or increased revenue generation through new product or service offerings enabled by GenAI.

Stages and Steps

The GenAI Enablement Framework outlines a staged approach to GenAI adoption, guiding you from initial exploration to full-scale integration.
Proof of Concept (PoC): This initial stage focuses on experimenting with GenAI capabilities. You'll test different models on specific use cases to assess their suitability and potential value.
Tactical Implementation: Once a PoC proves successful, you move to tactical implementation. Here, you deploy GenAI for targeted tasks within specific departments, automating processes or augmenting human capabilities.
Well-governed Integration: As GenAI becomes more ingrained, this stage emphasizes establishing governance practices. You'll define guidelines for responsible use, addressing issues like bias and data security.
Strategic Expansion: With a well-governed foundation in place, you can strategically expand GenAI use across the organization. This involves identifying new use cases and integrating GenAI into core workflows for broader impact.
Transformational Impact: In the final stage, GenAI becomes a transformative force. You'll leverage its capabilities to fundamentally change how your organization operates, potentially creating new business models or disrupting your industry.

How to Build AI Assistants

Determine Features Needed

Deteremine whether you want assistant to do simple search e.g. travel, provide answer with reasoning. Determine whether you want to provide personalized recommendation e.g meal plan based on height, weight and preferences. In some cases Assitant may need to provide advnce pplan e.g financial plan based on logn term goal. More advance AI Assistant/Agent not only will plan but execute tasks e.g. build webpages suitable for my business and add it to websites and promote these.


You can build AI Assistant and all features you need or you can use Dataknobs Kreatebots to get featues and add custom capabilities you need. Dataknobs Kreatebots platform can help you build AI assistant 1) Wrapper on Open AI/Gemini 2)Add personalization 3) Add vector DB and Rag 4) Use fine tune model 5) Add function calling with langchain and other frameworks. Some features are standard e.g. Moderation, Prompt Injection checking, chatbot history, feedback collection.

How to Evaluate GenAI and AI Assistants

Evaluate Gen AI

Use variety of metrics - task completion, effort saved, user satisfaction in addition to technical metrics for Gen AI.

Evaluate AI Assistant

For AI Assistant, evaluate each response to ensure AI assistant is giving relevant responses for question and context.

Digital Human vs AI Assistants

Digital Human

Existence: Purely digital, existing in virtual environments.
Appearance: Highly realistic or semi-realistic .
Interaction: Can communicate through text, voice, and non-verbal cues (facial expressions, gestures).
Capabilities: Primarily focused on communication, social interaction, .
Mobility: Lack physical presence or mobility .

AI Assistant

Functionality: Primarily task-oriented, .
Interaction: Interaction is typically through text or voice commands.
Appearance: AI-assistants usually do not have a visual representation.
Context Awareness: Usually lack deep emotional intelligence or advanced social interaction skills.
Examples: Siri, Alexa, Google Assistant, Cortana.

Dataknobs - Kreate, Kontrols and Konbs

KREATE - Content, Website and AI Assitant

Combining a knowledge base, website, and AI assistant from the same provider offers a significant advantage: centralized content management. Imagine all your information residing in one place, easily accessible for updates. This streamlined approach ensures the website and AI assistant always pull from the most recent knowledge base content. You'll avoid inconsistencies and streamline the process of keeping everything up-to-date.

Co-pilot for Building AI Assistant

Kreatebots acts as your co-pilot in building AI assistants, simplifying the process even for those without coding experience. It streamlines development by generating basic AI assistants from your existing data and content. Kreatebots assists in building a Retrieval-Augmented Generation (RAG) model, the core of your assistant's understanding, and even helps fine-tune a pre-trained model for optimal performance. Beyond that, Kreatebots handles the heavy lifting of assembling the front-end user interface, back-end logic, and the API that connects everything together � essentially providing a one-stop shop for crafting your own AI assistant.