Commit graph

2 commits

Author SHA1 Message Date
d60d337da3 feat: expand signal extraction — positive reinforcement, teaching, soft redirects
Some checks failed
Tests / test (push) Failing after 5s
- Renamed to 'Preference & Learning Pair Extractor'
- NEW: Positive reinforcement detection (praise, affirmation, emoji, accept+continue)
- NEW: Teaching moment detection (rules, explanations, reminders, preferences)
- NEW: Soft redirect detection (let's rather, alternative plan, switch to)
- Outputs: DPO pairs, SFT pairs (alpaca format), teaching pairs
- Improved false positive filters (subagent output, apt, system messages)
- 4x more training signal: 3 → 11 pairs from same 30-day window
- 446 tests passing
2026-02-12 10:23:31 +01:00
a3764c627d feat: DPO preference pair extractor
Some checks failed
Tests / test (push) Failing after 5s
- Extracts Direct Preference Optimization training pairs from session transcripts
- Detects corrections via regex patterns (direct, redirect, frustration, forgotten, etc.)
- Supports session JSONL files (primary) and NATS events (fallback)
- Async NATS fetching via nats-py ordered consumer for bulk reads
- Outputs training format (prompt/chosen/rejected) and detailed format with metadata
- 41 tests covering correction detection, false positives, event parsing, pair building
- CLI: python -m cortex.dpo_extractor --since 30d --source sessions --dry-run
2026-02-12 10:01:32 +01:00