Code with Irtiza
Code with Irtiza
  • 94
  • 816 529
Building LLM Chatbots | LangChain & Redis Memory
In this video we built a ChatGPT-like LLM chatbot backed by a locally hosted Redis instance as memory.
📕Blog: irtizahafiz.com
📩Newsletter: irtizahafiz.com/newsletter
0:00 Concepts
2:40 Code Deep Dive
9:33 Demo
12:15 Database Deep Dive
Переглядів: 106

Відео

Building LLM Chat Memory (SQLite Edition)
Переглядів 13614 днів тому
Building a working prototype of Chat Memory with a locally running SQLite database. 👋 Say hi to me at: irtizahafiz.com Documentation: python.langchain.com/docs/integrations/memory/sqlite/
Building LLM Chat Memory with LangChain
Переглядів 23621 день тому
A simple implementation of in-memory LLM memory with LangChain. 👋 Say hi to me at: irtizahafiz.com Documentation: langchain-ai.github.io/langgraph/concepts/memory/ 00:00 Intro 00:50 Concept 06:00 Start Coding 07:16 InMemory Data Structure 09:30 Wrapping Chain w/ Message History 11:23 Configurable Session ID 12:10 Live Demo
LLM Chatbot Memory Basics (LangChain 101)
Переглядів 290Місяць тому
In this video we built a ChatGPT-like bot to illustrate how Langchain handles the concept of memory. LangChain's Official Memory Guide: langchain-ai.github.io/langgraph/concepts/memory/ 👋 Say hi to me at: irtizahafiz.com 0:00 What we will build 0:30 ChatGPT w/o Memory Implementation 03:27 Memory Concept 06:00 ChatGPT w/ Memory Implementation 09:24 Live Demo 11:30 Next Up
Building A Simple Chain (LangChain 101)
Переглядів 300Місяць тому
Let's build a flexible chain that can be used with OpenAI, Claude, or any other LLM you choose. LangChain Concepts: python.langchain.com/docs/concepts/ LangChain Tutorials: python.langchain.com/docs/tutorials/ 👋 Say hi to me at: irtizahafiz.com 0:00 Benefits of LangChain 3:35 Starts Coding (Python) 12:40 Example 1 16:44 Example 2 19:00 Output Parser 21:00 Outro / Next Video Info
Umami | Self-Hosted Google Analytics Alternative for ReactJS/NextJS
Переглядів 1,1 тис.7 місяців тому
Learn how to self-host Umami using Docker and Nginx, as well as integrate it with your NextJS/ReactJS app. 🐰 Detailed Blog Post: irtizahafiz.com/blog/self-hosting-a-free-private-google-analytics-alternative? 00:00 Intro 05:40 System Architecture 08:00 Install Umami through Docker 10:00 Nginx config 13:40 ReactJS/NextJS Integration 15:40 Logging Custom Events 18:25 Summary 🌈 Website: irtizahafiz...
Using Nginx Web Server as a Reverse Proxy
Переглядів 1,4 тис.7 місяців тому
In this video, I use Nginx as a reverse proxy to host multiple web apps and docker containers in one single server. Through the reverse proxy, I route traffic to different ports based on the incoming request's subdomain. 00:00 Intro 00:28 Quick Demo 01:26 Illustration 02:54 Nginx Config for Domain-based routing 05:22 HTTPS vs HTTP Routing 07:45 Using Subdomains to host different apps in one ser...
Automate Motivation | Python, APIs, Cron Scheduling, Bash Scripts
Переглядів 3199 місяців тому
Create your own automated system that sends powerful motivational quotes to your inbox daily. 🥹 If you found this helpful, follow me online at irtiza.io 0:00 Environment setup 01:00 Core Python Logic 03:00 Email Template 04:50 Live Demo 05:50 Bash Script 08:09 Scheduling with Cron jobs #automation #python #pythonprogramming
Personal AI Assistant with Python FastAPI, ReactJS & GPT-3 | Demo
Переглядів 2,2 тис.Рік тому
Here's a demo of something I have been working on for the last few weeks. I plan on creating a video about it soon. For now, here's a Medium article on the proof-of-concept: medium.com/gitconnected/creating-your-own-ai-powered-second-brain-a-guide-with-python-and-chatgpt-f5547ef7e136 Here's the GitHub code: github.com/irtiza07/personal-assistant-ai-www I am also writing a detailed article on Me...
Optimize Your SQL Queries | Postgres Edition
Переглядів 16 тис.2 роки тому
Easy way you can analyze and optimize your SQL queries to get the best performance out of them. Reference: thoughtbot.com/blog/reading-an-explain-analyze-query-plan 🥹 If you found this helpful, follow me online here: ✍️ Blog irtizahafiz.medium.com 👨‍💻 Website irtizahafiz.com 📲 Instagram irtiza.hafiz 0:00 Agenda 01:15 Difference between EXPLAIN & EXPLAIN ANALYZE 02:35 How count of...
Relational Database Indexing | Simple, Compound, B-Trees
Переглядів 3,2 тис.2 роки тому
We take a closer look at database indexes in relational databases simple & compound indexes, if & when indexes are used, what data structures hold these indexes, and the drawbacks of having too many indexes. Notes & References: doc.clickup.com/45016410/d/h/1axtau-1702/a845ee8db2d5b2d 🥹 If you found this helpful, follow me online here: ✍️ Blog irtizahafiz.medium.com 👨‍💻 Website irtizahafiz.com 📲...
Window Aggregations | Stream Processing
Переглядів 3,2 тис.2 роки тому
One of the most common use cases of stream processors is aggregating different values based on time windows. Aggregations range from sum and average to max or min. Windows range from fixed interval windows to sliding windows and even more complex session-based ones. 🥹 If you found this helpful, follow me online here: ✍️ Blog irtizahafiz.medium.com 👨‍💻 Website irtizahafiz.com/ 📲 Instagram instag...
How to deal with late data | Event vs Processing Time | Stream Processing
Переглядів 3,8 тис.2 роки тому
What is Event Time? What is Processing Time? How can you process “late data”? 🥹 If you found this helpful, follow me online here: ✍️ Blog irtizahafiz.medium.com 👨‍💻 Website irtizahafiz.com 📲 Instagram irtiza.hafiz 00:00 Event Time vs Processing Time 03:55 Which one to use for computation? 05:30 How to deal with late data? 07:40 Watermarks #streamProcessing #flink #beam #kafka
Stream Processing 101 | Basics
Переглядів 11 тис.2 роки тому
Real-time processing of data using stream processors has become a fundamental part of any system design. Let’s discuss some of the use cases and complexities related to stream processing. We will also talk about Lambda architecture which is a system composed of both batch processing and stream processing. Notes: www.docdroid.net/TtAqw0t/youtube-stream-processing-101-pdf 🥹 If you found this help...
Kafka Delivery Semantics | At-Least-Once, At-Most-Once & Exactly-Once
Переглядів 7 тис.2 роки тому
Kafka gives you multiple delivery semantics to pick from at least once, at most once, and exactly once. Depending on your application, you have to choose the one that gives you the best performance. In this video, I go through all the options and their pros and cons to help you make the best decision for your unique application. Notes: [www.docdroid.net/qdvI8mA/kafka-delivery-semantics-pdf](www...
Design Navigation Systems like Google Maps, Uber & Doordash | System Design
Переглядів 8 тис.2 роки тому
Design Navigation Systems like Google Maps, Uber & Doordash | System Design
Design a Hotel Reservation System like Expedia & Kayak | System Design
Переглядів 27 тис.2 роки тому
Design a Hotel Reservation System like Expedia & Kayak | System Design
Realtime Advertisement Clicks Aggregator | System Design
Переглядів 22 тис.2 роки тому
Realtime Advertisement Clicks Aggregator | System Design
Design An Ecommerce Payment System | System Design
Переглядів 16 тис.2 роки тому
Design An Ecommerce Payment System | System Design
Introduction to Payment Systems | System Design
Переглядів 48 тис.2 роки тому
Introduction to Payment Systems | System Design
Design an Autocomplete System | System Design
Переглядів 9 тис.2 роки тому
Design an Autocomplete System | System Design
Find Nearby Friends | System Design
Переглядів 5 тис.2 роки тому
Find Nearby Friends | System Design
Leaderless Database Replication
Переглядів 2,6 тис.2 роки тому
Leaderless Database Replication
Leader Follower Database Replication
Переглядів 3,6 тис.2 роки тому
Leader Follower Database Replication
Database Replication Explained
Переглядів 4,7 тис.2 роки тому
Database Replication Explained
Design Proximity Services Like Yelp & Google Maps | System Design
Переглядів 11 тис.2 роки тому
Design Proximity Services Like Yelp & Google Maps | System Design
Row Oriented vs Column Oriented Databases | System Design
Переглядів 2,9 тис.2 роки тому
Row Oriented vs Column Oriented Databases | System Design
Design YouTube | System Design
Переглядів 6 тис.2 роки тому
Design UA-cam | System Design
Geohashing Algorithm | Proximity Search Based Applications | System Design
Переглядів 20 тис.2 роки тому
Geohashing Algorithm | Proximity Search Based Applications | System Design
Design Scalable News Feed System Similar to Instagram, Facebook & Twitter | System Design
Переглядів 26 тис.2 роки тому
Design Scalable News Feed System Similar to Instagram, Facebook & Twitter | System Design

КОМЕНТАРІ

  • @wgllgw
    @wgllgw 10 годин тому

    Very good video series, I love that you took time to illustrate the different examples. I have a question.. instead of creating different tables with the cluster key of ascending/descending order.. is it possible for cassandra to do SQL like queries where SELECT * FROM simple_temp_v2 ORDER BY time_created ASC Cheers

  • @priyantynurulfatimah6408
    @priyantynurulfatimah6408 2 дні тому

    Hi, so this is my JSON to create debezium connector but it returned error. Could you please help me troubleshoot? I am still learning and already look out for the solving but to no avail. Y^Y JSON: { "name": "source-transactions-connector", "config": { "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "plugin.name": "pgoutput", "database.hostname": "postgres", "database.port": "5432", "database.user": "etl", "database.password": "demopass", "database.dbname": "dvdrental", "database.server.name": "postgres", "key.converter.schemas.enable": "false", "value.converter.schemas.enable": "false", "transforms": "unwrap", "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState", "key.converter": "org.apache.kafka.connect.json.JsonConverter", "value.converter": "org.apache.kafka.connect.json.JsonConverter", "table.include.list": "public.rental_streaming", "slot.name": "deb_rental_transaction_slot" } } ERROR: ERROR || Failed testing connection for jdbc:postgresql://postgres:5432/dvdrental with user 'etl': The connection attempt failed. [io.debezium.connector.postgresql.PostgresConnector]

  • @akshayd82
    @akshayd82 7 днів тому

    You can combine the inventory and rate tables

  • @sahilratnaparkhi5917
    @sahilratnaparkhi5917 8 днів тому

    can you make a video on streaming data from cassandra to kafka using debezium

    • @irtizahafiz
      @irtizahafiz 3 дні тому

      Noted. I will try to put something together.

  • @shaohuiyang3034
    @shaohuiyang3034 14 днів тому

    The note pdf is not available. Can you reupload it? Thanks.

    • @irtizahafiz
      @irtizahafiz 3 дні тому

      Unfortunately, they were removed from the server. I don't have a copy.

  • @dewaldesterhuysen712
    @dewaldesterhuysen712 15 днів тому

    Thank you

  • @totsubo2000
    @totsubo2000 17 днів тому

    How would this system handle scalability? For example if we need to horizontally scale the rate limiter service.

    • @irtizahafiz
      @irtizahafiz 15 днів тому

      It depends. One way can be to add more instances and then route the traffic using a round-robin or some other routing algorithm.

  • @ldas1111
    @ldas1111 18 днів тому

    Thank you for the great tutorial! I really appreciate it. I did find the background music a bit distracting-would you mind considering leaving it out in the future?

    • @irtizahafiz
      @irtizahafiz 17 днів тому

      Appreciate the feedback! Multiple others found it annoying as well, so I have gone ahead and removed it. Cheers!

  • @daymaker_trading
    @daymaker_trading 20 днів тому

    Amazing, thank you

  • @leinah3671
    @leinah3671 28 днів тому

    Tooltip doesn't work now on v5

    • @irtizahafiz
      @irtizahafiz 18 днів тому

      Ah, sorry. I think dependencies have changed since I last posted.

    • @leinah3671
      @leinah3671 17 днів тому

      @@irtizahafiz Found the solution. Use the react-simple-maps v3. But what I did is I used nextui tooltip

  • @D.Dee_
    @D.Dee_ 28 днів тому

    Hello, great video. I am interested in taking this entire course. However, I am having trouble figuring out the arrangement/progression of the entire course in your playlist. Please could you kindly number each of the videos in this series (e.g. #0, #1, etc.) or perhaps reorganise the playlist? This would really help me and others who are finding it difficult to know the correct sequence to follow. Thank you.

    • @irtizahafiz
      @irtizahafiz 18 днів тому

      Hi! Unfortunately, I didn't end up with a fixed sequence. Feel free to browse around and see which topics interest you the most. I don't think there's any inherent ordering. If it helps, I would start with the conceptual videos at first, before moving to practical examples.

  • @Lisa-kk6go
    @Lisa-kk6go 28 днів тому

    Why do we need both unique checkout_id and token? Shouldn't the unique checkout_id be good enough?

    • @irtizahafiz
      @irtizahafiz 18 днів тому

      It depends on your implementation. The goal with this video was to provide a high level idea only.

  • @smkhan007
    @smkhan007 29 днів тому

    Scheduled job won't work if the consumers logs in after 1 year

  • @josephabetang3334
    @josephabetang3334 Місяць тому

    I just heard of Debezium few months ago because we use it at work. Your explanation was clear. Thank you!

  • @jeffsaremi
    @jeffsaremi Місяць тому

    Is there a way to shut down the background music?

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Unfortunately, no :( I was trying out a different style, which clearly didn't do well haha.

  • @FarukHossain-bs3ni
    @FarukHossain-bs3ni Місяць тому

    Awesome, Make a complete RAG application with some text file.

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Already flimed ;) Got RAG videos coming up for text file, PDF, CSV, Cassandra, Reddit and many other formats. Hope you enjoy them.

  • @FarukHossain-bs3ni
    @FarukHossain-bs3ni Місяць тому

    Hi this is Faruk from India, You are doing awesome.

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Thank you so much! Hope you are getting value.

  • @AyeshaSiddiki-c6v
    @AyeshaSiddiki-c6v Місяць тому

    Love it!

  • @NishatEshika
    @NishatEshika Місяць тому

    👍

  • @rfz4151
    @rfz4151 Місяць тому

    Im try this command "docker run --tty --network postgres_debezium_cdc_default confluentinc/cp-kafkacat kafcakat -b kafka:9092 -C -s key=s -s value=avro -r schema-registry:8081 -t postgres.public.student" and get issue => docker: Error response from daemon: network postgres_debezium_cdc_default not found. When i check docker network im found this network, ee5c820a3e14 debezium-network bridge local b4dadb00d632 debezium_default bridge local when im tried using one of them, get issue: docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "kafcakat": executable file not found in $PATH: unknown. how to solve?

    • @RajkumarS-p1f
      @RajkumarS-p1f 2 дні тому

      facing same problem, how to solve this probelm

  • @looppp
    @looppp Місяць тому

    How did you get umami.track to work? It says it's missing umami installation

  • @jaggyjut
    @jaggyjut Місяць тому

    great tutorial. Used Claude AI to figure out the dependencies and how to setup the OpenAI API Key for the simple_prompts file.

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Thank you for watching! Claude AI is so good for programming-related questions. Very surprised!

  • @marwen1983-t1s
    @marwen1983-t1s Місяць тому

    thank you very much. i really appreciate your approach to discussing this topic

    • @irtizahafiz
      @irtizahafiz Місяць тому

      You're very welcome!

    • @RajkumarS-p1f
      @RajkumarS-p1f 2 дні тому

      did you the error docker run --tty --network postgres_debezium_cdc_default confluentinc/cp-kafkacat kafcakat -b kafka:9092 -C -s key=s -s value=avro -r schema-registry:8081 -t postgres.public.student" and get issue => docker: Error response from daemon: network postgres_debezium_cdc_default not found.

  • @AyeshaSiddiki-c6v
    @AyeshaSiddiki-c6v Місяць тому

    Welcome back! This is amazing, very informative, and easy to understand

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Thank you! I appreciate it.

  • @jamieridenour1275
    @jamieridenour1275 Місяць тому

    so this is transactional replication but for each individual table?

    • @irtizahafiz
      @irtizahafiz Місяць тому

      I am not sure I understand what you mean by transactional replication. And yes, you can do it for individual tables.

  • @vidhya821
    @vidhya821 Місяць тому

    I am sorry but that bgm is really irking me

    • @irtizahafiz
      @irtizahafiz Місяць тому

      I appreciate the feedback and suggestions. Will work on it.

  • @B-Billy
    @B-Billy Місяць тому

    Woow, you have even shared your noted!! That's perfectly perfect!

  • @B-Billy
    @B-Billy Місяць тому

    Thank you so much Irtiza, that's pure Gold content!! Every sec was full of informarion!! Subscribed!

  • @yynnooot
    @yynnooot Місяць тому

    As a Frontend dev, you're videos have been pivotal in my understanding system design. You explain everything so well! I wish you had more fullstack SD videos... I could watch your videos all day!

  • @yynnooot
    @yynnooot Місяць тому

    Wow, this is one of the best videos on system design I've seen. This was super well organized and thought out. I really appreciate the clear explanations!

  • @FlorenceOkosun
    @FlorenceOkosun Місяць тому

    Okay, so I'm rewatching this. We said at the beginning that guests are not booking actual rooms rather, it is a room type they are booking, that makes sense. Now the issue of multiple guests booking the same seems irrelevant here, dont you think. A reservation is for a particular room type in a particular hotel. For example Hotel XYZ has 50 King Size Room types, recorded in the room_type_inventory table yeah? So if guest A books one of such room types in Hotel XYZ, we have 49 left right? At this point guest A has no idea what the room number is until they are checking in, most likely at the hotel front desk. So what I am saying is, guests booking the same room does not apply, since they are only able to book a room type in advance. What am I missing?

    • @anuragvishnoi3921
      @anuragvishnoi3921 Місяць тому

      I think multiple users booking same room simply means the case when there is just one of a specific room type left and there are two users trying to book that type of the room. That is when Pessimistic lock/optimistic lock/database constraint will be useful.

  • @danser_theplayer01
    @danser_theplayer01 Місяць тому

    11:50 let me clarify, this is a very compound PRIMARY KEY <PARTITION KEY, league, kit_number, position, goals> with a PARTITION KEY <name, club>?

  • @SaritaSahu-p9c
    @SaritaSahu-p9c Місяць тому

    Amazing videos and great explanations. Awaiting for new videos.

  • @unujjwal
    @unujjwal 2 місяці тому

    Mentioning the consistent hash ring should be a necessity for intro to cassandra videos

  • @FlorenceOkosun
    @FlorenceOkosun 2 місяці тому

    Another question partaining to partioning. So one of the functional requirements is that a user should be able to search for a room by a given date range. Would it be right to partition the table in question by date field?

    • @anuragvishnoi3921
      @anuragvishnoi3921 Місяць тому

      It is important to make sure what would be the easy access key when data is retrieved from the shards. In this example hotel_id makes more sense while sharding because that would is a key here and all the rooms objects are contained inside that.

  • @jondyason336
    @jondyason336 2 місяці тому

    Great!

  • @FlorenceOkosun
    @FlorenceOkosun 2 місяці тому

    In the case where multiple users are trying to make a booking or reservation for the same room, wont the reservation status suffice instead of using the optimistic locking approach or db constraint? Let's say the status is an enum {'available', 'pending', 'payment_completed'} as an example, if the status is not `available` then it can be reserved. Wouldn't that be sufficient to avoid multiple booking?

    • @FlorenceOkosun
      @FlorenceOkosun 2 місяці тому

      I would set a status on reservation to pending until payment succeeds. How I would implement it is using some event queue mechanism to update the status when payment fails or succeeds. How would you handle this, you didn't cover payment processing

  • @marcinkiziukiewicz9695
    @marcinkiziukiewicz9695 2 місяці тому

    Thank you :)

  • @viktordzenkiv4710
    @viktordzenkiv4710 2 місяці тому

    the best explanation

  • @CamillaPeg-b9s
    @CamillaPeg-b9s 2 місяці тому

    Albert Spur

  • @UmarFarooq-u4g7h
    @UmarFarooq-u4g7h 2 місяці тому

    can i used this design for RAG system in production for real time update postgres to vector database?

  • @ConanAdam-f1o
    @ConanAdam-f1o 2 місяці тому

    Anthony Isle

  • @PamelaRivera-y7k
    @PamelaRivera-y7k 2 місяці тому

    Metz Street

  • @AvocadoGCC
    @AvocadoGCC 2 місяці тому

    Lots of conflict in your talk. If user A pushes its message to its channel, and A's subscribers go to pull the message themselves, why does A need to look up which friend is online and then determine if A needs to push message or not.

    • @ssy13542
      @ssy13542 2 місяці тому

      I checked with chat gpt, redis pub sub is a push model and subscribers are passively accepting updates from publishers. If a subscriber just back online, they can use cache to find the nearby active friends.

  • @huntermeaney-i7j
    @huntermeaney-i7j 2 місяці тому

    Ortiz Drives

  • @LindsayEleanore-n2x
    @LindsayEleanore-n2x 2 місяці тому

    Robert Turnpike

  • @jayparekh3942
    @jayparekh3942 2 місяці тому

    Mine is saying no module named redis. So how do I troubleshoot it??

    • @irtizahafiz
      @irtizahafiz Місяць тому

      Try installing it using pip3.

  • @KirkKeitt-e2w
    @KirkKeitt-e2w 2 місяці тому

    Stanton View

  • @ramongodaslopez-rm1si
    @ramongodaslopez-rm1si 2 місяці тому

    Can you do api calls with the self host version?

  • @aniket.kumarr
    @aniket.kumarr 2 місяці тому

    Thank you, this was a basic demo, but a really good one!