Skip to content

feat: BehaviorSpace-aware experiment logging to CSV #56

Description

@JNK234

Roadmap priority: B7

Summary

Automatically log every prompt, response, model, and token count per BehaviorSpace run to CSV, so LLM behaviour can be analysed alongside model outputs.

Why it matters

Every demo that needed this built it by hand — demos/provider-sensitivity/ has its own CSV writing and a Python analysis script, and crisis-triage does the same. That per-demo scaffolding should be a feature.

Without it, a sweep tells you what happened in the model but not what the LLM said, so there is no way to correlate outcomes with prompts or drift.

What needs to be done

  1. Detect BehaviorSpace context and the current run number from the workspace.
  2. Auto-write a per-run CSV: run number, tick, agent id, prompt, response, model, provider, token counts, latency, error (if any).
  3. Config key to enable and to set the output path; off by default.
  4. Handle concurrent BehaviorSpace runs writing to the same target without interleaving corruption.
  5. Escape newlines and quotes properly — prompts and responses are multi-line free text, which naive CSV writing will break.

Open questions

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions