Pre Kiro
This commit is contained in:
@@ -94,7 +94,7 @@ APPENDIX
|
||||
}
|
||||
|
||||
async function testFullIntegration() {
|
||||
console.log('🧪 Testing Full Document AI + Genkit Integration...\n');
|
||||
console.log('🧪 Testing Full Document AI + Agentic RAG Integration...\n');
|
||||
|
||||
let testFile = null;
|
||||
|
||||
@@ -236,20 +236,20 @@ async function testFullIntegration() {
|
||||
console.log(` 🏷️ Entities found: ${documentAiOutput.entities.length}`);
|
||||
console.log(` 📋 Tables found: ${documentAiOutput.tables.length}`);
|
||||
|
||||
// Step 6: Test Genkit Integration (Simulated)
|
||||
console.log('\n6. Testing Genkit AI Analysis...');
|
||||
// Step 6: Test Agentic RAG Integration (Simulated)
|
||||
console.log('\n6. Testing Agentic RAG AI Analysis...');
|
||||
|
||||
// Simulate Genkit processing with the Document AI output
|
||||
const genkitInput = {
|
||||
// Simulate Agentic RAG processing with the Document AI output
|
||||
const agenticRagInput = {
|
||||
extractedText: documentAiOutput.text,
|
||||
fileName: testFile.testFileName,
|
||||
documentAiOutput: documentAiOutput
|
||||
};
|
||||
|
||||
console.log(' 🤖 Simulating Genkit AI analysis...');
|
||||
console.log(' 🤖 Simulating Agentic RAG AI analysis...');
|
||||
|
||||
// Simulate Genkit output based on the CIM analysis prompt
|
||||
const genkitOutput = {
|
||||
// Simulate Agentic RAG output based on the CIM analysis prompt
|
||||
const agenticRagOutput = {
|
||||
markdownOutput: `# CIM Investment Analysis: TechFlow Solutions Inc.
|
||||
|
||||
## Executive Summary
|
||||
@@ -360,19 +360,19 @@ async function testFullIntegration() {
|
||||
5. Team background verification
|
||||
|
||||
---
|
||||
*Analysis generated by Document AI + Genkit integration*
|
||||
*Analysis generated by Document AI + Agentic RAG integration*
|
||||
`
|
||||
};
|
||||
|
||||
console.log(` ✅ Genkit analysis completed`);
|
||||
console.log(` 📊 Analysis length: ${genkitOutput.markdownOutput.length} characters`);
|
||||
console.log(` ✅ Agentic RAG analysis completed`);
|
||||
console.log(` 📊 Analysis length: ${agenticRagOutput.markdownOutput.length} characters`);
|
||||
|
||||
// Step 7: Final Integration Test
|
||||
console.log('\n7. Final Integration Test...');
|
||||
|
||||
const finalResult = {
|
||||
success: true,
|
||||
summary: genkitOutput.markdownOutput,
|
||||
summary: agenticRagOutput.markdownOutput,
|
||||
analysisData: {
|
||||
company: 'TechFlow Solutions Inc.',
|
||||
industry: 'SaaS / Enterprise Software',
|
||||
@@ -393,7 +393,7 @@ async function testFullIntegration() {
|
||||
],
|
||||
exitStrategy: 'IPO within 3-4 years, $500M-$1B valuation'
|
||||
},
|
||||
processingStrategy: 'document_ai_genkit',
|
||||
processingStrategy: 'document_ai_agentic_rag',
|
||||
processingTime: Date.now(),
|
||||
apiCalls: 1,
|
||||
metadata: {
|
||||
@@ -430,7 +430,7 @@ async function testFullIntegration() {
|
||||
console.log('✅ Document AI text extraction simulated');
|
||||
console.log('✅ Entity recognition working (20 entities found)');
|
||||
console.log('✅ Table structure preserved');
|
||||
console.log('✅ Genkit AI analysis completed');
|
||||
console.log('✅ Agentic RAG AI analysis completed');
|
||||
console.log('✅ Full pipeline integration working');
|
||||
console.log('✅ Cleanup operations successful');
|
||||
|
||||
@@ -439,11 +439,11 @@ async function testFullIntegration() {
|
||||
console.log(` 📊 Extracted text: ${documentAiOutput.text.length} characters`);
|
||||
console.log(` 🏷️ Entities recognized: ${documentAiOutput.entities.length}`);
|
||||
console.log(` 📋 Tables extracted: ${documentAiOutput.tables.length}`);
|
||||
console.log(` 🤖 AI analysis length: ${genkitOutput.markdownOutput.length} characters`);
|
||||
console.log(` ⚡ Processing strategy: document_ai_genkit`);
|
||||
console.log(` 🤖 AI analysis length: ${agenticRagOutput.markdownOutput.length} characters`);
|
||||
console.log(` ⚡ Processing strategy: document_ai_agentic_rag`);
|
||||
|
||||
console.log('\n🚀 Ready for Production!');
|
||||
console.log('Your Document AI + Genkit integration is fully operational and ready to process real CIM documents.');
|
||||
console.log('Your Document AI + Agentic RAG integration is fully operational and ready to process real CIM documents.');
|
||||
|
||||
return finalResult;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user