Add rag module: Spring AI 2.0 RAG with pgvector, chunking, reranking and a faithfulness check

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
This commit is contained in:
Claude
2026-09-21 19:09:05 +00:00
commit 1d4625a1c2
62 changed files with 3715 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Regenerates everything under docs/output/.
#
# scripts/run-all.sh uses RAG_PG_URL if set, otherwise starts PostgreSQL with scripts/pg-up.sh
# docker compose up -d && RAG_PG_URL=jdbc:postgresql://localhost:5432/ragdb scripts/run-all.sh
#
# No API key is needed: the tests use scripted stand-ins for the chat and embedding models.
set -euo pipefail
cd "$(dirname "$0")/.."
if [ -z "${RAG_PG_URL:-}" ]; then
scripts/pg-up.sh
export RAG_PG_URL="jdbc:postgresql://127.0.0.1:${PGPORT:-5439}/ragdb"
fi
mvn -B -q test # transcripts 01-11 and 15 (each test writes one and asserts the same numbers)
scripts/capture-javap.sh # 12
scripts/capture-dependencies.sh # 13
scripts/capture-legacy-compile.sh # 14
ls docs/output