Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Retrieval-Augmented Generation (RAG) with MariaDB vector search and OpenAI API

NotificationsYou must be signed in to change notification settings

mariadb-developers/mariadb-rag-demo-java

 
 

Repository files navigation

This demo shows how to build a Retrieval-Augmented Generation (RAG) applicationusingMariaDB,OpenAI API, andJava (with no AI frameworks for learning purposes).

Prerequisites

Setup

  1. Set theOPENAI_API_KEY environment variable to your OpenAI API key. For example (Linux/MacOS):
export OPENAI_API_KEY=sk-example1234567890abcdef1234567890abcdef
  1. Start MariaDB (see thedocker-compose.yml file):
docker compose up -d
  1. Check that MariaDB started successfully:
docker logs mariadb

Calculate the vector embeddings

To calculate the vector embeddings for all the products in the database, run:

./ComputeVectors.java

Run the chat demo

To run the chat demo, execute the following:

./ChatDemo.java

About

Retrieval-Augmented Generation (RAG) with MariaDB vector search and OpenAI API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell32.3%
  • Shell29.7%
  • Java24.9%
  • Batchfile13.1%

[8]ページ先頭

©2009-2025 Movatter.jp