Email the Author

You can use this page to email Fu Cheng about Text-to-SQL, Spring AI Implementation with RAG.

Please include an email address so the author can respond to your query

This message will be sent to Fu Cheng

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

Building AI applications is very popular these days. For Java developers, the best choice for building AI applications is using Spring AI. To learn how to use Spring AI to build AI applications, we need to have a concrete example. Text-to-SQL, is a typical usage of using AI to improve productivity. By using Text-to-SQL, non-technical people use natural language to describe database query requirements. These queries are sent to LLM. LLM can generate SQL statements to answer user queries. LLM can also use tools to execute SQL statements, and return the query results to the user. Text-to-SQL is a good example of AI applications.

In this book, we will use Spring AI to create a Text-to-SQL application. After learning this course, you will know:

- How to use ChatClient to send requests to LLM and receive responses.

- How to extract database metadata and include them in the prompt sent to LLM.

- How to use Spring AI advisors to intercept ChatClient requests to process requests and responses.

- How to use embedding model and vector store to implement semantic search of database metadata.

- How to use LLM to generate summary of database tables and SQL statements.

- How to use LLM to re-select tables automatically.

- How to allow user to manually re-select tables using message history.

- How to execute and validate SQL statements using functions.

- How to use Spring Cloud Function to deploy Text-to-SQL application and metadata indexer as serverless functions and run them on AWS Lambda.

This book covers all major aspects of Spring AI, including ChatClient, advisors, embedding models, vector stores, chat memory and function calling.

What you have learned in this book, can help you build other AI applications using Spring AI.


About the Author

Fu Cheng’s avatar Fu Cheng

@alexcheng1982

Full-stack software developer and content creator.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Text-to-sql › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss