playground-flight-booking  by tzolov

Spring AI demo for building an expert system

created 1 year ago
266 stars

Top 96.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project demonstrates building an AI-powered expert system for flight booking using Spring AI. It targets developers looking to integrate Retrieval Augmented Generation (RAG) and function calling capabilities into their Spring Boot applications, enabling LLMs to access external data and perform actions.

How It Works

The system leverages Spring AI to orchestrate interactions with Large Language Models (LLMs). It incorporates RAG to provide the LLM with access to flight booking terms and conditions, allowing for informed responses. Additionally, it utilizes function calling to enable the LLM to invoke Java methods, simulating actions like searching for flights or making bookings.

Quick Start & Requirements

  • Install/Run: Build the JAR with ./mvnw clean install -Pproduction and run with java -jar ./target/playground-flight-booking-0.0.1-SNAPSHOT.jar. A PostgreSQL database is required (e.g., docker run -it --rm --name postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres ankane/pgvector).
  • Prerequisites: Java 17+, an OpenAI API key (or keys for VertexAI, Azure OpenAI, Groq, Anthropic), and configured API keys/endpoints in application.properties.
  • Links: Spring AI Documentation

Highlighted Details

  • Supports multiple LLM providers: OpenAI, VertexAI Gemini, Azure OpenAI, Groq, and Anthropic Claude 3.
  • Demonstrates RAG for accessing external data (terms and conditions).
  • Implements function calling for LLM-driven action execution via Java methods.
  • Provides configuration examples for various LLM providers.

Maintenance & Community

This appears to be a demo project by a single contributor (tzolov). Further community or maintenance information is not readily available in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The project is presented as a demo, and its production readiness, scalability, and error handling are not elaborated upon. The specific LLM models used are mentioned, but performance benchmarks or comparisons are absent.

Health Check
Last commit

2 months ago

Responsiveness

1+ week

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

Explore Similar Projects

Feedback? Help us improve.