Skip to main content

Posts

Showing posts with the label AI

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

Get Answers From Audio Without Listening

In this article, I’ll explain about how we can pass an audio file to LLM and I’m taking OpenAI as our LLM . There are many people who prefer audio and video tutorials over reading along with our podcast lovers as listening seems to be more effective for them as compared to reading a book, an e-book or an article, and it is quite common that after a certain period of time, we may forget some of the portions of our tutorial. Now, in order to get the insights again, re-watching or re-listening is the only option, which could be very time-consuming. So, the best solution is to come up with a small AI-based application by writing just a few lines of code which can analyze the audio and respond to all the questions that are asked by the user. Here, utilizing generative AI could be the best option, but the problem is, we can’t pass audio directly as it is text-based. Let’s deep dive into this article, to understand how we can make this work in a step-by-step fashion. If this is what that int

Integrating ChatGPT With Google Docs

In this article, I’ll explain how you can integrate ChatGPT inside Google docs and utilize the capabilities of any text based OpenAI model of your choice. If you are not aware what Google docs is — it is an offering by Google, where in you can create and collaborate documents online. Setting Up Google Docs You can go to https://docs.google.com/, login with your Gmail id and you are all set. If you have already created any document, you can open that otherwise you can go ahead and open a new document. New document will look something like this: In the above window, click on Extensions button and select Apps Script: On click of Apps Script will open up an editor wherein we will write our code. If you're looking for complete source code and explanation, then feel free to check out my article on Medium . Alternatively you can watch the video here .

Tips To Get Started With Azure OpenAI

If you want to explore Azure OpenAI but not sure how to get started, then you are at the right place. I've created a video, which explains everything about get your journey started. Have a look:

Use Your Own Data To Get Response From GPT like ChatGPT | Python

In this article, I’ll show you how you can use your locally stored text files to get response using GPT-3 . You can ask questions and get response like ChatGPT . On technology front, we will be using: OpenAI  Langchain Python Input files You can take bunch of text files and store them in a directory on your local machine. I’ve grabbed input data from here and created 5 text files. My files are all about ‘ Cause And Effect Of Homelessness ’ and are placed in a directory named Store. Import Required Packages As we are using Python , let’s go ahead and import the required packages. If you do not have above packages installed on your machine, then please go ahead and install these packages before importing. Once required packages are imported, we need to get OpenAI API key. Get OpenAI API Key To get the OpenAI key, you need to go to https://openai.com/, login and then grab the keys using highlighted way: Once you got the key, set that inside an environment variable(I’m using Windows). Load

Perform Sentiment Analysis on Email Content & Create Plot - Azure Logic App & Text Analytics [AI]

This article talks about an end-to-end flow, wherein an email content having specific subject line will be read, email body would be analyzed using Azure Cognitive Services (Sentiment analysis), analysis results would be saved in Azure Table Storage and finally chart would be drawn in Excel. All these steps include no coding at all. You can watch out the complete recording of this flow on my YouTube channel named Shweta Lodha.

Creating And Training Custom ML Model to Read Sales Receipts Using AI-Powered Azure Form Recognizer

I n my previous  article, we saw how one can utilize a prebuilt model to read data from a sales receipt. In this article, we will learn to create our own ML model, train it, and then extract information from a sales receipt. Here custom model means a model which is completely tailored to meet a specific need or a use case. Steps involved To perform this end-to-end workflow, there are 4 major steps. Step 1 - Create Training Dataset For training a model we need at least 5 documents of the same type, which means if we are planning to analyze receipts, then we need at least 5 samples of the sales receipts. If we are planning to extract data from a business card, then we need to have at least 5 samples of a business card, and so on and these documents can be either text or handwritten. Step 2 - Upload Training Dataset Once the training documents are collected, we need to upload that to Azure Storage. To perform this step, one should have  Storage Account  created on the Azure portal and one

Extract Text from Sales Receipt using Pre-Built Model - Azure Form Recognizer

Nowadays, where almost everything is turning to online and virtual modes, a very common problem any organization is facing is the processing of receipts that were scanned and submitted electronically for reimbursement purposes.  Now for any claim or reimbursements to get clear, first those must reach to proper accounts department based on the organization and the sector, and one way to perform this activity is by manual intervention. A person or a team must go through all those digitally scanned receipts manually and filter them based on the departments or any other validation and eligibility criteria they may have. The situation becomes more tragic when the volume of such scanned receipts is too high. So, get rid of this manual effort, a lot many organizations have already opted for a solution that is AI-based, and lot many are in a process of doing so. Definitely, one can go for OCR, which is short for  O ptical  C haracter  R ecognization technologies to extract data but here the pr

Getting Started with Reading Text from an Image using Azure Cognitive Services

In this article, we will learn about how we can read or extract text from an image, irrespective of whether it is handwritten or printed. In order to read the text, two things come into the picture. The first one is  Computer Vision  and the second one is  NLP , which is short for Natural Language Processing. Computer vision helps us to read the text and then NLP is used to make sense of that identified text. In this article, I’ll mention specifically about text extraction part. How Computer Vision Performs Text Extraction To execute this text extraction task, Computer Vision provides us with two APIs: OCR API Read API OCR API,  works with many languages and is very well suited for relatively small text but if you have so much text in any image or say text-dominated image, then  Read API  is your option. OCR API  provides information in the form of Regions, Lines, and Words. The region in the given image is the area that contains the text. So, the output hierarchy would