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!