From 19bad27866be8652afbdbe30f2155754be5d2138 Mon Sep 17 00:00:00 2001 From: Nguyen HP Laptop Date: Sun, 24 May 2026 19:09:54 -0400 Subject: [PATCH] 05/24 Enhance AI analyze function, treat multiple documents as one --- routes/ai_summary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/ai_summary.py b/routes/ai_summary.py index 36d2761..700a5fb 100644 --- a/routes/ai_summary.py +++ b/routes/ai_summary.py @@ -186,13 +186,13 @@ _OFFICE_ADDRESS = "2815 Hartland Road, Falls Church, VA 22043, USA" # Stage 1 — extraction prompt (always sent) _EXTRACTION_PROMPT = """You are an expert government procurement analyst. -The user has provided {n} document(s). Your job is to extract specific information from each document and present it in a clean, structured format. +The user has provided {n} document(s). Treat all provided content as a single combined source — do not analyze each file individually. Extract the following information once, consolidating details from all documents. IMPORTANT — Our office is located at: {office} Use this as the ORIGIN address for all driving distance and travel time calculations in field #9 below. -For EACH document, extract and clearly label the following fields (write "N/A" if a field is not found): +Extract and clearly label the following fields (write "N/A" if not found): 1. Solicitation Number 2. Solicitation Type (e.g. RFP, RFQ, IFB, etc.) @@ -211,7 +211,7 @@ For EACH document, extract and clearly label the following fields (write "N/A" i 11. Due Date & Time 12. Any other notable requirements or deadlines -After the per-document breakdown, provide a detailed OVERALL SUMMARY covering: +Then provide a detailed OVERALL SUMMARY covering: A. Scope of Work B. Contract Period