llm-apps-java-spring-ai  by ThomasVitale

Java Spring AI samples for building LLM-powered applications

Created 1 year ago
634 stars

Top 52.3% 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 weeks ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
0
Star History
28 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Tom Moor Tom Moor(Head of Engineering at Linear; Founder of Outline), and
5 more.

promptable by cfortuner

0%
2k
TS/JS library for building full-stack AI apps
Created 2 years ago
Updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
2 more.

awesome-llm-apps by Shubhamsaboo

2.6%
69k
LLM app collection with AI agents and RAG examples
Created 1 year ago
Updated 3 days ago
Feedback? Help us improve.