llm-apps-java-spring-ai  by ThomasVitale

Java Spring AI samples for building LLM-powered applications

created 1 year ago
589 stars

Top 56.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive set of Java samples for building Generative AI applications using Spring AI and Spring Boot. It targets Java developers looking to integrate LLMs into their applications for use cases like chatbots, RAG, semantic search, and data extraction. The samples demonstrate leveraging various LLM providers and patterns for practical AI-infused solutions.

How It Works

The project showcases Spring AI's capabilities in abstracting LLM interactions. It utilizes a modular approach, allowing developers to easily swap between different LLM providers (Ollama, OpenAI, Mistral AI) and model types (chat, embedding, image, audio). Key patterns like prompting, structured output, tool calling, and chat memory are demonstrated, alongside data ingestion techniques for RAG.

Quick Start & Requirements

  • Install/Run: Follow individual sample instructions. Typically involves building and running Spring Boot applications.
  • Prerequisites: Java 21+, Podman/Docker.
  • Resources: Requires LLM providers (e.g., Ollama locally, or API keys for cloud providers).
  • Docs: Spring AI Reference Documentation

Highlighted Details

  • Demonstrates a wide array of LLM use cases: Chatbots, RAG, Semantic Search, Structured Data Extraction, Text Classification.
  • Covers multiple LLM interaction patterns: Prompting, Structured Output, Tool Calling, Chat Memory.
  • Includes data ingestion for RAG: JSON, Markdown, PDF, Text (Tika), with Metadata Enrichment and Splitting.
  • Showcases LLM and Vector Store Observability with various providers and PGVector.

Maintenance & Community

  • Project led by Thomas Vitale, with contributions from Spring AI core team members (Christian Tzolov, Mark Pollack).
  • Numerous conference talks and video series are linked, indicating active community engagement and education.

Licensing & Compatibility

  • Apache License 2.0.
  • Permissive license suitable for commercial use and integration into closed-source applications.

Limitations & Caveats

Some advanced features like Vector Stores, Evaluation, and Agents are marked as "Coming soon," indicating the project is still evolving.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
69 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.