summaryrefslogtreecommitdiff
path: root/collaborativeagents/scripts/conflict_scenario_generator.py
diff options
context:
space:
mode:
authorYurenHao0426 <blackhao0426@gmail.com>2026-02-10 20:16:36 +0000
committerYurenHao0426 <blackhao0426@gmail.com>2026-02-10 20:16:36 +0000
commit5626080ca4c4219aec4888d6b9406d0d3349fb55 (patch)
tree86287d9fd5833e11ccd78566992540f2664fd195 /collaborativeagents/scripts/conflict_scenario_generator.py
parenta2036838807428424bbbaff507a6563749a83145 (diff)
Add RAG rewrite, 60-session experiment scripts, and analysis tools
- RAG rewrite adapter and vector preference pipeline in personalized_llm - 60-session experiment queue scripts (reflection, rag, rag_vector, rag_rewrite) - Vector-preference correlation analysis and visualization scripts - Local reward model batch processing improvements - Updated CLAUDE.md with full experiment documentation and notes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'collaborativeagents/scripts/conflict_scenario_generator.py')
-rw-r--r--collaborativeagents/scripts/conflict_scenario_generator.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/collaborativeagents/scripts/conflict_scenario_generator.py b/collaborativeagents/scripts/conflict_scenario_generator.py
index 9d00de8..eaf8ef2 100644
--- a/collaborativeagents/scripts/conflict_scenario_generator.py
+++ b/collaborativeagents/scripts/conflict_scenario_generator.py
@@ -367,11 +367,14 @@ class ConflictScenarioGenerator:
# Find conflict groups in these preferences
conflict_groups = {}
for pref in preferences:
- cg = pref.get('conflict_group')
- if cg:
- if cg not in conflict_groups:
- conflict_groups[cg] = []
- conflict_groups[cg].append(pref)
+ # Handle both dict preferences (with conflict_group) and string preferences
+ if isinstance(pref, dict):
+ cg = pref.get('conflict_group')
+ if cg:
+ if cg not in conflict_groups:
+ conflict_groups[cg] = []
+ conflict_groups[cg].append(pref)
+ # String preferences don't have conflict groups - skip them
# Find a conflict group with at least 2 preferences
for cg, prefs in conflict_groups.items():