Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Program a RAG LLM Chat App with LangChain, Streamlit, OpenAI and Anthropic APIs

Автор: Enric Domingo - AI Engineering

Загружено: 2024-09-19

Просмотров: 13169

Описание:

Learn how to build and deploy a RAG web application using Python, Streamlit and LangChain, so multiple users can chat with Documents, Websites and other custom data online.

Code: https://github.com/enricd/rag_llm_app
Blog:   / program-a-rag-llm-chat-app-with-langchain-...  
The RAG LLM Streamlit App: https://rag-llm-app.streamlit.app/


In this RAG LLM course, we will learn how to develop a Retrieval Augmented Generation (RAG) pipeline step by step, and how to integrate it into a Chat Web App, in Python, using LangChain and Streamlit.

As you probably already know, LLMs are trained on large amounts of public data up to a certain date. Any fact that is either not public, newer, or quite niche is essentially unknown to them. Although newer models tend to be better at recalling facts that were in the training set, they are still far from perfect. This can be a limiting factor for many tasks that, for one reason or another, require an LLM that has to know specific topics very precisely.

RAG consists of providing a source of custom information to our LLM chat pipeline. Before sending any question to the model, we automatically provide the most relevant fragments of context extracted from this database, so the model has precise details in the context itself next to our question. In this way, the model knows very precisely what we are talking about, where the information comes from, and we can easily update that information with almost no cost or need for a GPU. We can use any already available LLM, like GPT-4o from the OpenAI API (now or soon even o1 and o1-mini!), Claude 3.5 from the Anthropic API, or even open-source ones with the original weights in a cheap and efficient way as we are already doing. If a better model appears tomorrow, we can integrate it almost immediately into our RAG pipeline and take advantage of it without having to fine-tune any LLM again.

In summary, this is an AI coding tutorial on how to use the LangChain chains create_history_aware_retriever and create_retrieval_chain, and also create_stuff_documents_chain to retrieve data from a Chorma DB Vector Store, where we would have stored our custom data embeddings using the OpenAI Embeddings model. This data would have been loaded with some different LangChain document loaders, and splitted using RecursiveCharacterTextSplitter. What's more, you will see how to make use of the OpenAI API and the Anthropic API, to make requests and get answers from their Large Language Models.

💡 Make sure to follow me on Medium, YouTube and GitHub as in the next blog and video we will see how to deploy this app into Azure, using GPT-4o and GPT-4o mini through Azure OpenAI Service and adding SSO Authentication in front of our app, so only authorized users under our Azure subscription (for example, your work colleagues) can access to our app, no one else will spend our resources or steal our data!

Sections:
00:00 - Intro
2:08 - What is RAG and why it's better than Fine Tuning
7:34 - RAG in Python with LangChain step by step
19:00 - Integrating RAG into an LLM Chat web app
37:20 - Deploy the RAG web app online for free!


Subscribe to see more AI and ML programming related content! 🚀🚀

-------------------------------------------------------------
Kaggle: https://www.kaggle.com/edomingo
GitHub: https://github.com/enricd
Twitter:   / mad_enrico  
Linkedin:   / e-domingo  
Medium:   / enricdomingo  
Web: https://enricdomingo.com


#gpt #gpt4o #gpt4 #openai #promptengineering #langchain #o1 #openaio1 #chatgpto1 #openaistrawbery #chatgpt #openaiapi #python #streamlit #github #cloud #portfolio #agent #gpt #aiagents #automation #ai #streamlit #llm #copilot #chatgpt4o #omnichat #omnidata #howtochatgpt #github #git #vscode #gui #pythongui #stream #modelstream #streaming #llmstream #llmstreaming #openaistream #openaistreaming #rag #retrievalaugmentedgeneration #langchainclaude #anthropiclangchain #llamaindex #ollama #llamacpp

Program a RAG LLM Chat App with LangChain, Streamlit, OpenAI and Anthropic APIs

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Claude 3.5 Sonnet API: Integrate The Best LLM into your App (Anthropic Python tutorial)

Claude 3.5 Sonnet API: Integrate The Best LLM into your App (Anthropic Python tutorial)

Deploy Python LLM Apps on Azure Web App (GPT-4o Azure OpenAI and SSO auth)

Deploy Python LLM Apps on Azure Web App (GPT-4o Azure OpenAI and SSO auth)

Превратите ЛЮБОЙ файл в знания LLM за СЕКУНДЫ

Превратите ЛЮБОЙ файл в знания LLM за СЕКУНДЫ

Экспресс-курс RAG для начинающих

Экспресс-курс RAG для начинающих

Новый поиск файлов Gemini просто вывел агентов RAG на новый уровень (в 10 раз дешевле)

Новый поиск файлов Gemini просто вывел агентов RAG на новый уровень (в 10 раз дешевле)

Появляется новый тип искусственного интеллекта, и он лучше, чем LLMS?

Появляется новый тип искусственного интеллекта, и он лучше, чем LLMS?

Все стратегии RAG объясняются за 13 минут (без лишних слов)

Все стратегии RAG объясняются за 13 минут (без лишних слов)

Запуск нейросетей локально. Генерируем - ВСЁ

Запуск нейросетей локально. Генерируем - ВСЁ

Gemini 3 ОБГОНЯЕТ всех! ПОЛНЫЙ ОБЗОР Nano Banana, Veo 3, Deep Research

Gemini 3 ОБГОНЯЕТ всех! ПОЛНЫЙ ОБЗОР Nano Banana, Veo 3, Deep Research

GraphRAG: союз графов знаний и RAG: Эмиль Эйфрем

GraphRAG: союз графов знаний и RAG: Эмиль Эйфрем

AI-БЛОГЕР БЕЗ ЛИМИТОВ: Мощнейшая связка n8n + Qdrant + RAG (Свой Сервер!)

AI-БЛОГЕР БЕЗ ЛИМИТОВ: Мощнейшая связка n8n + Qdrant + RAG (Свой Сервер!)

Почему MCP действительно важен | Модель контекстного протокола с Тимом Берглундом

Почему MCP действительно важен | Модель контекстного протокола с Тимом Берглундом

12-факторные агенты: модели надежных приложений LLM — Декс Хорти, HumanLayer

12-факторные агенты: модели надежных приложений LLM — Декс Хорти, HumanLayer

100% Local CAG with Qwen3, Ollama and LangChain - AI Chatbot for Your Private Documents

100% Local CAG with Qwen3, Ollama and LangChain - AI Chatbot for Your Private Documents

LangChain Explained in 10 Minutes (Components Breakdown + Build Your First AI Chatbot)

LangChain Explained in 10 Minutes (Components Breakdown + Build Your First AI Chatbot)

ХВАТИТ тратить деньги на новые ИИ-инструменты. Делайте ВМЕСТО ЭТОГО вот что

ХВАТИТ тратить деньги на новые ИИ-инструменты. Делайте ВМЕСТО ЭТОГО вот что

Что такое стек ИИ? Магистратура LLM, RAG и аппаратное обеспечение ИИ

Что такое стек ИИ? Магистратура LLM, RAG и аппаратное обеспечение ИИ

Как я учусь в 10 раз быстрее: Система с AI, Perplexity и NotebookLM

Как я учусь в 10 раз быстрее: Система с AI, Perplexity и NotebookLM

Cursor AI: полный гайд по вайб-кодингу (настройки, фишки, rules, MCP)

Cursor AI: полный гайд по вайб-кодингу (настройки, фишки, rules, MCP)

GraphRAG App Project using Neo4j, Langchain, GPT-4o, and Streamlit

GraphRAG App Project using Neo4j, Langchain, GPT-4o, and Streamlit

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]