Woohoo 🥳
#LangChain4j
celebrates its first anniversary today!
What an exciting year it has been!
Generative AI in Java has made a significant leap forward, and we are very proud to be part of this!
It wouldn't have been possible without all the help and support from the…
Finally, it's the weekend🎉Time for experiments!
Using GPT-4 to evaluate content generated by Llama2. Seems to integrate well with standard JUnit/AssertJ tests. WDYT?
#LangChain4j
0.29.0 is out! 🎉
We have a lot of cool stuff here:
1.
#EasyRAG
: an easy way to get started with RAG. It can't get any easier!
2. Advanced RAG with
@Azure
AI Search
3. Seamless integration into
@SpringBoot
applications
4. Tools/functions support for
@MistralAI
5.…
First public debute of
#LangChain4j
🎉 Many thanks to our awesome presenter
@LizeRaes
🙏 and extra thank to organiser of
@Devoxx
for an opportunity to demonstrate the possibles of the library💪
LangChain4j 0.26.1 is now available🎉
In this release, we are excited to introduce:
- Advanced RAG support
- Multimodality with image inputs
- Integrations with
@MistralAI
,
@cohere
,
@Azure
AI Search,
@qdrant_engine
,
@github
- And much more:
LangChain4j 0.28.0 is here! 🥳
In this release:
- 2 new integrations:
@AnthropicAI
and
@Zhipu_AI
- The
@Google
Gemini integration now supports tools (functions)!
- A new core feature: "metadata filtering", with initial support for
@Milvusio
,
@Elastic
, and in-memory embedding…
#LangChain4j
0.30.0 is out!
This is a small ad-hoc release.
Many cool features are brewing, so stay tuned!
In this release:
- AI Services improvements
- Support for tools in
@AnthropicAI
- Many bug fixes
A short thread 🧵
Your guide to LLM agent reference architecture is here! 📍🗺 We teamed up with
@LangChainAI
to provide:
◆ Common Gen AI design patterns and use cases
◆ In-depth architectural examples
◆ Important considerations to keep in mind
Grab your copy ➡️
@sebi2706
Hi
@sebi2706
, here is a good place to start:
Current implementation in langchain4j is very primitive, but we are already working on the next version that will allow for advanced methods.
1. Easy RAG
RAG can be hard to understand and implement for beginners.
@dandreadis
challenged us to make RAG super easy. So, we made it easy!
To get started with RAG, you do not have to learn about parsers, splitters, embeddings, and other stuff. Just point to your documents,…
OK, we weren't completely honest when we said "Easy RAG can't get any easier"🤭
@janmartiska
from the
@QuarkusIO
team went further and made it even easier, great job!
More details here:
We're excited to announce experimental support for in-process embeddings in LangChain4j!
Now, you can perform text embedding directly within your Java application. Yes, within the same JVM process!
There's no need for GPUs or external services, nor any network overhead.
1/5
3. Seamless integration into
@SpringBoot
applications
@geoand86
from the
@QuarkusIO
team did an excellent job making AI Services much easier to use in Quarkus applications.
Since many of our users use Spring Boot, we decided to introduce a similar feature with
#LangChain4j
…
How can you ensure that your LLM-powered app behaves as expected?
How do you determine if your prompt template is good enough?
How can you tell if your RAG setup is optimal?
What is the ideal segment size for your data? Overlap?
Which RAG techniques provide the best results for…
1. AI Services improvements
Thanks to
@mariofusco
, AI Services have become more flexible and powerful!
Now, you can define system messages dynamically.
This is especially helpful if you wish to implement a state machine and/or use different system messages for different…
@ichbinSagar
Awesome! Please let us know how it went and which pain points did you encounter, so that we can improve! BTW, we plan to release an "Easy RAG" feature very soon (in 1-2 weeks), here is a sneak peek:
Thanks to my colleague Zhiyong Li (from Microsoft DevDiv China), we will soon have Spring Boot support in
@langchain4j
for Azure OpenAI and Azure AI Search!
This will greatly simplify configuration!
Good point regarding OpenAI's text-embedding-ada-002. There are open-source models that outperform OpenAI (see MTEB leaderboard), and they are free and available offline!
Some of these popular models are available in LangChain4j out of the box, making embedding straightforward in…
You keep reading about sentence embeddings, but you might still not know exactly what they are. You are not alone! 🤗
I wrote a step-by-step walkthrough with code, math, applications, and memes. Kick off your year understanding what embeddings are!
You keep reading about sentence embeddings, but you might still not know exactly what they are. You are not alone! 🤗
I wrote a step-by-step walkthrough with code, math, applications, and memes. Kick off your year understanding what embeddings are!
3. We've added a new core feature called "metadata filtering".
If your documents/segments contain metadata entries, you can now apply strict filters when doing similarity search in embedding store.
Think of it as a "WHERE" clause in SQL.
This feature is quite generic and has many…
I have found my RAG rerankers
I spent the past few days testing rerankers and there are two that I'll use going forward.
• Cohere
• ColBERT
Both performed as well as GPT-4 in reranking quality and are lightning fast.
Cohere's avg inference time was ~200ms. It's…
@sebi2706
@QuarkusIO
You should be able to extract the POJO even without manually explaining the JSON format. JSON schema and formatting instructions are generated automatically by AiServices and appended to the prompt. You can enable logging on LLM level and see the final prompt sent to the LLM.
#LangChain4j
0.22.0 is out!
- Integration with
@GoogleAI
Vertex AI
- Offline text classification with embeddings
- Reworked document splitters
- In-process embedding models can now embed longer texts
- In-memory embedding store can now be easily persisted
- And more:…
gpt-4-0125-preview keeps calling the get_current_weather function with the "felsius" temperature unit, although only "fahrenheit" and "celsius" are allowed 😆
Now I have to disable this test to unblock the release 🤦♂️
How to ensure that the test is "reproducible":
1. Use a static "seed" parameter. This is supported by many LLM providers, such as OpenAI, VertexAI, Mistral, Ollama, etc.
2. Check the system_fingerprint.
3. Set temperature to 0.
How to ensure that the test is "diverse":
1. Use…
@Stephan007
@agishaun
😁
On a serious note, the cost and latency of using 1M tokens is not mentioned here.
It is a tradeoff between simplicity, recall, cost, latency. Doing retrieval before LLM call is an incredibly low-hanging fruit though.
🚀
#LangChain4j
0.19.0 is out!
✅ Integration with
@weaviate_io
✅ DOC/XLS/PTT document loaders
✅ Separate chat memory per user
✅ Support for custom in-process embedding models
✅ Many other improvements
Details ➡️
#LangChain4j
0.10.0 is out!
Now you can add your custom knowledge base to "AI Services". Relevant information will be automatically retrieved and injected into the prompt. This way, the LLM will have a context of your data and will answer based on it!
[Arena Update]
Our community has cast 20,000 more votes for Claude-3 Opus and Sonnet, showing great enthusiasm for the new Claude model family!
Claude-3-Opus now shares the top-1* rank with GPT-4-Turbo, while Sonnet has surpassed GPT-4-0314. Big congrats
@AnthropicAI
🔥
In…
2. Advanced RAG with
@Azure
AI Search
@juliendubois
worked hard to add this to
#LangChain4j
, so now you can use not only vector search, but also full-text search, hybrid (full-text + vector) search and re-ranking with
@Azure
AI Search!
More details here:
We have added new cool feature called "AI Services"!
Now you can hide complicated logic of communication with LLM behind a simple Java interface!
Check it out:
OpenAI Functions are very powerful!
Check this conversation between customer and customer support agent (AI):
[User]: Hi, I forgot when my booking is.
[Agent]: Sure, I can help you with that. Can you please provide me with your booking number, customer name, and surname?
1/6
Great stuff!
This reminds me of a flow that
@IrynaLiubarska
and I developed for our IntelliJ IDEA AI-assisted coding plugin a while ago.
Apart from the basic features like "explain this code," "refactor this code," and "document this code," we wanted a more systematic way of…
😍 The recording from our Flow Engineering webinar with
@hwchase17
and
@itamar_mar
is up!
"Flow Engineering" is a term that has been gaining in popularity recently. The first time it was mentioned as term was in CodiumAI paper on AlphaCodium, where they…
4. Self-Querying
This one is very cool!
Building on top of metadata filtering, you can now use an LLM to automatically generate a filter from a natural language query before doing similarity search. This can narrow down the search space and improve the quality of your RAG.
More…
Microsoft announces Improving Text Embeddings with Large Language Models
paper page:
introduce a novel and simple method for obtaining high-quality text embeddings using only synthetic data and less than 1k training steps. Unlike existing methods that…
@aheritier
Hi, thanks a lot for heads up! Indeed, the fix in the spring boot starter was released only for spring boot dependencies. Will do better next time!
6. RAG with
@Neo4j
knowledge graphs
@theawesomenayak
did a great job making it possible to use
@Neo4j
knowledge graphs in a RAG pipeline!
Now, LLM can convert a natural language query into a Cypher query, which will be executed on a knowledge graph to retrieve relevant…
@holdeeer
@sivalabs
RAG is a very new and still developing concept, so there is no established and definitive metric for determining its readiness for production use. One has to develop their own metrics and decide for themselves.
One can use a multitude of "advanced RAG" techniques which improve…
#LangChain4j
0.11.0 is out 🎉
#GPT4
#CodeInterpreter
is so cool, but it is not available via the API.
To "fix" this, we've added dynamic code execution!
Now, the LLM can generate code for tasks that require precise calculations, such as math and string manipulation.
1/3
@sivalabs
Awesome! You might be interested in the documentation page which I just updated with more examples (I will keep adding more and more in the coming days):
Thanks a lot for these excellent articles, you are doing much better job than me documenting this😅
[User]: 123-457
[Agent]: Thank you for providing the booking number. May I also have your customer name and surname?
[User]: I'm sorry I'm so inattentive today. Klaus Heisler.
[Function]: Getting details for booking 123-457 for Klaus Heisler...
2/6
[Function]: org.example.BookingNotFoundException
[Agent]: I apologize, but I couldn't find any booking under the name Klaus Heisler with the booking number 123-457. Could you please double-check the information and provide me with the correct details?
3/6
@DataStax
@LangChainAI
Thank you for a very nice and clear visualization, great job!
This architecture can now be easily implemented using
@langchain4j
thanks to
@DataStax
AstraDB integration and a data ingestion pipeline (see ) as well as an advanced RAG flow (see…
@Stephan007
@glaforge
@aheritier
It does not work just yet, we are now upgrading to the brand new Google VertexAI java sdk, so Gemini will be supported soon
Finally, it's the weekend🎉Time for experiments!
Using GPT-4 to evaluate content generated by Llama2. Seems to integrate well with standard JUnit/AssertJ tests. WDYT?
#LangChain4j
0.21.0 is here!
- Integration with
@trychroma
- Integration with Qwen models (DashScope)
- Support for persistent chat memory
More details: