Skip to content

A Jupyter Notebook Exercise for using Semantic Kernel with Function Calling and RAG in Python

License

Notifications You must be signed in to change notification settings

alonf/LocalModelPythonSemanticKernelExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Enhancing AI Capabilities with LLMs, RAG, and Semantic Kernel

Overview

This repository offers a comprehensive, hands-on exploration of advanced AI concepts, focusing on Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and the integration of Semantic Kernel (SK) Memory. This code can be executed in an isolated environment, sometimes required by organizations' IT departments.

Through structured exercises, developers will gain practical experience deploying local LLMs, implementing RAG for improved information retrieval, and utilizing SK Memory for efficient data management.

Objectives

By engaging with these exercises, you will:

  • Deploy Local LLMs: Learn to download, configure, and run LLama2 models in a local environment, enabling offline AI capabilities.
  • Implement RAG Techniques: Understand and apply RAG methodologies to enhance LLM responses by integrating external data sources.
  • Utilize Semantic Kernel Memory: Explore the functionalities of SK Memory to store, retrieve, and manage information effectively within AI applications.
  • Develop Custom AI Agents: Create agents capable of traversing file systems, summarizing content, and interacting with users based on dynamically retrieved data.

Exercises Overview

  1. Loading LLama2 and Running a Basic Prompt: Set up a local LLama2 model and execute simple queries to familiarize yourself with its operations.
  2. Implementing Manual RAG Retrieval: Use FAISS for document retrieval, creating and storing vector embeddings, and fetching relevant information based on user queries.
  3. Enhancing LLM Responses with Retrieved Data: Integrate retrieved knowledge into LLM prompts to provide contextually enriched responses.
  4. Using Semantic Kernel Memory for Retrieval: Store and access information using SK Memory, replacing manual retrieval methods with a more streamlined approach.
  5. Developing a File System Traversal Agent: Build an agent that scans the disk for text documents, generates summaries, stores them in memory, and facilitates user interaction with the summarized data.

Prerequisites

To complete these exercises, ensure you have the following:

  • Python Environment: Install Python 3.8 or higher.
  • Required Packages: Utilize the provided script to download all necessary dependencies and models.
  • Hardware Specifications: A machine with sufficient memory and processing power to handle LLM operations.

Getting Started

  1. Clone the Repository: Download the repository to your local machine using:
    git clone https://github.com/yourusername/yourrepository.git
  2. Install Dependencies: Navigate to the repository directory and execute the setup script to install all required packages and models.
  3. Launch Jupyter Notebook: Start Jupyter Notebook and open the provided .ipynb file to begin the exercises.

Learning Outcomes

Upon completing these exercises, you will have:

  • Gained hands-on experience with local deployment of LLMs.
  • Acquired skills in implementing RAG to enhance AI model responses.
  • Learned to manage and retrieve data efficiently using Semantic Kernel Memory.
  • Developed the ability to create AI agents that interact with file systems and process data dynamically.

Embark on this journey to elevate your AI development skills and harness the power of advanced language models combined with effective data retrieval and management techniques.

About

A Jupyter Notebook Exercise for using Semantic Kernel with Function Calling and RAG in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors