Question Answering with YouTube Videos Using RAG in LangChain
DaniWeb Forums » Computer Science
by usmanmalik57
5d ago
In previous articles, I explained how to use natural language to interact with PDF documents and SQL databases, using the Python LangChain module and OpenAI API. In this article, you will learn how to use LangChain and OpenAI API to create a question-answering application that allows you to retrieve information from YouTube videos. So, let's begin without ado. Importing and Installing Required Libraries Before diving into the code, let's set up our environment with the necessary libraries. We will use the Langchain module to access the vector databases and execute queries on large language mod ..read more
Visit website
Using Natural Language to Query SQL Databases with Python LangChain Module
DaniWeb Forums » Computer Science
by usmanmalik57
1w ago
The advent of large language models (LLM) has replaced complex scripts with natural language for automating various tasks. You can now use LLM to interact with your databases using natural language, which makes life easier for people who do not have sufficient SQL knowledge. In this article, you will learn how to retrieve information from SQL databases using natural language. For this purpose, you will use the Python LangChain library. The LangChain agents convert natural language questions into SQL queries and return the response in natural language. Using natural language queries, you will l ..read more
Visit website
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
DaniWeb Forums » Computer Science
by usmanmalik57
3w ago
In my previous article, I explained how I developed a simple chatbot using LangChain and Chat-GPT that can answer queries related to Paris Olympics ticket prices. However, one major drawback with that chatbot is that it can only generate a single response based on user queries. It can not answer follow-up questions. In short, the chatbot has no memory where it can store previous conversations and answer questions based on the information in the past conversation. In this article, I will explain how to add memory to this chatbot and execute conversations where the chatbot can respond to queries ..read more
Visit website
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
DaniWeb Forums » Computer Science
by usmanmalik57
3w ago
I was searching for Paris Olympics ticket prices for tennis games recently. The official website directs you to a PDF document containing ticket prices and venues for all the games. However, I found the PDF document to be very hard to navigate. To make things easier, I developed a chatbot to search this PDF document and answer my queries in natural language. And this is what I am going to share in this article. I used the OpenAI API to create document embeddings (convert documents to numeric values) and the Python LangChain library as the orchestration framework to develop this chatbot. So, le ..read more
Visit website
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
DaniWeb Forums » Computer Science
by usmanmalik57
1M ago
On March 4, 2024, Anthropic launched the Claude 3 family of large language models. Anthropic claimed that its Claude 3 Opus model outperforms GPT-4 on various benchmarks. Intrigued by Anthropic's claim, I performed a simple test to compare the performances of Claude 3 Opus, Google Gemini Pro, and OpenAI's GPT-4 for zero-shot text classification. This article explains the experiment and the results obtained, along with my personal observations. Note: I have already compared the performance of Google Gemini Pro and Chat-GPT on another dataset, in one of my previous articles. This article adds Cl ..read more
Visit website
7 NLP Tasks to Perform for Free in Python with Mistral 7b LLM
DaniWeb Forums » Computer Science
by usmanmalik57
1M ago
In the rapidly evolving field of Natural Language Processing (NLP), open-source large language models (LLMs) are becoming increasingly popular as they are free to use. Among these, the Mistral family of models stands out as a state-of-the-art model that is freely accessible to the public. Comparable in performance to the renowned GPT 3.5, Mistral 7b enables users to perform various NLP tasks, such as text generation, text classification, and more, without any cost. While GPT 3.5 can be used for free in a browser, utilizing its functions in a Python application via OpenAI API incurs charges. Th ..read more
Visit website
Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace
DaniWeb Forums » Computer Science
by usmanmalik57
1M ago
In a previous article, I explained how to fine-tune Google's Gemma model for text classification. In this article, I will explain how you can improve performance of a pretrained large language model (LLM) using retrieval augmented generation (RAG) technique. So, let's begin without ado. What is Retrieval Augmented Generation (RAG) Retrieval Augmented Generation (RAG) enhances a language model's knowledge by integrating external information into the response generation process. By dynamically pulling relevant information from a vast corpus of data, RAG enables models to produce more informed, a ..read more
Visit website
Fine Tuning Google Gemma Model for Text Classification in Python
DaniWeb Forums » Computer Science
by usmanmalik57
1M ago
On February 21, 2024, Google released Gemma, a family of state-of-the-art open-source large language models (LLMs). As per initial results, its 7b (seven billion parameter) version is known to perform better than Meta's Llama 2, the previous state-of-the-art open-source LLM. As always, my first test with any new open-source LLM is the text classification task. In this tutorial, I will show you how you can fine-tune the Google Gemma LLM for text classification tasks in Python. So, let's begin without ado. Installing and Importing Required Libraries The following script installs libraries requir ..read more
Visit website
Extract Tabular Data from PDF Images using Hugging Face Table Transformer
DaniWeb Forums » Computer Science
by usmanmalik57
1M ago
In a previous article, I explained how to extract tabular data from PDF image documents using Multimodal Google Gemini Pro. However, there are a couple of disadvantages with Google Gemini Pro. First, Google Gemini Pro is not free, and second, it needs complex prompt engineering to retrieve table, columns, and row pixel coordinates. To solve the problems above, in this article, you will see how to extract tables from PDF image documents using Microsoft's Table Transformer from the Hugging Face library. You will see how to detect tables, rows, and columns within a table, extract cell values from ..read more
Visit website
How can I better use C++and data structures and algorithms
DaniWeb Forums » Computer Science
by learnerya
1M ago
I am a first-year university student from China. My major is Computer Science and Technology. I have been self-learning C++and data structures and algorithms recently. May I ask how I can learn them well? Is anyone interested in being my teacher or learning with friends? (Machine translation, my English is not very good, I can understand some ..read more
Visit website

Follow DaniWeb Forums » Computer Science on FeedSpot

Continue with Google
Continue with Apple
OR