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
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Writes docs/output/13-dependencies.txt: which artifact brings what, straight from Maven.
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p docs/output target
mvn -B dependency:tree -DoutputFile=target/tree.txt >/dev/null
OUT=docs/output/13-dependencies.txt
{
echo "# Dependency tree, filtered"
echo
echo "## Spring Boot and Spring AI versions"
echo "spring-boot-starter-parent $(grep -A2 'spring-boot-starter-parent' pom.xml | grep -m1 -o '<version>[^<]*' | sed 's/.*>//')"
echo "spring-ai-bom $(grep -m1 -o '<spring-ai.version>[^<]*' pom.xml | sed 's/.*>//')"
echo
echo "## where spring-jdbc comes from (it is not under any Spring AI artifact)"
grep -n -E 'spring-jdbc|spring-boot-starter-jdbc|spring-boot-jdbc|HikariCP' target/tree.txt
echo
echo "## what the pgvector starter brings"
grep -A8 'spring-ai-starter-vector-store-pgvector' target/tree.txt | sed -n 1,8p
echo
echo "## every Spring AI artifact on the classpath"
grep -o 'org.springframework.ai:[a-z0-9-]*:jar:[0-9.]*' target/tree.txt | sort -u
} > "$OUT"
echo "wrote $OUT"