Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus langchain4j blog post #1833

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

cescoffier
Copy link
Member

No description provided.

Copy link

github-actions bot commented Nov 15, 2023

😭 Deploy PR Preview failed.

@cescoffier cescoffier force-pushed the blog-langchain4j branch 2 times, most recently from 79325a1 to 978b87a Compare November 15, 2023 10:51
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice post. I added a few small suggestions.

_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
[source, java]
----
@ApplicationScoped
public class IngestorExample {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be linked to the previous example somehow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYM?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we have a very good example above that allows to understand exactly why we have these concepts and this code here is disconnected from that so it's harder to imagine how it could be useful.

But I'm not sure if we could have a usage for this concept in the previous triaging example.

_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
_posts/2023-11-16-quarkus-meets-langchain4j.adoc Outdated Show resolved Hide resolved
@cescoffier cescoffier changed the title First draft of the quarkus langchain4j blog post Quarkus langchain4j blog post Nov 15, 2023
@cescoffier cescoffier merged commit 12bb4ba into quarkusio:develop Nov 15, 2023
1 check passed

Popularized by https://openai.com/[OpenAI]'s https://chat.openai.com/[ChatGPT], LLMs are now available in many flavors and sizes. The https://huggingface.co/models[Hugging-Face] platform references hundreds of them, and major tech companies like Facebook, Google, Microsoft, Amazon and IBM are also providing their own models.

LLMs are not a new concept. They have been around for a while, but they were not as powerful or as accessible the became when OpenAI made ChatGPT API's publically available. Since then the Quarkus team have been thinking about what it would mean to integrate LLMs in the Quarkus ecosystem. The talk https://www.youtube.com/watch?app=desktop&v=BD1MSLbs9KE[Java Meets AI] from Lize Raes at Devoxx 2023 has been a great source of inspiration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the became when OpenAI made ChatGPT -> they became when OpenAI made ChatGPT

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRs are open :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Max has a PR opened, I will add to MAx's PR.


LLMs are not a new concept. They have been around for a while, but they were not as powerful or as accessible the became when OpenAI made ChatGPT API's publically available. Since then the Quarkus team have been thinking about what it would mean to integrate LLMs in the Quarkus ecosystem. The talk https://www.youtube.com/watch?app=desktop&v=BD1MSLbs9KE[Java Meets AI] from Lize Raes at Devoxx 2023 has been a great source of inspiration.

Since, the Quarkus team, in collaboration with Dmytro Liubarskyi and the LangChain4j team, has been working on an extension to integrate LLMs in Quarkus applications. This extension is based on the https://github.com/langchain4j[LangChain4j library], which provides a common API to interact with LLMs. The LangChain4j project is a Java re-implementation of the famous https://www.langchain.com/[langchain] library.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since -> Since then maybe? Although it was already used in the paragraph above....


Strictly relying on the LLM's knowledge might not be enough. Thus, the Quarkus LangChain4j extension provides two mechanisms to extend AI knowledge:

- 1) Tools - a tool lets the LLM execute actions in your application. For instance, you can use a tool to send an email, call a REST endpoint, or execute a database query. The LLM decides when to use the tool, the method parameters, and what to do with the result.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be probably an ordered list, so maybe replace - with . and remove 1)?

@cescoffier cescoffier deleted the blog-langchain4j branch November 23, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants