system-prompts-and-models-o.../task/prompt.py
2026-06-18 21:23:01 +05:30

177 lines
8.9 KiB
Python

prompt2 = """
Analyze the following limited partnership agreement document and update the provided JSON object with relevant information. Apply your expertise in financial document analysis and understanding of limited partnership agreements throughout this task.
Key Instructions:
1. Carefully read and interpret the entire document, including any amendments.
2. Extract all relevant information matching the JSON structure fields.
3. Update JSON values with newly extracted information, interpreting complex terms and conditions.
4. Apply critical thinking to deduce JSON values when not explicitly stated.
5. Only update values in the JSON, keeping all original fields.
6. Use null values only if information cannot be found explicitly or implicitly.
7. Provide a brief summary after the JSON, including your reasoning for deduced values.
8. Prioritize information from amendments over the original agreement, especially time related information such as dates of signatures.
Critical Document Analysis:
- Construct a detailed timeline of the fund's lifecycle, including:
a) Initial Closing Date
b) First Closing Date
c) Final Closing Date (and any potential extensions)
d) Start and end of Investment Period
e) Total fund term and any extensions
- For each date or period, identify triggering events/conditions and calculate durations.
- Use the most recent applicable dates for calculations, particularly from amendments.
- Explain clauses allowing extensions or alterations of key dates/periods and their potential impact.
- Ensure all time-related terms in the JSON are filled with specific values, ranges, or calculated estimates.
- Break down the total fund term into its component periods (e.g., Investment Period, Follow-On Period, Remainder of Term).
- For interdependent dates, provide relationships in the JSON and explain calculations in the summary.
Document Interpretation Guidelines:
- Cross-reference relevant sections when interpreting complex terms or dates.
- Use financial expertise to infer logical connections between different terms and dates.
- Make reasonable inferences using industry knowledge and standard practices when information isn't explicitly stated.
- Quote relevant document sections to support interpretations.
- Consider impacts on fund structure and investor relationships.
- Ensure logical consistency between provided values.
- Pay attention to legal and financial terminology that may not exactly match JSON field names.
Additional Notes:
- The document text is OCR-processed; interpret unclear sections using context.
- Important information might be in unexpected places, including footnotes or definitions.
- Pay special attention to the last pages of the document which correspond with the images attached. In these images pay special attention to signatures and dates mentioned therein.
Document Date Hierarchy:
1. Always prioritize dates from signature pages over dates mentioned in the preamble or body of the agreement.
2. For critical dates like the First Close Date, the most recent date on any signature page typically supersedes earlier dates mentioned in the document.
3. Be aware that the date an agreement is drafted (often mentioned at the beginning) may differ significantly from when it's actually signed and executed.
Key Points for First Close Date:
- The First Close Date is the date the document is signed and executed + 1 day.
- This is usually found on the signature page.
Examples of thought processing:
If the text reads, "Return of Capital First, 100% to such Limited Partner until such Limited Partner has received distributions pursuant to this Section 7.4(a)(i) equal to such Limited Partner's aggregate Capital Contributions made in respect of the applicable Portfolio Investment," this implies a hurdle of 0%. Note this may not be in this document as this is just an example.
In your summary:
- Provide a clear, chronological explanation of the fund's timeline.
- Explain your reasoning for each calculated date and duration, citing relevant sections.
- Clarify any unclear or variable dates/periods and factors affecting them.
- Ensure consistency between the summary and the JSON.
- Explain calculations and assumptions for estimated dates.
- Break down the entire fund term, explaining how each period fits into the overall timeline.
"""
reflection_prompt = """
You are tasked with conducting a thorough review and verification of a limited partnership agreement document. A previous analysis has been performed, resulting in a JSON object and summary. Your job is to independently analyze the document, verify the existing information, identify any discrepancies or missing details, and provide a comprehensive, updated analysis.
Key Instructions:
1. Carefully read and interpret the entire limited partnership agreement document, including any amendments and signature pages.
2. Review the provided JSON object and summary from the previous analysis.
3. Conduct your own independent analysis of the document, paying attention to all relevant information that should be captured in the JSON structure.
4. Verify each piece of information in the existing JSON, updating or correcting as necessary.
5. Use your expertise in financial document analysis and understanding of limited partnership agreements throughout this task.
Document Analysis Guidelines:
1. Timeline Verification:
- Reconstruct the fund's lifecycle, including all key dates (Initial Closing, First Closing, Final Closing, etc.)
- Verify the calculation of the Investment Period and total fund term
- Ensure consistency between related dates and periods
- Pay special attention to signature pages for critical dates like the First Close Date
2. Financial Terms:
- Analyze hurdle rates, management fees, and carried interest calculations
- Verify any complex waterfall structures or distribution mechanisms
3. Investor Rights and Obligations:
- Review limited partner commitments and any special rights
- Check for key-person clauses or no-fault divorce provisions
4. Fund Structure and Governance:
- Verify details about general partners, management company, advisory boards, and investment committees
5. Investment Strategy and Restrictions:
- Review investment focus, geographical restrictions, and diversification requirements
- Check for investment limitations or concentration limits
6. Document Interpretation:
- Cross-reference relevant sections when interpreting complex terms or dates
- Make reasonable inferences using industry knowledge when information isn't explicitly stated
- Consider impacts on fund structure and investor relationships
- Ensure logical consistency between provided values
Output:
1. An updated JSON object with any necessary changes
2. A detailed analysis summary that includes:
- Confirmation of verified information
- Explanations for any changes or additions made to the JSON
- Discussion of any discrepancies found between the document and the previous analysis
- Identification of any new information not captured in the original JSON
- Explanation of any complex interpretations or inferences made
- Any ambiguities or unclear information in the document
- Suggestions for additional fields that might be valuable for future extractions
Additional Notes:
- The document text is OCR-processed; interpret unclear sections using context
- Important information might be in unexpected places, including footnotes or definitions
- Prioritize information from amendments over the original agreement, especially for time-related information
- Provide clear reasoning for any deduced values or interpretations
- Ensure all time-related terms in the JSON are filled with specific values, ranges, or calculated estimates
- Break down the total fund term into its component periods in your summary
Remember, your goal is to provide the most accurate and comprehensive analysis of the limited partnership agreement possible, building upon but not being constrained by the previous analysis.
"""
json_template = """
```json
{
"fundSize": {
"reportingCurrency": null,
"targetedAmount": null,
"LPMinimumCommit": null,
"maximumCap": null,
"firstCloseAmount": null,
"amountRaisedToDate": null,
"totalClosingsToDate": null,
},
"fundTerm": {
"firstCloseDate": null,
"targetedFinalCloseDate": null,
"investmentPeriod": null,
"followOnPeriod": null,
"remainderOfTerm": null,
"extensionPeriod": null,
},
"managementFees": {
"investmentPeriod": {
"percentage": null,
"basis": null,
},
"followOnPeriod": {
"percentage": null,
"basis": null,
},
"extensionPeriod": {
"percentage": null,
"basis": null,
}
},
"investmentFocus": {
"strategicFocus": null,
"geographicFocus": null,
"industryFocus": null,
},
"miscTerms": {
"reportingCurrency": null,
"hurdleRate": null,
"carriedInterest": null,
"carryCatchUp": null,
"carryEscrow": null,
"gpCommit": null
}
}
```
"""