Skip to content

Add optional takeaways to article summaries - #10

Merged
jgordijn merged 2 commits into
mainfrom
optional-takeaways
Mar 4, 2026
Merged

jgordijn merged 2 commits into
mainfrom
optional-takeaways

Conversation

@jgordijn

@jgordijn jgordijn commented Mar 4, 2026

Copy link
Copy Markdown
Owner

What

Adds optional key takeaways (up to 5 bullet points) to article summaries, inspired by the tldr skill's structured output format.

The LLM decides whether takeaways add value — they're included only for longer or more complex articles where the 2-4 sentence summary doesn't cover all key points.

Changes

  • Backend: Added takeaways JSON field to entries collection (via migration)
  • Backend: Extended SummaryResult struct with optional Takeaways []string
  • Backend: Updated LLM prompt to optionally request takeaways
  • Backend: SummarizeAndScore stores takeaways when present, skips when absent
  • Frontend: EntryCard.svelte conditionally renders takeaways as a compact bullet list below the summary
  • Tests: 4 new test cases for parsing and storage (with/without takeaways)

Not changed

  • ScoreOnly path — fragments don't get takeaways
  • Existing entries — no retroactive generation
  • Summary format — still 2-4 sentences

Coverage

  • ai package: 92.0%
  • Overall: 85.8%

jgordijn added 2 commits March 2, 2026 15:24
- Add takeaways JSON field to entries collection (migration + testutil)
- Extend SummaryResult struct with optional Takeaways []string
- Update LLM prompt to request takeaways for long/complex articles
- Store takeaways on entry when present, skip when absent
- Add 4 new test cases for takeaway parsing and storage
- Render takeaways as compact bullet list in EntryCard.svelte
- ScoreOnly path unchanged (no takeaways for fragments)
@jgordijn
jgordijn merged commit 4f2c8c3 into main Mar 4, 2026
1 check passed
@jgordijn
jgordijn deleted the optional-takeaways branch March 4, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant