Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.
TypeScript ai-meeting-assistantai-notetakerelectrongranola-alternativelinuxllama-cpplocal-ailocal-firstmacosmcpmeeting-minutesmeeting-notesoffline-firstopen-sourceprivacyspeech-to-texttranscriptionwhisperwhisper-cppwindows
Ask: knows it is Yogurt's Ask and what it can do, so 'what can you do' gets a real answer
christianmat96a9fbbd323d
diff --git a/app/src/main/askAbout.ts b/app/src/main/askAbout.tsnew file mode 100644index 00000000..549b718a--- /dev/null+++ b/app/src/main/askAbout.ts@@ -0,0 +1,5 @@+/**+ * Who Ask is, for both Asks (one meeting, all meetings). Without it "what can you do" got "the transcript does not+ * say": the model only knew it was reading meetings. Kept short, since every question reads it. Never translated.+ */+export const aboutAsk = "About you: you are Ask, in Yogurt, a private meeting notes app that runs entirely on this computer. You answer questions about the person's meetings (transcripts, notes, summaries) and cite them. You can't join calls, browse the web or change settings. Asked about yourself or what you can do, answer briefly from this, not from the meetings."diff --git a/app/src/main/chat.ts b/app/src/main/chat.tsindex ef38eb13..b3666975 100644--- a/app/src/main/chat.ts+++ b/app/src/main/chat.ts@@ -4,6 +4,7 @@ import type { NotesModel } from './notes/model'import type { Queue } from './notes/queue'import { transcriptHead, transcriptText } from './notes/enhance'import { meetingWords, respell, spellingLine } from './vocab'+import { aboutAsk } from './askAbout'import type { AskStep, ChatTurn, ChatView } from '../shared/types'/**@@ -132,6 +133,9 @@ export function chatPrompt(i: { context: string; question: string; history: Hist'Answer the question below about this meeting, for the person who recorded it ("You" in the transcript).',...(i.history.length ? ['', 'Earlier in this chat:', ...i.history.flatMap((h) => ['<asked>', h.question, '</asked>', '<answered>', h.answer, '</answered>'])] : []),'',+ // after the transcript, not before it: the start stays the notes prompt's, so the model keeps the meeting read+ aboutAsk,+ '','How to answer:','- Answer in the language the question is written in.','- Use only what was said in the meeting and what is in the notes. If the answer is not there, say so in a sentence. Never make anything up.',diff --git a/app/src/main/library/prompt.ts b/app/src/main/library/prompt.tsindex 60d693e2..dee5300b 100644--- a/app/src/main/library/prompt.ts+++ b/app/src/main/library/prompt.ts@@ -2,6 +2,7 @@ import { peopleRule } from '../notes/enhance'import { clock } from '../../shared/transcript'import type { Item } from './retrieve'import { CITE } from '../../shared/citations'+import { aboutAsk } from '../askAbout'/*** The prompt for a question across meetings. It starts with the same instructions every time, byte for byte, so the@@ -10,6 +11,8 @@ import { CITE } from '../../shared/citations'* translated.*/export const libraryHead = [+ aboutAsk,+ '','You answer questions about the person\'s own meetings. After these instructions come parts of their meetings that were found for the question, grouped by meeting, each part numbered like [1]: pieces of transcripts, or the notes written after a meeting. In a transcript each line starts with who said it: "You" is the person asking, a name is someone on the call, and "Them" is the other side of the call when no name is known.','','How to answer:',diff --git a/app/test/askAbout.test.ts b/app/test/askAbout.test.tsnew file mode 100644index 00000000..ed1f18e9--- /dev/null+++ b/app/test/askAbout.test.ts@@ -0,0 +1,27 @@+import { describe, expect, it } from 'vitest'+import { aboutAsk } from '../src/main/askAbout'+import { chatPrefix, chatPrompt } from '../src/main/chat'+import { libraryHead, libraryPrompt } from '../src/main/library/prompt'++describe('Ask knows what it is', () => {+ it('is short: a few tokens, not a manual', () => {+ expect(aboutAsk.length).toBeLessThanOrEqual(400)+ // about 4 characters a token+ expect(Math.ceil(aboutAsk.length / 4)).toBeLessThanOrEqual(100)+ expect(aboutAsk).toMatch(/Yogurt/)+ expect(aboutAsk).toMatch(/on this computer/)+ expect(aboutAsk).toMatch(/can't join calls, browse the web or change settings/)+ })++ it('is in the instructions every question across meetings starts with, even when no meeting matched', () => {+ expect(libraryHead).toContain(aboutAsk)+ expect(libraryPrompt({ items: [], question: 'what can you do', history: [], now: 0, spelling: '' })).toContain(aboutAsk)+ })++ it('is in a question about one meeting, after the transcript, so the start the notes share stays the same', () => {+ const p = chatPrompt({ context: '<transcript>\nYou: hi\n</transcript>', question: 'what can you do', history: [], recording: false })+ expect(p).toContain(aboutAsk)+ expect(chatPrefix('ctx')).not.toContain(aboutAsk)+ expect(p.indexOf(aboutAsk)).toBeGreaterThan(p.indexOf('</transcript>'))+ })+})