Skip to content

Generate session titles using LLM #23

Description

@PriyangaPKini

Summary

Currently session titles are set to the raw first question text (truncated at 80 chars). Instead, use a lightweight LLM call to generate a concise, descriptive title from the first question + response.

Approach

  • After the first ask() completes in wrapSession, fire a background LLM call (e.g. Haiku) with the question and response
  • Generate a short title (5-10 words)
  • Update the session title via updateSessionTitle
  • Title appears in sidebar after a short delay (non-blocking)

Considerations

  • Adds latency and cost per new session (mitigate with a cheap/fast model)
  • Should be async/non-blocking so it doesn't delay the response
  • Fallback to raw question text if the LLM call fails

Priority: Low

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