Skip to main content

Posts

AI Prompt To Create A Poll: Revolutionizing Engagement

In the digital age, engagement is key. Whether you’re a business owner, a content creator, or a thought leader, understanding your audience is crucial. One of the most effective ways to do this is through polls. But how can you create a poll that not only engages your audience but also provides valuable insights? Enter AI . The Power of AI Artificial Intelligence (AI) has been a game-changer in many industries, and it’s now making its mark in the realm of audience engagement. With AI , you can generate prompts to create polls that are tailored to your audience and the topic at hand. This not only increases engagement but also makes the responses more insightful. How Does It Work? The AI takes into account the current hot topics in your industry and formulates a poll question around them. It also provides a concise introduction highlighting the topic’s relevance and its potential implications for the industry. The AI encourages engagement by posing insightful questions related to the tr...

How To Chat With Multiple CSV Files Together - Azure OpenAI + LangChain

When dealing with multiple CSV files having different columns, it’s essential to have an efficient method for querying and extracting relevant information. Azure OpenAI and LangChain provide a robust combination for handling such scenarios.  In this article, we’ll explore how to load multiple CSV files, process them, and ask questions across all of them. Let’s get started by installing the required packages. Install Required Packages Here are the ones which you need to install: ! pip install openai ! pip install langchain ! pip install pandas ! pip install langchain_experimental ! pip install langchain_openai ! pip install tabulate Import Required Packages Here are the packages which we need to import to get started: from langchain_openai import AzureOpenAI from langchain_experimental.agents import create_csv_agent Read Configuration First of all, we need to set few variables with information from Azure portal and Azure OpenAI Studio : api_type = "azure" api_base = ...

Functions And Plugins In Semantic Kernel

It's been a while since Semantic Kernel is around and in the last few months, a lot of many things have changed, specifically from the implementation point of view. Hence, I thought of summarize the key functions to help you understand better, which are also listed in Evan's blog.. As of today, there are 3 different ways to add plugins into the Semantic Kernel. Here are those: From a directory: Need to provide parent_directory and plugin_name  Using KernelPlugin instance  Using KernelFunction: Need to create a custom class or a dictionary where methods are decorated with kernel_function Similarly, there are few different ways to add functions in Semantic Kernel: KernelFunction.from_prompt a.k.a KernelFunctionFromPrompt(function_name, plugin_name, description, prompt, template_format, prompt_template, prompt_template_config, prompt_execution_settings)  KernelFunctionFromPrompt.from_yaml(yaml_str, plugin_name (optional)) KernelFunctionFromPrompt.from_directory(path, plugin_...

Generate The Streamed Response Using Semantic Kernel

Semantic Kernel , a powerful tool for integrating large language models into your applications, now supports streaming responses. In this blog post, we’ll explore how to leverage this feature to obtain streamed results from LLMs like AzureOpenAI and OpenAI. Why Streamed Responses Matter When working with language models, especially in conversational scenarios, streaming responses offer several advantages: Real-time Interaction: Streaming allows you to receive partial responses as they become available, enabling more interactive and dynamic conversations. Reduced Latency: Instead of waiting for the entire response, you can start processing and displaying content incrementally, reducing overall latency. Efficient Resource Usage: Streaming conserves memory and resources by handling data in smaller chunks. How to Use Streaming Responses I've published a complete video on how to generate this using Python and that can be found on my YouTube channel named Shweta Lodha . Here, I'm jus...

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...

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_...