Skip to main content

What is This?

The Problem: Writing good prompts for AI agents is hard. You write a prompt, test it, tweak it, test again… it takes forever. The Solution: Let your agent learn from real users and automatically improve its prompts over time.

Simple Analogy

Imagine you’re teaching someone to answer customer questions: Old Way (Manual):
  • You write instructions
  • They answer questions
  • You manually rewrite instructions based on what worked
  • Repeat forever ❌
New Way (DSPy + Bindu):
  • You write basic instructions
  • They answer questions
  • Users say “good answer” or “bad answer”
  • The system automatically learns what works
  • Instructions improve themselves ✅

How It Works (Simple Steps)

1. Your agent answers questions (with basic prompts)

2. Users give feedback: 👍 "Good answer" or 👎 "Bad answer"

3. Bindu collects all the 👍 good examples

4. DSPy studies what made them good

5. DSPy rewrites your prompts to be better

6. Your agent is now smarter! 🎉
In One Sentence: Your agent learns from real users and gets better automatically.

Why This is Amazing

Without This:
  • You spend hours tweaking prompts ⏰
  • You guess what works 🤔
  • Your agent stays the same forever 📉
  • You don’t know if changes help or hurt ❓
With This:
  • Your agent learns from real users 👥
  • It improves automatically 🤖
  • It gets smarter over time 📈
  • You see exactly what works 📊

How to Use It

Step 1: Users Give Feedback

Bindu automatically tracks everything. Users just rate responses:
from bindu import bindufy

agent = bindufy(my_agent, config, handler)

# That's it! Bindu tracks all interactions automatically.
# Users can rate responses:
# ⭐⭐⭐⭐⭐ "Perfect answer!"
# ⭐⭐⭐⭐ "Good, but could be better"
# ⭐⭐ "Not helpful"
What happens:
  • Every conversation is saved
  • Users rate how helpful the answer was
  • Bindu remembers which answers got 5 stars ⭐⭐⭐⭐⭐

Step 2: Collect the Good Examples

from bindu.dspy import create_golden_dataset

# Get all the 5-star examples
golden_dataset = create_golden_dataset(
    agent_id="my-agent",
    min_rating=4,  # Only grab 4 and 5 star responses
    limit=100       # Get 100 examples
)

# Save them
golden_dataset.export("good_examples.json")
What this does:
  • Finds all your best responses (4+ stars)
  • Saves them in a file
  • These become your “teaching examples”

Step 3: Test the New Version Safely

Bindu lets you test improved prompts without breaking things:
agent = bindufy(my_agent, config, handler)

# Your original prompts
agent.deploy_prompt_version("v1", "original.json")

# DSPy's improved prompts
agent.deploy_prompt_version("v2", "improved.json")

# Test carefully: send 10% of users to new version
agent.set_routing({
    "v1": 0.9,  # 90% get old version (safe)
    "v2": 0.1   # 10% get new version (testing)
})

# If v2 is better, gradually increase:
agent.set_routing({
    "v1": 0.5,  # 50% old
    "v2": 0.5   # 50% new
})

# If v2 is worse, easy to go back:
agent.set_routing({
    "v1": 1.0,  # Everyone back to old version
    "v2": 0.0
})
Why this is safe:
  • Start with 10% of users (if it breaks, only 10% affected)
  • Compare which version gets better ratings
  • Gradually increase if it’s working
  • Instantly rollback if something goes wrong

Real Examples

Customer Support Agent:
  • Answers customer questions
  • Customers rate answers
  • Learns which answers make customers happy
  • Gets better at helping customers
Research Agent:
  • Finds information for users
  • Users rate accuracy
  • Learns what “good research” looks like
  • Becomes more accurate over time
Code Helper:
  • Writes code for developers
  • Developers say if code works
  • Learns what “good code” means
  • Writes better code next time
Data Analyst:
  • Analyzes data and gives insights
  • Users verify if insights are correct
  • Learns what makes good analysis
  • Provides better insights

Current Status

🚀 In Progress - We’re building this now!

The Big Picture

Traditional AI Agent:
You write prompts → Agent uses them forever → Never improves
Bindu + DSPy Agent:
You write basic prompts → Agent learns from users → Gets better automatically → Keeps improving

Simple Summary

What DSPy Does: Automatically rewrites your prompts to make them better What Bindu Does: Collects real user feedback so DSPy knows what “better” means Together: Your agent learns from real users and improves itself over time You Get:
  • Smarter agents without manual work ✅
  • Learning from real usage, not guessing ✅
  • Safe testing before full rollout ✅
  • Continuous improvement ✅

Want to Learn More?

  • Technical Details - Read about DSPy
  • Ask Questions - Join our Discord
  • Request Features - Tell us what you need!