Training & Retraining¶
The accuracy of the DBN Analytics POC API depends entirely on the quality of its training data stored in ChromaDB. This section explains everything you need to know about the RAG training lifecycle — from initial setup to ongoing refinement.
-
Understand how RAG training works and why it improves SQL accuracy.
-
Bootstrap the vector store from your database schema and first SQL examples.
-
Add, inspect, and remove training data using the training API endpoints.
-
Guidelines for writing high-quality training data that maximises accuracy.
Training API Endpoints at a Glance¶
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/training/data |
List all training records |
POST |
/api/v1/training/ddl |
Add a DDL (table schema) |
POST |
/api/v1/training/sql |
Add a question–SQL pair |
POST |
/api/v1/training/documentation |
Add a business documentation string |
POST |
/api/v1/training/from-database |
Auto-train from the live database schema |
DELETE |
/api/v1/training/{id} |
Remove a training record by ID |