Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update insight prompt #10674

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 51 additions & 17 deletions packages/server/utils/OpenAIServerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,23 +296,57 @@ class OpenAIServerManager {
userPrompt?: string | null
): Promise<InsightResponse | null> {
if (!this.openAIApi) return null
const meetingURL = 'https://action.parabol.co/meet/'
const meetingURL = 'https://action.parabol.co/meet/[meetingId]'
const promptForMeetingData = `
You work at a start-up and you need to discover behavioral trends for a given team.
Below is a list of reflection topics in YAML format from meetings over recent months.
You should describe the situation in two sections with no more than 3 bullet points each.
The first section should describe the team's positive behavior in bullet points. One bullet point should cite a direct quote from the meeting, attributing it to the person who wrote it.
The second section should pick out one or two examples of the team's negative behavior and you should cite a direct quote from the meeting, attributing it to the person who wrote it.
When citing the quote, include the meetingId in the format of https://action.parabol.co/meet/[meetingId].
Prioritize topics with more votes.
Be sure that each author is only mentioned once.
Your tone should be kind and straight forward. Use plain English. No yapping.
Return the output as a JSON object with the following structure:
{
"wins": ["bullet point 1", "bullet point 2", "bullet point 3"],
"challenges": ["bullet point 1", "bullet point 2"]
}
`
You are a Team Lead and want to use your meeting data to help write a report on your team's performance. You care about team productivity, morale, roadblocks, relationships, and progress against goals. Below is a list of retrospective meeting summaries (in YAML format) from the past several months.

**Task:**
Analyze the provided meeting data and identify patterns in teamwork and collaboration. Focus on "wins" and "challenges" that appear in two or more different meetings, prioritizing trends that appear in the highest number of meetings. Reference those meetings by hyperlink. Prioritize trends that have received the most combined votes, if that information is available.

**Output Format:**
Return the analysis as a JSON object with this structure:
{
"wins": ["bullet point 1", "bullet point 2", "bullet point 3"],
"challenges": ["bullet point 1", "bullet point 2", "bullet point 3"]
}

**Instructions:**
1. **Wins (3 bullet points)**:
- Highlight positive trends or patterns observed across multiple meetings.
- Include at least one direct quote from one meeting, attributing it to its author.
- Link to the referenced meeting(s) using the format:
[<meeting title>](${meetingURL})
- Mention each author at most once across the entire output.
- Keep the tone kind, straightforward, and professional. Avoid jargon.

2. **Challenges (3 bullet points)**:
- Highlight trends or patterns that indicate areas for improvement.
- Include at least one direct quote from one meeting, attributing it to its author.
- Suggest a concrete action or next step to improve the situation.
- Link to the referenced meeting(s) using the format:
[<meeting title>](${meetingURL})
- Mention each author at most once across the entire output.
- Keep the tone kind, straightforward, and professional. Avoid jargon.

3. **References to Meetings**:
- Each bullet point in both "wins" and "challenges" should reference at least one meeting.
- Ensure that each cited trend is supported by data from at least two different meetings.

4. **Key Focus Areas**:
Consider the following when choosing trends:
- What is the team's core work? Are desired outcomes clear, and how are they measured?
- Who utilizes the team's work, and what do they need?
- Does the team collaborate effectively with related teams?
- How does the team prioritize its work?
- What factors speed up or slow down progress?
- What habits, rules, or rituals help or hinder performance?

5. **Translation**:
- If the source language of the meetings tends not to be English, identify the language and translate your output to this language

6. **Final Answer**:
- Return only the JSON object.
- No extraneous text, explanations, or commentary outside the JSON object.`

const promptForSummaries = `
You work at a start-up and you need to discover behavioral trends for a given team.
Expand All @@ -321,7 +355,7 @@ class OpenAIServerManager {
The first section should describe the team's positive behavior in bullet points.
The second section should pick out one or two examples of the team's negative behavior.
Cite direct quotes from the meeting, attributing them to the person who wrote it, if they're included in the summary.
Include discussion links included in the summaries. They must be in the markdown format of [link](${meetingURL}[meetingId]/discuss/[discussionId]).
Include discussion links included in the summaries. They must be in the markdown format of [link](${meetingURL}/discuss/[discussionId]).
Try to spot trends. If a topic comes up in several summaries, prioritize it.
The most important topics are usually at the beginning of each summary, so prioritize them.
Don't repeat the same points in both the wins and challenges.
Expand Down
Loading