- 14
- 35 271
Spring in Action
เข้าร่วมเมื่อ 21 พ.ค. 2022
Influencing GenAI Responses
When sending prompts to an LLM for generation, you may have seen or used temperature, top-p, top-k, or logit-bias as options in the generation request. But do you really know how they influence the results you get from the LLM?
In this video, I step away from Spring AI specifically to talk about these useful options (sometimes called "hyperparameters") and how they affect what comes back in the generated response.
If you want to learn more about developing with Spring AI, then check out my newest book, Spring AI in Action. It is currently available in the Manning Early Access Program at www.manning.com/books/spring-ai-in-action?a_aid=habuma&a_bid=f205d999&chan=habuma
To learn more about Spring and Spring Boot, check out my book, available wherever tech books are sold or specifically at either of these two URLs:
- Amazon : www.amazon.com/gp/product/1617297577/?tag=habumacom-20
- Manning.com : www.manning.com/books/spring-in-action-sixth-edition?a_aid=habuma&a_bid=f205d999&chan=habuma
Or, for something completely different (but still loosely related to AI) have a look at my book on developing voice interfaces for Alexa:
- Amazon : www.amazon.com/gp/product/1680507257/?tag=habumacom-20
- PragProg.com : pragprog.com/titles/cwalexa/build-talking-apps-for-alexa/
Also, to see videos I've created on Alexa development, visit my other channel at th-cam.com/channels/3PN.html....
If you enjoy this video, I'd appreciate a thumbs up! Leave me a comment and let me know what you think. And please, share with your friends and colleagues.
Thanks for watching!
In this video, I step away from Spring AI specifically to talk about these useful options (sometimes called "hyperparameters") and how they affect what comes back in the generated response.
If you want to learn more about developing with Spring AI, then check out my newest book, Spring AI in Action. It is currently available in the Manning Early Access Program at www.manning.com/books/spring-ai-in-action?a_aid=habuma&a_bid=f205d999&chan=habuma
To learn more about Spring and Spring Boot, check out my book, available wherever tech books are sold or specifically at either of these two URLs:
- Amazon : www.amazon.com/gp/product/1617297577/?tag=habumacom-20
- Manning.com : www.manning.com/books/spring-in-action-sixth-edition?a_aid=habuma&a_bid=f205d999&chan=habuma
Or, for something completely different (but still loosely related to AI) have a look at my book on developing voice interfaces for Alexa:
- Amazon : www.amazon.com/gp/product/1680507257/?tag=habumacom-20
- PragProg.com : pragprog.com/titles/cwalexa/build-talking-apps-for-alexa/
Also, to see videos I've created on Alexa development, visit my other channel at th-cam.com/channels/3PN.html....
If you enjoy this video, I'd appreciate a thumbs up! Leave me a comment and let me know what you think. And please, share with your friends and colleagues.
Thanks for watching!
มุมมอง: 189
วีดีโอ
Putting Spring AI to the Test
มุมมอง 2305 หลายเดือนก่อน
The non-deterministic nature of Generative AI can make testing tricky. In this video, I show how to use Spring AI's RelevancyEvaluator to write tests that assert that the response to a prompt is relevant to the prompt itself. The pull request for the correctness evaluator mentioned in the video can be found at github.com/spring-projects/spring-ai/pull/969. If you want to learn more about develo...
Talk To Your Images
มุมมอง 1295 หลายเดือนก่อน
Although Retrieval Augmented Generation (RAG) is a useful technique for enabling LLMs to answer questions about your documents, not all questions are about documents. What if you want to ask questions about an image? In this video, I show how to use Spring AI to leverage multimodal capabilities of some LLMs to ask about photographs and other images. If you want to learn more about developing wi...
Spring AI Summarization
มุมมอง 3635 หลายเดือนก่อน
Generative AI is more than just asking questions in a chat client. Text summarization is among the several use cases that GenAI can help with. In this video, I show how to create a Spring AI application that can summarize an uploaded PDF file. If you want to learn more about developing with Spring AI, then check out my newest book, Spring AI in Action. It is currently available in the Manning E...
Generating Images with Spring AI
มุมมอง 2.6Kปีที่แล้ว
In this video, I show how to use the new image generation features in Spring AI, which were introduced in 0.8.0-SNAPSHOT. In the video, I create an image of dogs playing Monopoly, but you might also be interested to know that the thumbnail image for this video was also created using the same code I wrote in the video (using the prompt "A robot painting a work of art"). If you want to learn more...
Burger Battle Helper
มุมมอง 291ปีที่แล้ว
A brief demo showing how Alexa plus an LLM can offer tabletop game rules assistance. (Note that I resisted the urge to call it "Hamburger Helper".) I hope to record a video soon on how I created this. Stay tuned. Also, if Burger Battle looks like a game that you'd enjoy playing, then there's still time to back Burger Battle 2 on Kickstarter and pick up a reprint of the original game along with ...
Spring AI Origins: Taking a look at LangChain
มุมมอง 1.4Kปีที่แล้ว
Spring AI, a new project that enables integration with generative AI in Spring Boot applications, was inspired by other libraries that came before it, including LangChain and LlamaIndex. In this video, we take a look at one of those sources of inspiration, LangChain. By understanding how LangChain works, you'll be better equipped to pick up and understand Spring AI as it evolves.
Spring AI and Embeddings
มุมมอง 4.6Kปีที่แล้ว
Note: This video was created with a much older, pre-1.0.0 version of Spring AI. Things have changed dramatically since that time. I keep it around for reference, but I have not yet had opportunity to create an updated version of this video. That said, the session I presented at the jChampions conference is fairly current (although Spring AI is still pre-1.0 and subject to change). Therefore, co...
Introducing Spring AI
มุมมอง 17Kปีที่แล้ว
Generative AI is getting a lot of attention lately. In this video, I introduce you to a relatively new project, Spring AI (github.com/spring-projects-experimental/spring-ai), which enables you to build generative AI into your Spring Boot applications. If you want to learn more about developing with Spring and Spring Boot, check out my book, available wherever tech books are sold or specifically...
Spring 6 and Declarative RSocket Clients
มุมมอง 9222 ปีที่แล้ว
A few weeks ago, I shared a video showing how to use Spring 6's support for declarative HTTP clients (th-cam.com/video/QXgq_e7etXc/w-d-xo.html). This time, I show the RSocket counterpart: declarative RSocket clients. Because the RSocket client is going to need a server to talk to, along the way, I also show how to create RSocket services in Spring. If you want to learn more about developing wit...
Spring 6 and Declarative Clients
มุมมอง 9682 ปีที่แล้ว
In this video, I show how to create declarative clients in Spring Framework 6. - Spring Framework : spring.io/projects/spring-framework If you want to learn more about developing with Spring and Spring Boot, check out my book, available wherever tech books are sold or specifically at either of these two URLs: - Amazon : www.amazon.com/gp/product/1617297577/?tag=habumacom-20 - Manning.com : www....
Spring 6 and Problem Details
มุมมอง 5K2 ปีที่แล้ว
This video shows how to use Spring Framework 6's new support for Problem Details (RFC-7807) to create clear and concise responses from an API when things go wrong. - Spring Framework : spring.io/projects/spring-framework - RFC-7807 : www.rfc-editor.org/rfc/rfc7807 If you want to learn more about developing with Spring and Spring Boot, check out my book, available wherever tech books are sold or...
Spring and Kubernetes without YAML
มุมมอง 6452 ปีที่แล้ว
In this video, I show how to create a deploy and configure a Spring Boot application into Kubernetes without writing any YAML. - 2:11 - Setting the Stage - 5:27 - Building an Image - 9:58 - Deploying in Kubernetes - 15:00 - Configuring with a ConfigMap - 28:10 - Recap If you want to learn more about developing with Spring and Spring Boot, check out my book, available wherever tech books are sol...
Spring and GraphQL
มุมมอง 7482 ปีที่แล้ว
In this video, I show how to create a GraphQL API using Spring Boot and Spring GraphQL. - 0:49 - Setting the Stage - 6:37 - Hello GraphQL - 13:00 - GraphQL and Persistence - 23:45 - Using GraphiQL - 26:27 - Applying Mutations - 39:45 - Creating a GraphQL Client - 50:55 - Recap POST-EDITING NOTE: At 44:01, I say that the toEntity() returns a Flux. It actually returns a Mono, and I corrected myse...
This was very interesting. I purchased the MEAP version of your Spring AI in action when you began it, and I am looking forward to getting the print version.
Thanks! Good luck with the pull request.
Regarding the TikaDocumentReader class in Spring AI - as you pointed out the get() method of that class only returns a single Document object, unlike the PagePdfDocumentReader class which returns multiple Document objects.The PagePdfDocumentReader also has a config where I can retrieve content based on the pages per PDF. Is the TikaDocumentReader going to support such configuration in the Spring AI 1.0.0 Release? And I noticed that working with word documents (MS word docs) is a lot harder compared to PDF files. It is tough to identify page breaks in word documents using Tika and Apache POI libraries. Any thoughts or insights on how we can analyse word documents in a RAG based application?
hello , can i generate image using any offline model? because i don't use OpenAi.
At 22:40, I didn't achieve the desired outcome like you did. My application simply displayed everything, akin to executing `SELECT * FROM book JOIN author` without the `WHERE` clause for firstName or lastName. Can someone assist?
thank you for your video, I have a dump question, what extension do you use that gives you code suggestion before you even type?
If you’re talking about the code suggestion in the IDE, it’s just GitHub Copilot. It’s not perfect and sometimes suggests the worst possible code, but when it suggests good stuff, it saves a lot of typing.
Nice video, cool. Can we get the source code?
Indeed you can. It's in the spring-ai-image-gen folder at github.com/habuma/spring-ai-examples. Or, if you are using Spring CLI, you can pull just that project by adding the catalog and using `spring boot new`: ``` % spring project-catalog add spring-ai-examples github.com/habuma/spring-ai-examples % spring boot new my-project spring-ai-imagegen com.example.ai ```
Thanks for the video it was fun and informative. Is there link to the code on git by any chance?
The example code in this video is a little outdated, but you can get a relatively new version like it at github.com/habuma/spring-ai-rag-example. Or, if you are using the Spring CLI, add the project catalog and using `spring boot new` like this: ``` % spring project-catalog add spring-ai-examples github.com/habuma/spring-ai-examples % spring boot new my-project spring-ai-rag com.example.ai ```
Hello, great presentation thank you 👍 Curious if you did a video on RAG + embeddings + vector store (pgVector) ?
Thank you. I'm glad you enjoyed it. I have a video on embeddings at th-cam.com/video/zNIiLkRn96Q/w-d-xo.html, but the talk I gave at jChampions in January is more up-to-date: th-cam.com/video/zNIiLkRn96Q/w-d-xo.html Neither of those cover pgVector as a vector store, but in the big scheme of things, it's not much different. I have used pgVector on an app for my day job and really the only significant difference between it and the other vector stores is that you'll need to configure your data source (just like you would for any PostgreSQL database in a Spring app) and make sure that you include the proper dependency for pgVector. When I get some time, maybe I'll create an updated video that includes pgVector.
@@springinaction thank you a lof for your reply, I ended up building the app I had in mind by utilizing RAG and pgVector store. It was of couse inspired by your spring ai rag example !
How to resolve the ai dependency problem which dependency need to add on pom.xml file ??
I'm not sure that I understand. I add the dependency to the pom.xml file at about 4:45. The version in this video was 0.8.0-SNAPSHOT, so you need the snapshot repository added a bit earlier in the video. But now that 0.8.0 is released, you can use that if you add the milestone dependency. If that's not what you're asking about, let me know and I'll try to help you out.
This video is already old and many of the classes have changed. There is a TextReader now.
No doubt. Spring AI is still pre-1.0 and subject to frequent changes. In fact, there were several significant changes just a couple of weeks ago, so it's hard to keep up. I leave the video around for reference, but I've not yet had opportunity to create an updated video. That said, I did speak on Spring AI at the jChampions conference the day after those significant changes were made. As such, the video at th-cam.com/users/liveTPY1WYHDNho could be considered the updated version of this video).
wihch version of java you used, i have java 17 and it's not working for me?
I believe I was using Java 17 to make that video. But be aware that I created that video back in September, using whatever version of Spring AI was available then. Spring AI was (and still is) pre-1.0.0 and a LOT has changed since September. Without knowing what problems you're having, I can only assume that it's because you're using an older version of Spring AI or that you're trying to apply old Spring AI stuff in a newer version. The latest I've been working with is 0.8.0-SNAPSHOT (which itself is vastly different than 0.7.0). I've not had opportunity to create an updated version of this video, but I did present on this (using current stuff) a couple of weeks ago at the jChampions conference. You can view that talk at th-cam.com/users/liveTPY1WYHDNho
thanks man, appreciate it!
I was considering creating a program to retrieve the rules of some of my board games and answer questions about them, but you've already done it 😂. Great video!
Heh...you have no idea. I've done this several times for many board games. I've even put an Alexa front-end on it so that in the course of playing a game I can ask out loud. None of it is refined enough (yet) to make the Alexa skill public, but that's the plan.
Very informative... keep doing like this
Great tutorial, is source code in github?
No, the source code isn't in GitHub...and even if it were, it'd be out of date because Spring AI has changed considerably since the video was created. (Spring AI is still pre-1.0, so big changes are still a thing.) That said, the code in github.com/habuma/spring-ai-rag-example shows the same kinda stuff and is current as of a week ago. When I find a moment, I hope to create an updated video showing this new stuff.
Fantastic! easy explanation
Nice Demo.
Is the source code available ?
good
fascinating
keep up this is gold 😍 thnks for the awesome informative video
Thanks. Explained very well
Awesome! Thanks for the great tutorial on RAG using Spring AI.
Hey Craig - Nice work on the video. Very helpful for me. I'm trying to get up to speed on this space. Do you have this demo in GitHub anywhere?
Beautiful ❤
Whats wrong with you? Kim Carnes is amazing!
Very informative ❤
Interested to learn.
👍
Fantastic ! Thanks..
Very useful for Software Engineers who loves to explore in the field of Prompt Engineering !
Beautiful presentation
amazon and manning links didn't work for me...
Just now seeing this comment. Thanks for pointing it out. It was a copy-n-paste mistake. I've fixed it.
Very helpful and concise. Good way to stay updated. Good explaination of the project and the context, plus clear and easy-to-follow walkthrough taking us through all the steps necessary to succesfully implement this helpful feature ProblemDetail
Thank you!
Awesome, short and concise explanation. Thank you for spreading the knowledge!
It would be very helpful if you could show the UnknownTeamException class. I'm new to Spring boot and some things are not obvious for me. Thank you very much.
Awesome !
Well done! This was really helpful.
Great Content! Thank you for your effort and energy SIA!
Good video, I did not know about the trick to have Spring default to ProblemDetails in case of "unpredictable" errors. As an addition, I believe it would have been helpful to mention the usage of the "type" field which is kind of central to the ProblemDetails concept. Everything is better than leaking the stack trace but "type" is really the identifier for the error and allows the clients to classify it as they see fit as well as providing them with additional information about the error over the URI.
I remember when this Problem was part of zolando library and they had proper Spring integration. great to see that it is now a standard, thank you for the video.
what font are you using?
Nice explanation about Problem Details feature.
How we can do query cost analysis as part of the query that was coming from the client and restrict it, if it is more than anticipated?
Hi, thanks for sharing! Can we expect graphql federation support in the short term?
Great presentation Craig!!! To enable graphiql you can try with this property spring.graphql.graphiql.enabled=true , it comes out of the box with spring boot.
You're absolutely right! I didn't realize that was an option. Thanks for pointing it out. But...I'll do you one better: While trying it out, I created a brand new Spring GraphQL example and did not set spring.graphql.graphiql.enabled at all. GraphiQL still loaded in my browser, despite that property being false by default. I'm not sure that's supposed to happen, but it worked. YMMV
Ah! I had DevTools in my build and DevTools enables it by default! Even better.
@@springinaction That's nice feature during development. Kudos to Spring team.
great work, keep it up