What is the expected behavior of the adapter TracerTraceToTriplet?

Open
#432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start at TracerTraceToTriplet.adapt and reproduce the behavior with trainer.dev using the spider example and LangGraph. Compare the collected span attributes with the generated Triplets, then trace how prompt, response, and reward fields are populated. Done means the expected field and reward lifecycle is established and documented or the affected behavior is corrected.

Written by the indexing model from the issue text.

Description

adapter question v0.x

While inspecting the generated training data (and potentially modifying it), I ran trainer.dev and set a breakpoint in TracerTraceToTriplet.adapt. I noticed that although the span successfully collected the LLM’s prompt and response, the converted TracerToTriplet had empty prompt and response fields. Is this the intended behavior? If so, when will these fields be populated?

  • span attributes:
Image
  • Triplets:
Image

Additionally, I observed that only the last Triplet had a non-None reward. Will the other None rewards be filled later with the final reward? Also, if I manually assign non-None intermediate rewards to earlier steps here, will they be overwritten by the final reward?

Note: My project is based on the spider example, and the agent is implemented with LangGraph.

Dominant language
Python
Stars
18.4k
Forks
1.6k
Avg merge
2d 8h
Merged PRs (30d)
27

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/agent-lightning

All issues in microsoft/agent-lightning

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.