-
Notifications
You must be signed in to change notification settings - Fork 318
Description
DSPy Integration (Simple)
Goal:
Make every Bindu agent improve itself over time — safely.
The idea (one simple flow)
-
Users give feedback
Each agent response can be rated (⭐ 1–5 or good / bad). -
Feedback is stored
All interactions and ratings are stored in Postgres. -
Create a golden dataset
A script reads Postgres and selects the best-rated interactions.
These become the golden dataset. -
DSPy improves the prompt
DSPy reads the golden dataset and generates improved prompt suggestions
(better instructions, clearer examples, fewer mistakes). -
Deploy safely (canary style)
The new prompt is deployed alongside the old one.
Traffic is split using a ratio:- 90% → old prompt
- 10% → new prompt
-
Promote or roll back
If the new prompt performs better, increase traffic.
If not, instantly roll back.
What this enables
- Prompts improve using real user feedback
- No manual prompt tweaking in production
- Changes are measurable, reversible, and safe
- Works with existing Bindu agents and handlers
Mental model
Users rate → data improves → prompts evolve → traffic shifts
Bindu is the feedback loop.
DSPy is the optimizer.
Routing keeps everything safe.
What Bindu owns
- Interaction + feedback storage (Postgres)
- Golden dataset generation
- Prompt versioning
- Traffic routing (old vs new)
- Instant rollback
DSPy is simply the optimization engine in the middle.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status