From cf87654fa70f7388ac12c22f22661f387717bf4e Mon Sep 17 00:00:00 2001 From: Owen Gretzinger Date: Sat, 12 Jul 2025 00:51:55 -0400 Subject: [PATCH] style: improve summary prompt & visual --- README.md | 3 +- notetaker/Resources/DefaultSystemPrompt.txt | 34 +++++++++++++++------ notetaker/Views/RenderedNotesView.swift | 8 +++-- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 396800c..305ba4f 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,10 @@ Implemented: - Abilty to edit system prompt - Use your own API key - Auto updates +- Text formatting Todo: -- Markdown formatting -- Auto generate notes when recording is stopped - Different note templates Later: diff --git a/notetaker/Resources/DefaultSystemPrompt.txt b/notetaker/Resources/DefaultSystemPrompt.txt index 799b7ed..6fea503 100644 --- a/notetaker/Resources/DefaultSystemPrompt.txt +++ b/notetaker/Resources/DefaultSystemPrompt.txt @@ -3,18 +3,32 @@ Your job is to generate enhanced meeting notes for the following meeting: Title: {{meeting_title}} Date & Time: {{meeting_date}} +Here are important instructions: + + You will be provided with: - a transcript of the meeting - information the user provided as additional context - any additional notes the user manually noted down -Your enhanced meeting notes should include: +Your enhanced meeting notes should include the following sections: - the key discussion points - action items - decisions made - any deadlines or follow-up required -Create the meeting notes in markdown formatting, and only include these sections. The title, attendees, date, and other metadata must not be included as this information is already displayed elsewhere in the UI. Your job is the notes themselves only. +Include only these section headers, unless the user requests otherwise (see formatting_requests section). + +The title, attendees, date, and other metadata must not be included as this information is already displayed elsewhere in the UI. Your job is the notes themselves only. + +You have the following formatting options: +- Headings (markdown-like headings). Use 2 hashtags for headings (“## [heading]”) +- Bullet points & indented bullet points. Use 4 spaces to create an indented bullet point. + +Note that you cannot use asterisks to bold text or use any other types of formatting. + +Keep each bullet point concise (5-10 words), and avoid having too many with unimportant info. Prioritize clarity and readability. + Here are explanations of how to handle the different information you will be given: @@ -23,7 +37,9 @@ Transcripts use specific labels to identify speakers: - "Me": The user using this meeting notes application. Technically speaking, these utterances were picked up by the user's microphone. - "Them": The other person or other people in the meeting. Technically speaking, these utterances were picked up through system audio. -Audio transcription often mislabels speakers. Use context clues to infer the correct speaker. +If there is duplicated transcripts between "Me" and "Them", it means that it was actually "Them" who said it (most likely the user is playing the audio out loud on speakers). + +Keep in mind that transcripts are not always precise, so use context cues and intelligence to parse utterances. The transcript of the meeting is provided in tags below. @@ -45,15 +61,15 @@ Here are some examples of things the user may note down, how to recognize them, The user may note down key details they want to include in the meeting notes. -How to recognize: the user writes things down that are related to content you can see in the transcript. +How to recognize: there are notes that correspond to content you can see in the transcript. -How to handle: ensure they are included and prioritized in the enhanced meeting notes. +How to handle: ensure these details are included and prioritized in the enhanced meeting notes. The user may note down thoughts that they don't say out loud (ex. thoughts on a candidate they're interviewing). -How to recognize: the user writes things down that are not related to content you can see in the transcript. +How to recognize: there are notes that do not correspond to content in the transcript. How to handle: include in its own section, or tagged onto other points throughout where relevant. @@ -61,14 +77,14 @@ How to handle: include in its own section, or tagged onto other points throughou The user may note down formatting requests they want to include in the meeting notes. -How to recognize: the user provides a meeting notes structure without filling in the content (ex. they use hashtags to create markdown headers but don't fill in the content). +How to recognize: the user provides a meeting notes structure without filling in the content (ex. they use hashtags to create section headers but don't fill in the content). How to handle: structure the enhanced meeting notes according to the user's notes. -In general, the user's notes are very important. These are things that the user has specifically manually written down. +In general, the user's notes are very important. These are things that the user has specifically manually written down. These notes should be given the most attention when crafting the summary. -These notes are provided in tags below. +The user's notes are provided in tags below. diff --git a/notetaker/Views/RenderedNotesView.swift b/notetaker/Views/RenderedNotesView.swift index 59351eb..6968e77 100644 --- a/notetaker/Views/RenderedNotesView.swift +++ b/notetaker/Views/RenderedNotesView.swift @@ -29,14 +29,16 @@ struct RenderedNotesView: View { } else if let (indentLevel, bullet, content) = listItemInfo(for: line) { HStack(alignment: .firstTextBaseline, spacing: 4) { Text(bullet) - .foregroundColor(.gray) + .foregroundColor(.secondary) Text(content) - .foregroundColor(.gray) + .foregroundColor(.secondary) } .padding(.leading, CGFloat(indentLevel * 15)) + .frame(maxWidth: .infinity, alignment: .leading) } else { Text(trimmed) .foregroundColor(.primary) + .frame(maxWidth: .infinity, alignment: .leading) } } @@ -57,7 +59,7 @@ struct RenderedNotesView: View { private func listItemInfo(for line: String) -> (indentLevel: Int, bullet: String, content: String)? { let leadingSpaces = line.prefix(while: { $0 == " " }).count - let indentLevel = leadingSpaces / 2 + let indentLevel = leadingSpaces / 4 let remaining = String(line.dropFirst(leadingSpaces))