Spring AI RAG | Chat with your PDF Documents using Java and Spring Boot
Vložit
- čas přidán 24. 03. 2024
- Hi and welcome back to my channel! Todays video goes through an example of Retrieval Augmented Generation using Large Language Models (OpenAI in this case)- or how to chat with your PDF documents - using Java 21, Spring Boot, and Spring AI module. As always, the code I will show here is available in Github, link below this. I will cover how to use Vector databases and prompt engineering to limit your queries to the provided information.
So essentially we'll do RAG with LLMs using Java, and that's it. :)
If you like the content here, remember to click the like button, and subscribe to my channel for more. And as always, drop any comments, questions, requests in the comment section.
Here are the links in video:
- github.com/crystoll/musashi
- start.spring.io/
- docs.spring.io/spring-ai/refe...
good ones , we want more usecases for AI and springboot
very good video, thanks for the into, great more examples about rag.
Thank you! It seems RAG usecases are in demand right now, and there's also uses for own internal tools. Some of these of course will appear as part of available tooling, but being able to do it yourself is great for like-minded tinkerers that like to understand things by building them, I think.
Greate video with lots and lots of great information.
Thank you for the feedback! Much appreciated!
Love to learn and share these things, I understand best by building and tinkering. Some more cool RAG stuff coming up soon! :)
Create a Basic RAG model AI chatbot using any open-source model available.
Database: Zilliz/Supabase or any Vector DB, of your choice.
Backend: Java
Frontend: HTML/CSS/JS (or anything you are familiar with)
Backend should haveAPI for:
• Upload a file or text - text should then be converted into chunks and then embeddings
(You can use any open-source embedding model or paid one too). Embedding should
then be stored in a vector DB with vector index of your choice (Cosine/ L2/KNN).
• Chat API -> prompt or user queries should be passed in this API and using prompt
engineering response should be derived from any Language model.
Frontend:
UI does not have to look pretty. basic pages should be there -
1. For uploading docs or text for training the RAG model.
2. Basic chat interface where user can send message and receive the response.
Sir please help me how to do this project🙏🙏🙏🙏🙏🙏
Awesome idea! Working on something else right now, but this sounds like a good plan for a long form video, and a fun one.
Give me your job, Ill do it for easy
Kiitos paljon
Nice video! Can you do it with front end like nextJs ? it will be really appreciated and helpful!
Thank you! I did not include frontend because on top of API that is quite straightforward, and tried to keep the video compact. But I've been thinking of doing a bigger video with full stack, because it looks a lot nicer. But not there yet, at least. It would really be a trivial NextJs (or any other framework) web app that you dump into spring boot 'public' folder under sourcecode.
So I'll definitely take that under consideration, but probably not going to happen soon.
one doubt i have ollama which will have a ai model lets say mistral or meta now i am connecting this to my springboot app and lets say i have a pdf about my product can show me how a rag implementation done here and when a api is sent it should give me the data about the PDF
I don't mean to mock you, but when you say "model", it sounds like "module" in my ears. 😅
nice video bro, keep create content like this...
Haha, I actually aporeciate feedback on my pronounciation, lets me work on it. Thank you!
please create from the scratch
Noted, need to make a longer video then but would be fun :)