aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ChatBox/tools')
-rw-r--r--src/client/views/nodes/ChatBox/tools/CollectionTool.ts0
-rw-r--r--src/client/views/nodes/ChatBox/tools/RAGTool.ts9
2 files changed, 9 insertions, 0 deletions
diff --git a/src/client/views/nodes/ChatBox/tools/CollectionTool.ts b/src/client/views/nodes/ChatBox/tools/CollectionTool.ts
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/client/views/nodes/ChatBox/tools/CollectionTool.ts
diff --git a/src/client/views/nodes/ChatBox/tools/RAGTool.ts b/src/client/views/nodes/ChatBox/tools/RAGTool.ts
index 185efa0ba..36e4bc3ce 100644
--- a/src/client/views/nodes/ChatBox/tools/RAGTool.ts
+++ b/src/client/views/nodes/ChatBox/tools/RAGTool.ts
@@ -39,6 +39,7 @@ export class RAGTool extends BaseTool<{ hypothetical_document_chunk: string }> {
!!!IMPORTANT Before you close the tag with </answer>, within the answer tags provide a set of 3 follow-up questions inside a <follow_up_questions> tag and individually within <question> tags. These should relate to the document, the current query, and the chat_history and should aim to help the user better understand whatever they are looking for.
Also, ensure that the answer tags are wrapped with the correct step tags as well.`,
+
`Performs a RAG (Retrieval-Augmented Generation) search on user documents and returns a
set of document chunks (either images or text) that can be used to provide a grounded response based on
user documents
@@ -49,6 +50,14 @@ export class RAGTool extends BaseTool<{ hypothetical_document_chunk: string }> {
);
}
+ changeSummaries(summaries: string) {
+ this.briefSummary = `Performs a RAG (Retrieval-Augmented Generation) search on user documents and returns a set of document chunks (either images or text) that can be used to provide a grounded response based on user documents.
+
+!!!IMPORTANT Use the RAG tool ANYTIME the question may potentially (even if you are not sure) relate to one of the user's documents.
+Here are the summaries of the user's documents:
+${summaries}`;
+ }
+
async execute(args: { hypothetical_document_chunk: string }): Promise<any> {
const relevantChunks = await this.vectorstore.retrieve(args.hypothetical_document_chunk);
return this.getFormattedChunks(relevantChunks);