Skip to main content

Posts

Showing posts from 2024

Learn to Call Your Custom Function Using Semantic Kernel

In this tutorial, we will dive into the fascinating world of Semantic Kernel and explore how to seamlessly integrate our custom functions into AI applications. Whether you’re a developer, data scientist, or just curious about the intersection of language models and native code, this tutorial is for you! 📌 Key Points Covered: Why Create Functions for Your AI?  Large language models excel at generating text, but there are tasks they can’t handle alone. I'll discuss scenarios where native functions shine, such as retrieving data from external sources, performing complex math, and interacting with the real world. Creating Your Native Functions: Set up a new folder for your plugins Dive into the creation of your own plugin to demonstrate the required operations Implement functions as required Running Your Native Functions: I'll also highlight, how  Semantic Kernel utilizes  KernelFunctions to invoke our custom functions. 🎥  Watch the Full Tutorial: Shweta Lodha 

CustomGPT.ai: Unleashing the Power of Customized AI Assistants

Today everyone is living in an era of AI, whether it is a professional, student, home maker or a businessperson. Everyone is looking for a personal chatbot kind of solution which can fulfill their everyday need.  Just think of some scenarios like, Imagine an online store where an AI Assistant knows exactly what customers need, even before they do. Imagine an AI Assistant that assists with updating website content, ensuring a great user experience. These are just few examples. But the thing, which is common among all these is, everyone needs a trusted AI Assistant. Keeping all this in mind, CustomGPT.ai created an AI Assistant, which has following capabilities: Provides no code solution Provides API for customization Provides accurate responses No hallucination at all Takes care of data privacy and regulatory concerns If you're also excited to meet such an amazing assistant, then what are you waiting for?  Special offer for my followers  🤩 Get 1-month of free subscription of Custom

How To Handle Large Response From An API In Python

Handling large responses from APIs in Python can be challenging, especially when dealing with substantial amounts of data. Here are some strategies to efficiently manage such scenarios: Pagination If the API supports it, use pagination to retrieve data in smaller chunks. Fetch a limited number of records per request, and then iterate through subsequent pages. This approach prevents overwhelming your system with a massive response all at once. import requests def fetch_data_from_api ( url , page_size = 50 ):     all_data = []     page = 1     while True :         response = requests . get ( url , params ={ " page " : page , " per_page " : page_size })         if not response . ok :             break         data = response . json ()         all_data . extend ( data )         page += 1     return all_data # Example usage: api_url = " https://spmeapi.abc.com/invoices " result = fetch_data_from_api ( api_url ) print ( result ) Asynchro

Tips To Improve LLM-Based Applications

Large Language Models (LLMs) are powerful AI systems that can understand and generate natural language. They have many applications in various domains, such as natural language processing, machine translation, and healthcare. However, building LLM-based applications is not a trivial task. It requires careful consideration of several factors, such as the choice of the LLM, the data quality, the evaluation metrics, and the ethical implications.  In this blog post, I will share some tips to solve most common problems. How to extract correct content from LLM Problem says that, although the answer is present in the content, but model fails to extract that.  Here are the quick tips to resolve this problem: Prompt compression Remove irrelevant data Rectify typos and grammatical errors Remove duplicate data Use data cleaning libraries Problem of missing top ranked documents Problem states that correct document was not rankled while ranking the documents. Here are the few suggestions, which can

How To Hide Sensitive Data Before Passing To LLM-OpenAI

In my previous article “ Passing An Audio File To LLM ”, I explained how one can pass an audio file to LLM. In continuation to that, I’m extending this article by adding more value to it by addressing the use case of sensitive information. Let’s say, an audio file contains information about your bank account number, your secure id, your pin, your passcode, your date of birth, or any such information which has to be kept secured. You will find this kind of information if you are dealing with customer facing audio calls, specifically in finance sector. As these details, which are also known as PII (Personal Identifiable Information), are very sensitive and it is not at all safe to keep them only on any server. Hence, one should be very careful while dealing with such kind of data. Now, when it comes to using PII with generative AI based application, we need a way wherein we can just remove such information from data before passing that to LLM and that’s what this article is all about. In