From 55a2ecaddff35ebca74e44e1083ba57521135cd3 Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 27 Dec 2023 13:41:17 +0100 Subject: [PATCH] minor rag updates --- electron/main/Prompts/Prompts.ts | 2 +- src/App.tsx | 1 - src/components/Chat/Chat.tsx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/electron/main/Prompts/Prompts.ts b/electron/main/Prompts/Prompts.ts index 320eaed8..cc650d3d 100644 --- a/electron/main/Prompts/Prompts.ts +++ b/electron/main/Prompts/Prompts.ts @@ -8,7 +8,7 @@ export function createRAGPrompt( const contents = entries.map((entry) => entry.content).join(" "); // Combine the contents with the query to form the final prompt - const prompt = `Given the following user-generated notes in a notetaking app: + const prompt = `Given the following notes: ### Notes start ### ${contents} ### Notes end ### diff --git a/src/App.tsx b/src/App.tsx index 335932e7..c8ca1ee9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -20,7 +20,6 @@ const App: React.FC = () => { }, []); const handleDirectorySelected = (directoryPath: string) => { - console.log("HANDLING DIRECTORY SELECTED"); setIsIndexing(true); // Start indexing setDirectory(directoryPath); // Trigger indexing in your main process here diff --git a/src/components/Chat/Chat.tsx b/src/components/Chat/Chat.tsx index 1e2834da..2eb285a7 100644 --- a/src/components/Chat/Chat.tsx +++ b/src/components/Chat/Chat.tsx @@ -73,7 +73,7 @@ const ChatWithLLM: React.FC = () => { if (messages.length <= 1) { const augmentedPrompt = await window.database.augmentPromptWithRAG( userInput, - 2 + 5 ); startStreamingResponse(augmentedPrompt); } else {