ProjectBuild an AI-Powered Digital Bank with RAG: the explanation · Module 13: Prompt versioning: changing the assistant safely · part 15 of 20
Part 15 · Module 13: Prompt versioning: changing the assistant safely

Module 13: Prompt versioning: changing the assistant safely

23 min read·
About 30 minutes · Needs: Module 6 (roles and permissions), Module 10 (the agent graph); Module 14 helps for the eval gate · Code: backend/app/services/prompt_service.py, backend/app/agent/prompts.py, backend/app/api/routes/prompts.py

Where this fits

WHERE THIS FITS The Kestrel Bank system this module CLIENT API LAYER FastAPI SAFETY AGENT LangGraph MODELS RETRIEVAL DATA AND INGESTION Postgres, Redis QUALITY Langfuse Customer app React Admin app React FastAPI REST + streaming Auth + RBAC tokens, roles Document upload admin only, checked Guardrails injection, PII Router small or large Agent LangGraph Banking tools ledger, transfers LLMs Groq, Gemini Retrieval hybrid + rerank Ingestion parse, chunk, embed PostgreSQL + pgvector ledger, chunks, state Redis limits, queue Observability Langfuse, metrics, logs Evaluation golden set, release gate
Prompt versions are written by the admin through the API, stored in Postgres, read by the agent, tested by the evals and copied to Langfuse (blue: this module).

This module is about how the assistant's instructions are stored, changed, tested and undone. It touches six parts of the map, but the core is one table and one small service.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan