Introducing Neo4j’s LangChain4j and Spring AI frameworks
To build intelligent applications, we can utilize multiple frameworks available around Neo4j. For the specific use case of intelligent recommendation systems, we will take a look at the Java frameworks Spring AI and LangChain4j.
LangChain4j
LangChain4j (https://github.com/langchain4j/) is a Java framework inspired by the popular Python LangChain framework to build LLM applications in Java. Its goal is to simplify integrating LLM APIs into Java applications. Toward that, it builds an API that is a blend of LangChain, Haystack, LlamaIndex, and other concepts and adds its own flavor to build complex applications. This is how it achieves these objectives.
The following list helps us understand how it achieves these objectives:
- Unified APIs: All the LLM providers, such as Open AI and Google Gemini, have their own proprietary APIs to build applications. Vector stores such as Neo4j, Pinecone, and Milvus...