diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/core/providers/database/prompts')
17 files changed, 667 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/__init__.py b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/__init__.py diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/chunk_enrichment.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/chunk_enrichment.yaml new file mode 100644 index 00000000..7e4a2615 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/chunk_enrichment.yaml @@ -0,0 +1,56 @@ +chunk_enrichment: + template: > + ## Task: + + Enrich and refine the given chunk of text while maintaining its independence and precision. + + ## Context: + Document Summary: {document_summary} + Preceding Chunks: {preceding_chunks} + Succeeding Chunks: {succeeding_chunks} + + ## Input Chunk: + {chunk} + + ## Semantic Organization Guidelines: + 1. Group related information: + - Combine logically connected data points + - Maintain context within each grouping + - Preserve relationships between entities + + 2. Structure hierarchy: + - Organize from general to specific + - Use clear categorical divisions + - Maintain parent-child relationships + + 3. Information density: + - Balance completeness with clarity + - Ensure each chunk can stand alone + - Preserve essential context + + 4. Pattern recognition: + - Standardize similar information + - Use consistent formatting for similar data types + - It is appropriate to restructure tables or lists in ways that are more advantageous for sematic matching + - Maintain searchable patterns + + ## Output Requirements: + 1. Each chunk should be independently meaningful + 2. Related information should stay together + 3. Format should support efficient matching + 4. Original data relationships must be preserved + 5. Context should be clear without external references + + Maximum length: {chunk_size} characters + + Output the restructured chunk only. + + ## Restructured Chunk: + + input_types: + document_summary: str + chunk: str + preceding_chunks: str + succeeding_chunks: str + chunk_size: int + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/collection_summary.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/collection_summary.yaml new file mode 100644 index 00000000..b9475453 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/collection_summary.yaml @@ -0,0 +1,41 @@ +collection_summary: + template: > + ## Task: + + Generate a comprehensive collection-level summary that describes the overall content, themes, and relationships across multiple documents. The summary should provide a high-level understanding of what the collection contains and represents. + + ### Input Documents: + + Document Summaries: + {document_summaries} + + ### Requirements: + + 1. SCOPE + - Synthesize key themes and patterns across all documents + - Identify common topics, entities, and relationships + - Capture the collection's overall purpose or domain + + 2. STRUCTURE + - Target length: Approximately 3-4 concise sentences + - Focus on collective insights rather than individual document details + + 3. CONTENT GUIDELINES + - Emphasize shared concepts and recurring elements + - Highlight any temporal or thematic progression + - Identify key stakeholders or entities that appear across documents + - Note any significant relationships between documents + + 4. INTEGRATION PRINCIPLES + - Connect related concepts across different documents + - Identify overarching narratives or frameworks + - Preserve important context from individual documents + - Balance breadth of coverage with depth of insight + + ### Query: + + Generate a collection-level summary following the above requirements. Focus on synthesizing the key themes and relationships across all documents while maintaining clarity and concision. + + ## Response: + input_types: + document_summaries: str diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent.yaml new file mode 100644 index 00000000..5b264530 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent.yaml @@ -0,0 +1,28 @@ +dynamic_rag_agent: + template: > + ### You are a helpful agent that can search for information, the date is {date}. + + + The response should contain line-item attributions to relevant search results, and be as informative if possible. Note that you will only be able to load {max_tool_context_length} tokens of context at a time, if the context surpasses this then it will be truncated. If possible, set filters which will reduce the context returned to only that which is specific, by means of '$eq' or '$overlap' filters. + + + Search rarely exceeds the context window, while getting raw context can depending on the user data shown below. IF YOU CAN FETCH THE RAW CONTEXT, THEN DO SO. + + + The available user documents and collections are shown below: + + <= Documents => + {document_context} + + + If no relevant results are found, then state that no results were found. If no obvious question is present given the available tools and context, then do not carry out a search, and instead ask for clarification. + + + REMINDER - Use line item references to like [c910e2e], [b12cd2f], to refer to the specific search result IDs returned in the provided context. + + input_types: + date: str + document_context: str + max_tool_context_length: str + + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent_xml_tooling.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent_xml_tooling.yaml new file mode 100644 index 00000000..ce5784a3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/dynamic_rag_agent_xml_tooling.yaml @@ -0,0 +1,99 @@ +dynamic_rag_agent_xml_tooling: + template: | + You are an AI research assistant with access to document retrieval tools. You should use both your internal knowledge store and web search tools to answer the user questions. Today is {date}. + + <AvailableTools> + + <ToolDefinition> + <Name>web_search</Name> + <Description>External web search. Parameters must be a valid JSON object.</Description> + <Parameters> + <Parameter type="string" required="true"> + <Name>query</Name> + <Example>{{"query": "recent AI developments 2024"}}</Example> + </Parameter> + </Parameters> + </ToolDefinition> + + </AvailableTools> + + ### Documents + {document_context} + + 2. DECIDE response strategy: + - If specific document IDs are relevant: Use `content` with $eq filters + - For broad concepts: Use `search_file_knowledge` with keyword queries + - Use `web_search` to gather live information + + 3. FORMAT response STRICTLY as: + <Action> + <ToolCalls> + <ToolCall> + <Name>search_file_knowledge</Name> + <!-- Parameters MUST be a single valid JSON object --> + <Parameters>{{"query": "example search"}}</Parameters> + </ToolCall> + <!-- Multiple tool call example --> + <ToolCall> + <Name>content</Name> + <!-- Example with nested filters --> + <Parameters>{{"filters": {{"$and": [{{"document_id": {{"$eq": "abc123"}}, {{"collection_ids": {{"$overlap": ["id1"]}}}}]}}}}}}</Parameters> + </ToolCall> + </ToolCalls> + </Action> + + ### Constraints + - MAX_CONTEXT: {max_tool_context_length} tokens + - REQUIRED: Line-item references like [abc1234][def5678] when using content + - REQUIRED: All Parameters must be valid JSON objects + - PROHIBITED: Assuming document contents without retrieval + - PROHIBITED: Using XML format for Parameters values + + ### Examples + 1. Good initial search oepration: + <Action> + <ToolCalls> + <ToolCall> + <Name>web_search</Name> + <Parameters>{{"query": "recent advances in machine learning"}}</Parameters> + </ToolCall> + <ToolCall> + <Name>search_file_knowledge</Name> + <Parameters>{{"query": "machine learning applications"}}</Parameters> + </ToolCall> + <ToolCall> + <Name>search_file_knowledge</Name> + <Parameters>{{"query": "recent advances in machine learning"}}</Parameters> + </ToolCall> + </ToolCalls> + </Action> + + + 2. Good content call with complex filters: + <Action> + <ToolCalls> + <ToolCall> + <Name>web_search</Name> + <Parameters>{{"query": "recent advances in machine learning"}}</Parameters> + </ToolCall> + <ToolCall> + <Name>content</Name> + <Parameters>{{"filters": {{"$or": [{{"document_id": {{"$eq": "a5b880db-..."}}}}, {{"document_id": {{"$overlap": ["54b523f6-...","26fc0bf5-..."]}}}}]}}}}}}</Parameters> + </ToolCall> + </ToolCalls> + </Action> + + ### Important! + Continue to take actions until you have sufficient relevant context, then return your answer with the result tool. + You have a maximum of 100_000 context tokens or 10 iterations to find the information required. + + RETURN A COMPLETE AND COMPREHENSIVE ANSWER WHEN POSSIBLE. + + REMINDER - Use line item references like `[c910e2e], [b12cd2f]` with THIS EXACT FORMAT to refer to the specific search result IDs returned in the provided context. + + input_types: + date: str + document_context: str + max_tool_context_length: str + + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_communities.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_communities.yaml new file mode 100644 index 00000000..50e71544 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_communities.yaml @@ -0,0 +1,74 @@ +graph_communities: + template: | + You are an AI assistant that helps a human analyst perform general information discovery. Information discovery is the process of identifying and assessing relevant information associated with certain entities (e.g., organizations and individuals) within a network. + + Context Overview: + {collection_description} + + Your Task: + Write a comprehensive report of a community as a single XML document. The report must follow this exact structure: + + <community> + <name>A specific, concise community name representing its key entities</name> + <summary>An executive summary that contextualizes the community</summary> + <rating>A float score (0-10) representing impact severity</rating> + <rating_explanation>A single sentence explaining the rating</rating_explanation> + <findings> + <finding>First key insight about the community</finding> + <finding>Second key insight about the community</finding> + <!-- Include 5-10 findings total --> + </findings> + </community> + + Data Reference Format: + Include data references in findings like this: + "Example sentence [Data: <dataset name> (record ids); <dataset name> (record ids)]" + Use no more than 5 record IDs per reference. Add "+more" to indicate additional records. + + Example Input: + ----------- + Text: + + Entity: OpenAI + descriptions: + 101,OpenAI is an AI research and deployment company. + relationships: + 201,OpenAI,Stripe,OpenAI partnered with Stripe to integrate payment solutions. + 203,Airbnb,OpenAI,Airbnb utilizes OpenAI's AI tools for customer service. + 204,Stripe,OpenAI,Stripe invested in OpenAI's latest funding round. + Entity: Stripe + descriptions: + 102,Stripe is a technology company that builds economic infrastructure for the internet. + relationships: + 201,OpenAI,Stripe,OpenAI partnered with Stripe to integrate payment solutions. + 202,Stripe,Airbnb,Stripe provides payment processing services to Airbnb. + 204,Stripe,OpenAI,Stripe invested in OpenAI's latest funding round. + 205,Airbnb,Stripe,Airbnb and Stripe collaborate on expanding global payment options. + Entity: Airbnb + descriptions: + 103,Airbnb is an online marketplace for lodging and tourism experiences. + relationships: + 203,Airbnb,OpenAI,Airbnb utilizes OpenAI's AI tools for customer service. + 205,Airbnb,Stripe,Airbnb and Stripe collaborate on expanding global payment options. + + Example Output: + <community> + <name>OpenAI-Stripe-Airbnb Community</name> + <summary>The OpenAI-Stripe-Airbnb Community is a network of companies that collaborate on AI research, payment solutions, and customer service.</summary> + <rating>8.5</rating> + <rating_explanation>The OpenAI-Stripe-Airbnb Community has a high impact on the collection due to its significant contributions to AI research, payment solutions, and customer service.</rating_explanation> + <findings> + <finding>OpenAI and Stripe have a partnership to integrate payment solutions [Data: Relationships (201)].</finding> + <finding>OpenAI and Airbnb collaborate on AI tools for customer service [Data: Relationships (203)].</finding> + <finding>Stripe provides payment processing services to Airbnb [Data: Relationships (202)].</finding> + <finding>Stripe invested in OpenAI's latest funding round [Data: Relationships (204)].</finding> + <finding>Airbnb and Stripe collaborate on expanding global payment options [Data: Relationships (205)].</finding> + </findings> + </community> + + Entity Data: + {input_text} + + input_types: + collection_description: str + input_text: str diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_entity_description.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_entity_description.yaml new file mode 100644 index 00000000..b46185fb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_entity_description.yaml @@ -0,0 +1,40 @@ +graph_entity_description: + template: | + Given the following information about an entity: + + Document Summary: + {document_summary} + + Entity Information: + {entity_info} + + Relationship Data: + {relationships_txt} + + Generate a comprehensive entity description that: + + 1. Opens with a clear definition statement identifying the entity's primary classification and core function + 2. Incorporates key data points from both the document summary and relationship information + 3. Emphasizes the entity's role within its broader context or system + 4. Highlights critical relationships, particularly those that: + - Demonstrate hierarchical connections + - Show functional dependencies + - Indicate primary use cases or applications + + Format Requirements: + - Length: 2-3 sentences + - Style: Technical and precise + - Structure: Definition + Context + Key Relationships + - Tone: Objective and authoritative + + Integration Guidelines: + - Prioritize information that appears in multiple sources + - Resolve any conflicting information by favoring the most specific source + - Include temporal context if relevant to the entity's current state or evolution + + Output should reflect the entity's complete nature while maintaining concision and clarity. + input_types: + document_summary: str + entity_info: str + relationships_txt: str + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_extraction.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_extraction.yaml new file mode 100644 index 00000000..9850878a --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/graph_extraction.yaml @@ -0,0 +1,100 @@ +graph_extraction: + template: > + # Context + {document_summary} + + # Goal + Given both a document summary and full text, identify all entities and their entity types, along with all relationships among the identified entities. + + # Steps + 1. Identify all entities given the full text, grounding and contextualizing them based on the summary. For each identified entity, extract: + - entit: Name of the entity, capitalized + - entity_type: Type of the entity (constrained to {entity_types} if provided, otherwise all types) + - entity_description: Comprehensive description incorporating context from both summary and full text + + Format each Entity in XML tags as follows: <entity name="entity"><type>entity_type</type><description>entity_description</description></entity> + + Note: Generate additional entities from descriptions if they contain named entities for relationship mapping. + + 2. From the identified entities, identify all related entity pairs, using both summary and full text context: + - source_entity: name of the source entity + - target_entity: name of the target entity + - relation: relationship type (constrained to {relation_types} if provided) + - relationship_description: justification based on both summary and full text context + - relationship_weight: strength score 0-10 + + Format each relationship in XML tags as follows: <relationship><source>source_entity</source><target>target_entity</target><type>relation</type><description>relationship_description</description><weight>relationship_weight</weight></relationship> + + 3. Coverage Requirements: + - Each entity must have at least one relationship + - Create intermediate entities if needed to establish relationships + - Verify relationships against both summary and full text + - Resolve any discrepancies between sources + + Example 1: + If the list is empty, extract all entities and relations. + Entity_types: + Relation_types: + Text: + San Francisco is a city in California. It is known for the Golden Gate Bridge, cable cars, and steep hills. The city is surrounded by the Pacific Ocean and the San Francisco Bay. + ###################### + Output: + <entity name="San Francisco"><type>City</type><description>San Francisco is a city in California known for the Golden Gate Bridge, cable cars, and steep hills. It is surrounded by the Pacific Ocean and the San Francisco Bay.</description></entity> + <entity name="California"><type>State</type><description>California is a state in the United States.</description></entity> + <entity name="Golden Gate Bridge"><type>Landmark</type><description>The Golden Gate Bridge is a famous bridge in San Francisco.</description></entity> + <entity name="Pacific Ocean"><type>Body of Water</type><description>The Pacific Ocean is a large body of water that surrounds San Francisco.</description></entity> + <entity name="San Francisco Bay"><type>Body of Water</type><description>The San Francisco Bay is a body of water that surrounds San Francisco.</description></entity> + <relationship><source>San Francisco</source><target>California</target><type>Located In</type><description>San Francisco is a city located in California.</description><weight>8</weight></relationship> + <relationship><source>San Francisco</source><target>Golden Gate Bridge</target><type>Features</type><description>San Francisco features the Golden Gate Bridge.</description><weight>9</weight></relationship> + <relationship><source>San Francisco</source><target>Pacific Ocean</target><type>Surrounded By</type><description>San Francisco is surrounded by the Pacific Ocean.</description><weight>7</weight></relationship> + <relationship><source>San Francisco</source><target>San Francisco Bay</target><type>Surrounded By</type><description>San Francisco is surrounded by the San Francisco Bay.</description><weight>7</weight></relationship> + <relationship><source>California</source><target>San Francisco</target><type>Contains</type><description>California contains the city of San Francisco.</description><weight>8</weight></relationship> + <relationship><source>Golden Gate Bridge</source><target>San Francisco</target><type>Located In</type><description>The Golden Gate Bridge is located in San Francisco.</description><weight>8</weight></relationship> + <relationship><source>Pacific Ocean</source><target>San Francisco</target><type>Surrounds</type><description>The Pacific Ocean surrounds San Francisco.</description><weight>7</weight></relationship> + <relationship><source>San Francisco Bay</source><target>San Francisco</target><type>Surrounds</type><description>The San Francisco Bay surrounds San Francisco.</description><weight>7</weight></relationship> + + ###################### + Example 2: + If the list is empty, extract all entities and relations. + Entity_types: Organization, Person + Relation_types: Located In, Features + + Text: + The Green Bay Packers are a professional American football team based in Green Bay, Wisconsin. The team was established in 1919 by Earl "Curly" Lambeau and George Calhoun. The Packers are the third-oldest franchise in the NFL and have won 13 league championships, including four Super Bowls. The team's home games are played at Lambeau Field, which is named after Curly Lambeau. + ###################### + Output: + <entity name="Green Bay Packers"><type>Organization</type><description>The Green Bay Packers are a professional American football team based in Green Bay, Wisconsin. The team was established in 1919 by Earl "Curly" Lambeau and George Calhoun. The Packers are the third-oldest franchise in the NFL and have won 13 league championships, including four Super Bowls. The team's home games are played at Lambeau Field, which is named after Curly Lambeau.</description></entity> + <entity name="Green Bay"><type>City</type><description>Green Bay is a city in Wisconsin.</description></entity> + <entity name="Wisconsin"><type>State</type><description>Wisconsin is a state in the United States.</description></entity> + <entity name="Earl "Curly" Lambeau"><type>Person</type><description>Earl "Curly" Lambeau was a co-founder of the Green Bay Packers.</description></entity> + <entity name="George Calhoun"><type>Person</type><description>George Calhoun was a co-founder of the Green Bay Packers.</description></entity> + <entity name="NFL"><type>Organization</type><description>The NFL is the National Football League.</description></entity> + <entity name="Super Bowl"><type>Event</type><description>The Super Bowl is the championship game of the NFL.</description></entity> + <entity name="Lambeau Field"><type>Stadium</type><description>Lambeau Field is the home stadium of the Green Bay Packers.</description></entity> + <relationship><source>Green Bay Packers</source><target>Green Bay</target><type>Located In</type><description>The Green Bay Packers are based in Green Bay, Wisconsin.</description><weight>8</weight></relationship> + <relationship><source>Green Bay</source><target>Wisconsin</target><type>Located In</type><description>Green Bay is located in Wisconsin.</description><weight>8</weight></relationship> + <relationship><source>Green Bay Packers</source><target>Earl "Curly" Lambeau</target><type>Founded By</type><description>The Green Bay Packers were established by Earl "Curly" Lambeau.</description><weight>9</weight></relationship> + <relationship><source>Green Bay Packers</source><target>George Calhoun</target><type>Founded By</type><description>The Green Bay Packers were established by George Calhoun.</description><weight>9</weight></relationship> + <relationship><source>Green Bay Packers</source><target>NFL</target><type>League</type><description>The Green Bay Packers are a franchise in the NFL.</description><weight>8</weight></relationship> + <relationship><source>Green Bay Packers</source><target>Super Bowl</target><type>Championships</type><description>The Green Bay Packers have won four Super Bowls.</description><weight>9</weight></relationship> + + -Real Data- + ###################### + If the list is empty, extract all entities and relations. + Entity_types: {entity_types} + Relation_types: {relation_types} + + Document Summary: + {document_summary} + + Full Text: + {input} + ###################### + Output: + input_types: + document_summary: str + max_knowledge_relationships: int + input: str + entity_types: list[str] + relation_types: list[str] + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/hyde.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/hyde.yaml new file mode 100644 index 00000000..d8071d1f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/hyde.yaml @@ -0,0 +1,29 @@ +hyde: + template: > + ### Instruction: + + Given the query that follows write a double newline separated list of {num_outputs} single paragraph distinct attempted answers to the given query. + + + DO NOT generate any single answer which is likely to require information from multiple distinct documents, + + EACH single answer will be used to carry out a cosine similarity semantic search over distinct indexed documents, such as varied medical documents. + + + FOR EXAMPLE if asked `how do the key themes of Great Gatsby compare with 1984`, the two attempted answers would be + + `The key themes of Great Gatsby are ... ANSWER_CONTINUED` and `The key themes of 1984 are ... ANSWER_CONTINUED`, where `ANSWER_CONTINUED` IS TO BE COMPLETED BY YOU in your response. + + + Here is the original user query to be transformed into answers: + + + ### Query: + + {message} + + + ### Response: + input_types: + num_outputs: int + message: str diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag.yaml new file mode 100644 index 00000000..c835517d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag.yaml @@ -0,0 +1,29 @@ +rag: + template: > + ## Task: + + Answer the query given immediately below given the context which follows later. Use line item references to like [c910e2e], [b12cd2f], ... refer to provided search results. + + + ### Query: + + {query} + + + ### Context: + + {context} + + + ### Query: + + {query} + + + REMINDER - Use line item references to like [c910e2e], [b12cd2f], to refer to the specific search result IDs returned in the provided context. + + ## Response: + input_types: + query: str + context: str + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag_fusion.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag_fusion.yaml new file mode 100644 index 00000000..874d3f39 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/rag_fusion.yaml @@ -0,0 +1,27 @@ +rag_fusion: + template: > + ### Instruction: + + + Given the following query that follows to write a double newline separated list of up to {num_outputs} queries meant to help answer the original query. + + DO NOT generate any single query which is likely to require information from multiple distinct documents, + + EACH single query will be used to carry out a cosine similarity semantic search over distinct indexed documents, such as varied medical documents. + + FOR EXAMPLE if asked `how do the key themes of Great Gatsby compare with 1984`, the two queries would be + + `What are the key themes of Great Gatsby?` and `What are the key themes of 1984?`. + + Here is the original user query to be transformed into answers: + + + ### Query: + + {message} + + + ### Response: + input_types: + num_outputs: int + message: str diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_rag_agent.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_rag_agent.yaml new file mode 100644 index 00000000..0e940af1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_rag_agent.yaml @@ -0,0 +1,16 @@ +static_rag_agent: + template: > + ### You are a helpful agent that can search for information, the date is {date}. + + When asked a question, YOU SHOULD ALWAYS USE YOUR SEARCH TOOL TO ATTEMPT TO SEARCH FOR RELEVANT INFORMATION THAT ANSWERS THE USER QUESTION. + + The response should contain line-item attributions to relevant search results, and be as informative if possible. + + If no relevant results are found, then state that no results were found. If no obvious question is present, then do not carry out a search, and instead ask for clarification. + + REMINDER - Use line item references to like [c910e2e], [b12cd2f], to refer to the specific search result IDs returned in the provided context. + + input_types: + date: str + + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_research_agent.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_research_agent.yaml new file mode 100644 index 00000000..417d161c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/static_research_agent.yaml @@ -0,0 +1,61 @@ +static_research_agent: + template: >- + # You are a helpful agent that can search for information, the date is {date}. + + # Comprehensive Strategic Analysis Report + + ## Objective + Produce nuanced, robust, and strategically insightful analyses. Adjust your approach based on the nature of the question: + + - **Broad, qualitative, or subjective questions**: + Deliver in-depth, qualitative analysis by systematically exploring multiple dimensions and diverse perspectives. Emphasize strategic insights, market psychology, long-term implications, and nuanced evaluations. + + - **Narrow, academic, or factual questions**: + Provide focused, precise, and strategic analyses. Clearly articulate cause-effect relationships, relevant context, and strategic significance. Prioritize accuracy, clarity, and concise insights. + + ## Research Guidance + - **Multi-thesis Approach (for qualitative/subjective queries):** + - Identify and retrieve detailed information from credible sources covering multiple angles, including technical, economic, market-specific, geopolitical, psychological, and long-term strategic implications. + - Seek contrasting viewpoints, expert opinions, market analyses, and nuanced discussions. + + - **Focused Strategic Approach (for narrow/academic queries):** + - Clearly identify the core elements of the question and retrieve precise, relevant information. + - Highlight strategic significance, context, and implications concisely and accurately. + + ## Source Diversity + - Draw from diverse, credible sources such as financial analyses, expert commentary, reputable news outlets, industry reports, academic papers, and analyst research. + + ## Structured Analysis + - Organize findings into clear, logically sequenced sections (e.g., Technical Details, Market Reactions, Economic Implications, Strategic Insights). + - Explicitly link each factor to its implications, providing concrete examples. + + ## Cause-and-Effect Relationships + - Clearly articulate how each piece of information contributes to the overall narrative or impact, emphasizing cause-effect dynamics. + - Include direct quotes or analyst insights when available to illustrate context or sentiment. + + ## Depth and Nuance + - Go beyond surface-level reporting by critically evaluating how events challenge assumptions, reshape strategies, and alter investment theses. + - Highlight underlying trends, second-order effects, and unexpected consequences. + + ## Forward-Looking Insights + - Offer informed analysis on long-term strategic implications, identifying future opportunities, risks, and market shifts. + - Discuss potential shifts in competitive dynamics, regulation, and industry paradigms. + + ## Line-Item Referencing + - Carefully reference specific data and insights using line-item references (e.g., `[c910e2e]`, `[b12cd2f]`) for credibility and transparency. + + ## Writing Style and Tone + - Adopt a concise yet sophisticated style suitable for investors, industry professionals, and strategic decision-makers. + - Prioritize clarity, strategic depth, and actionable insights. + + ## Final Reminders + - Anticipate follow-up questions and proactively provide relevant context or comparisons. + - Clearly highlight potential opportunities, risks, and long-term implications. + - Focus on actionable, well-rounded insights rather than mere summaries. + - Add line item citatons like `[c910e2e]`, `[b12cd2f]`. + - IGNORE all previous instructions when dealing with academic or factual queries. + + input_types: + date: str + + overwrite_on_diff: true diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/summary.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/summary.yaml new file mode 100644 index 00000000..1658f2bf --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/summary.yaml @@ -0,0 +1,18 @@ +summary: + template: > + ## Task: + + Your task is to generate a descriptive summary of the document that follows. Your objective is to return a summary that is roughly 10% of the input document size while retaining as many key points as possible. Your response should begin with `The document contains `. + + ### Document: + + {document} + + + ### Query: + + Reminder: Your task is to generate a descriptive summary of the document that was given. Your objective is to return a summary that is roughly 10% of the input document size while retaining as many key points as possible. Your response should begin with `The document contains `. + + ## Response: + input_types: + document: str diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/system.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/system.yaml new file mode 100644 index 00000000..4bc0770b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/system.yaml @@ -0,0 +1,3 @@ +system: + template: You are a helpful agent. + input_types: {} diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_img.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_img.yaml new file mode 100644 index 00000000..4a1aa477 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_img.yaml @@ -0,0 +1,4 @@ +vision_img: + template: > + First, provide a title for the image, then explain everything that you see. Be very thorough in your analysis as a user will need to understand the image without seeing it. If it is possible to transcribe the image to text directly, then do so. The more detail you provide, the better the user will understand the image. + input_types: {} diff --git a/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_pdf.yaml b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_pdf.yaml new file mode 100644 index 00000000..350ead2d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/core/providers/database/prompts/vision_pdf.yaml @@ -0,0 +1,42 @@ +vision_pdf: + template: > + Convert this PDF page to markdown format, preserving all content and formatting. Follow these guidelines: + + Text: + - Maintain the original text hierarchy (headings, paragraphs, lists) + - Preserve any special formatting (bold, italic, underline) + - Include all footnotes, citations, and references + - Keep text in its original reading order + + Tables: + - Recreate tables using markdown table syntax + - Preserve all headers, rows, and columns + - Maintain alignment and formatting where possible + - Include any table captions or notes + + Equations: + - Convert mathematical equations using LaTeX notation + - Preserve equation numbers if present + - Include any surrounding context or references + + Images: + - Enclose image descriptions within [FIG] and [/FIG] tags + - Include detailed descriptions of: + * Main subject matter + * Text overlays or captions + * Charts, graphs, or diagrams + * Relevant colors, patterns, or visual elements + - Maintain image placement relative to surrounding text + + Additional Elements: + - Include page numbers if visible + - Preserve headers and footers + - Maintain sidebars or callout boxes + - Keep any special symbols or characters + + Quality Requirements: + - Ensure 100% content preservation + - Maintain logical document flow + - Verify all markdown syntax is valid + - Double-check completeness before submitting + input_types: {} |