- OpenAI
- Can we specify JSON output? Yes
- Can we use the free plan? Rate limits are a downside unless we want to spend some $$; we can probably get ~$50 approved
- Gemini
- Can we specify JSON output? Gemini API doesn’t have a JSON mode but we can tell it to return JSON and it returns JSON just fine.
- Can we use the free plan? TBD
Option 1 - Preferred
- Send the raw Slack JSON output for the day, see: https://viget.slack.com/archives/C06R09Y92FN/p1711648728821399
Option 2 - Backup
- Send JSON of Mentions from our app
- Claire will share example
Option 1
- Parse raw Slack JSON for Book Mentions
- Analyze each detected Mention for sentiment
- Write summary for each detected Mention
- Return valid JSON of Mentions with: Book Title,
user
,ts
,thread_ts
, sentiment, summaryuser
,ts
,thread_ts
will pass through straight from the input
Option 2
- Parse Mentions JSON from our app
- Analyze each Mention for sentiment
- Write summary for each Mention
- Return valid JSON for each Mention with id, sentiment, and summary
Prompt Engineering
- Book Title
- Is a string and corresponds to the name of the book mentioned
- Do not need to include the name of the author or any text formatting in the “book” field
- If you detect that a book is mentioned only in comparison to a previous book mentioned, I'd like you not to include it as a Mention. Instead. I'd like you to include any books mentioned in comparison within the summarized comments of the original book.
- Sentiment
- Is a string and should be one of either “positive”, “negative”, or “neutral”
- If you don't have enough information to assess sentiment, use "neutral"
- Do we want to fine-tune any of the sentiment analysis? (in Claire's explorations, OpenAI tended to underestimate sentiment)
- Summary
- Is a string that summarizes the reader's comments in a complete sentence no more than 30 words.
- The sentence should begin with the value in the “first_name” field from the “user_profile” object
- Do we want to fine-tune any of the summarization?