DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to evolve a prompt against your own labeled examples with Agentdescent

Point the evolve call at your question and answer rows to get an improved prompt.

Short answer: pip install "agentdescent>=0.7.0"; then export OPENAI_BASE_URL=https://api.deepseek.com (or your own endpoint, such as a local vLLM); export OPENAI_API_KEY=sk-... (your key for that endpoint). All steps.

Credentials. The API key is read from the environment, so keep it out of the script and out of any committed file.

Who it is forAn AI engineer with a set of question and answer pairs who needs a better system prompt for a model they already call through an OpenAI-compatible endpoint.

The problemHand-tuning a prompt against examples is slow, and it is hard to tell which edit actually helped.

The outcomeAn evolved prompt printed with its held-out reward, scored on examples the loop did not train on.

What you need first

  • Python 3.9 or newer
  • pip to install the agentdescent package from PyPI
  • For model-backed runs: an OpenAI-compatible endpoint, its base URL, and an API key set in environment variables (OPENAI_BASE_URL and OPENAI_API_KEY)
  • For agent-plugin use: Claude Code or Codex installed, and git to clone the repo

Steps

  1. pip install "agentdescent>=0.7.0"
  2. export OPENAI_BASE_URL=https://api.deepseek.com (or your own endpoint, such as a local vLLM)
  3. export OPENAI_API_KEY=sk-... (your key for that endpoint)
  4. Write a Python script that builds tasks with tasks_from(rows, prompt="question", gold="answer"), then calls evolve(tasks, scorer("exact"), run=run, propose=reflector(model), strategy=SingleSlot(initial_value="You are a helpful assistant."), rounds=8, n_workers=8, max_concurrency=8, held_out_frac=0.3, patience=3, target_reward=0.98). (inferred, check the README)
  5. Run the script and read result.rendered, result.final_reward, and result.outcomes().

Prompt for your agent

In the AgentDescent repo, build a script that loads <path to your CSV of question and answer rows> into tasks and runs evolve with SingleSlot and exact scoring. Expected output: the evolved prompt, the held-out reward, and the outcomes list. Verify that the held-out reward is reported separately from training results.

Caveat. The README's worked example uses the HotpotQA dataset and a DeepSeek model, and its reported gain is for that setup only.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Birfy/agentdescent and "Evolve a prompt against your own labeled examples"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer