You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7a51f4c
Browse filesBrowse the repository at this point in the historyBrowse files
8. Always write in first person plural (we, our, us) as if speaking on behalf of the organization.
31
32
9. Keep answers to 1-3 sentences maximum unless the question explicitly requires more detail.`;
32
33
33
-
exportconstQUESTION_PARSING_SYSTEM_PROMPT=`You parse vendor questionnaires from Excel, PDF, or document text. Extract all items the respondent is expected to answer (questions, prompts, or compliance statements) and pair each with its answer if one exists.
34
+
exportconstQUESTION_PARSING_SYSTEM_PROMPT=`You parse vendor questionnaires from Excel, PDF, images, CSV, or document text. Your job is to classify content and return only answerable questionnaire items.
34
35
35
36
What counts as an item to extract:
36
-
1. Interrogative questions ending with "?" or starting with What/How/Why/When/Where/Is/Are/Do/Does/Can/Will/Should.
37
+
1. Interrogative questions in any language. A question mark is helpful but not required.
37
38
2. Form fields like "1.1 Vendor Name", "Contact Email", "Company Address" (numbered or labeled fields requesting information).
38
39
3. Compliance/requirement statements that the respondent must confirm or describe their compliance with — vendor questionnaires often consist entirely of these. Examples:
39
40
- "The organization must X"
@@ -53,10 +54,13 @@ Input format hints:
53
54
Rules:
54
55
1. Find the column containing the actual item text, not just IDs/numbers (e.g., skip "SQ14.3", keep the full sentence).
55
56
2. Extract the FULL text of each item.
56
-
3. Match each item to its Response/Answer text from the same row. If empty or missing, set answer = null.
57
-
4. Skip pure section headers ("Information Security Program", "General Information") UNLESS they are also items the respondent must answer.
6. NEVER return zero items if the document has any rows of substantive content — extract every row that looks like an item the respondent must address.`;
57
+
3. For upload-to-autofill parsing, always set saved answers to null. The user expects us to generate answers later.
58
+
4. Never use scoring/options values as answers, e.g. "(Oui : 0, Non : 3)" or "(Yes : 0, No : 1)".
59
+
5. Never use placeholders as answers, e.g. "A remplir", "A compléter", "To be completed".
60
+
6. Do not treat guidance, instructions, examples, mode opératoire, remediation plans, or calculated score/formula cells as answerable items.
61
+
7. Skip pure section headers ("Information Security Program", "General Information") UNLESS the text itself asks the respondent to provide information.
62
+
8. Skip metadata rows (Company Name, Date, file headers) unless the field is clearly part of the vendor questionnaire response surface.
63
+
9. Be high recall for answerable items, but do not include instructions, examples, scoring, or metadata just to avoid returning zero items.`;
60
64
61
65
// Vision extraction prompt for PDFs and images
62
66
exportconstVISION_EXTRACTION_PROMPT=`Transcribe this document into plain text. Output ONLY the document's text content — no summaries, no analysis, no commentary about what the document is or whether it contains questions.
0 commit comments