From a4107cdf6d53654275a678a79eff9962bcd02beb Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Mon, 22 Jul 2024 14:21:07 -0400 Subject: works better now --- src/client/views/nodes/ChatBox/tools/RAGTool.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/nodes/ChatBox/tools/RAGTool.ts') diff --git a/src/client/views/nodes/ChatBox/tools/RAGTool.ts b/src/client/views/nodes/ChatBox/tools/RAGTool.ts index c7175326c..23b93b0f0 100644 --- a/src/client/views/nodes/ChatBox/tools/RAGTool.ts +++ b/src/client/views/nodes/ChatBox/tools/RAGTool.ts @@ -3,6 +3,7 @@ import { Vectorstore } from '../vectorstore/VectorstoreUpload'; import { Chunk } from '../types'; import * as fs from 'fs'; import { Networking } from '../../../../Network'; +import { file } from 'jszip'; export class RAGTool extends BaseTool<{ hypothetical_document_chunk: string }> { constructor(private vectorstore: Vectorstore) { @@ -62,7 +63,7 @@ export class RAGTool extends BaseTool<{ hypothetical_document_chunk: string }> { 6. Structural Integrity Checks: a. Ensure all opening tags have corresponding closing tags. - b. Verify that all grounded_text tags have valid citation_index attributes. + b. Verify that all grounded_text tags have valid citation_index attributes (they should be equal to the associated citation(s) index field—not their chunk_id field). c. Check that all cited indices in grounded_text tags have corresponding citations. Example of grounded_text usage: -- cgit v1.2.3-70-g09d2