TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

GenAI with Python: RAG with LLM (Complete Tutorial)

Build your own ChatGPT with multimodal data and run it on your laptop without GPU

Mauro Di Pietro
TDS Archive
Published in
12 min readJun 28, 2024

--

In this article, I will show how to build a simple AI that can effectively learn knowledge from your personal documents and answer questions.

Photo by Eric Krull on Unsplash

Intro

Natural Language Processing (NLP) is the field of Artificial Intelligence that studies the interaction between machines and human language. The peak of NLP, so far, has been the arrival of Large Language Models (LLM), trained on enormous amounts of text data, able to learn language patterns and variations. The term “Language Model” became common with the rise of Deep Learning and Neural Networks. In particular in 2018, when Google introduced the Transformer-based architecture, which significantly improved the performance of NLP models (Goolge’s BERT and OpenAI’s GPT).

Today, LLMs are typically used for Text-to-Text tasks or “Text Generation” (i.e. translation, summarization, chatbots and virtual assistants, or even writing entire books). Thanks to that, we have witnessed the rise of Generative Artificial Intelligence (GenAI), which is the field of the industry that focuses on creating new content (i.e. text, images, audio, video).

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Mauro Di Pietro
Mauro Di Pietro

Responses (17)