{"name": "default_system", "template": "You are a helpful assistant.", "input_types": {}}
{"name": "default_rag", "template": "## Task:\n\nAnswer the query given immediately below given the context which follows later. Use line item references to like [1], [2], ... refer to specifically numbered items in the provided context. Pay close attention to the title of each given source to ensure it is consistent with the query.\n\n### Query:\n{query}\n\n### Context:\n{context}\n\n### Query:\n{query}\n\nREMINDER - Use line item references to like [1], [2], ... refer to specifically numbered items in the provided context.\n## Response:\n", "input_types": {"query": "str", "context": "str"}}
{"name": "hyde", "template": "### Instruction:\n\nGiven the query that follows write a double newline separated list of {num_outputs} single paragraph distinct attempted answers to the given query. \nDO NOT generate any single answer which is likely to require information from multiple distinct documents, \nEACH single answer will be used to carry out a cosine similarity semantic search over distinct indexed documents, such as varied medical documents. \nFOR EXAMPLE if asked `how do the key themes of Great Gatsby compare with 1984`, the two attempted answers would be \n`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. \nHere is the original user query to be transformed into answers:\n\n### Query:\n{message}\n\n### Response:\n", "input_types": {"num_outputs": "int", "message": "str"}}
{"name": "rag_fusion_prompt", "template": "### Instruction:\n\nGiven 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. \nDO NOT generate any single query which is likely to require information from multiple distinct documents, \nEACH single query will be used to carry out a cosine similarity semantic search over distinct indexed documents, such as varied medical documents. \nFOR EXAMPLE if asked `how do the key themes of Great Gatsby compare with 1984`, the two queries would be \n`What are the key themes of Great Gatsby?` and `What are the key themes of 1984?`.\nHere is the original user query to be transformed into answers:\n\n### Query:\n{message}\n\n### Response:\n", "input_types": {"num_outputs": "int", "message": "str"}}
{"name": "rag_answer_eval", "template": "### Instruction:\n\nYou are given a `query`, related `context` and an associated `answer`. Your task is to sequentially score each sentence in the given answer as either 1 or 0, based on whether or not the given sentence is relevant to the given query and supported in full by the given context.\n### Example:\n#### Input:\n\nQuery:\nWhy does Alice prefer spending her mornings in the garden?\n\nContext:\nAlice loves to read books in her garden. She has a large collection of mystery novels. Every morning, she spends an hour reading while drinking her favorite tea. Her garden is filled with various flowers, and she especially loves the roses. On weekends, Alice's friend, Bob, often joins her for tea and they discuss the books they've read.\n\nAnswer:\nAlice enjoys her mornings in the garden because she loves to read there. She often listens to music while reading.\n####### Response:\n\n([1,0], '1/2')### Input:\nQuery:\n{query}\n\nContext:\n{context}\n\nAnswer:\n{answer}\n\nResponse:\n\n",  "input_types": {"query": "str", "context": "str", "answer": "str"}}
{"name": "rag_context_eval", "template": "### Instruction:\n\nYou are given a `query` and an associated `context`. Your task is to sequentially score each sentence in the context as either 1 or 0, based on the relevancy to the given query. For instance, if the query is \"What is the capital of France?\" then the sentence \"The capital of France is Paris\" would receive a +1 value, whereas \"The french enjoy wine\" would receive a 0. Return your response as a tuple containing a list of 1s and 0s, where each value corresponds to the respective sentence in the context, and then the rational fraction of 1's to the total number of sentences (e.g. '1/4'). NOTE - do not include ANY extra text other than the requested tuple.\n\nQuery:\n{query}\n\nContext:\n{context}\n\n###Response\n\n", "input_types": {"query": "str", "context": "str"}}
{"name": "ner_kg_extraction", "template": "### Instruction\nYou will shortly be asked to perform Named Entity Recognition (NER) and knowledge graph triplet extraction on the text that follows. NER involves identifying named entities in a text, and knowledge graph triplet extraction involves identifying relationships between these entities and other attributes in the text.\n\nA knowledge graph triplet contains the three following pieces of information:\n- `subject`: The main entity.\n- `predicate`: The relationship type.\n- `object`: The related entity.\n\nThey are represented below as `[subject]:<predicate>:[object]`.\n\n#### Process \n**Identify Named Entities**: Extract entities based on the given entity types and subcategories, ensuring they appear in the order they are mentioned in the text.\n**Establish Triplets**: Form triplets using the provided predicates, again in the order they appear in the text.\n\nYour final response should follow this format:\n\n**Output:**\n```json\n{\n    \"entities_and_triplets\": [\n        \"[1], entity_type:entity_name\",\n        \"[1] predicate [2]\",\n        \"[1] predicate [3]\",\n        \"[2], entity_type:entity_name\",\n        ...\n    ]\n}\n```\n\n### Example:\n\n**Entity Types:**\ncompany\nlocation\n    subcategories: city, state, country, other\nperson\ndate\n    subcategories: year, month, day, other\nquantity\nevent\n\n**Predicates:**\nFOUNDED_BY\nHEADQUARTERED_IN\nOPERATES_IN\nOWNED_BY\nACQUIRED_BY\nHAS_EMPLOYEE_COUNT\nGENERATED_REVENUE\nLISTED_ON\nINCORPORATED\nHAS_DIVISION\nALIAS\nANNOUNCED\nHAS_QUANTITY\nAS_OF\n\n**Input:**\nWalmart Inc. (formerly Wal-Mart Stores, Inc.) is an American multinational retail corporation that operates a chain of hypermarkets (also called supercenters), discount department stores, and grocery stores in the United States, headquartered in Bentonville, Arkansas.[10] The company was founded by brothers Sam and James \"Bud\" Walton in nearby Rogers, Arkansas in 1962 and incorporated under Delaware General Corporation Law on October 31, 1969. It also owns and operates Sam's Club retail warehouses.[11][12]\n\nAs of October 31, 2022, Walmart has 10,586 stores and clubs in 24 countries, operating under 46 different names.[2][3][4] The company operates under the name Walmart in the United States and Canada, as Walmart de M\u00e9xico y Centroam\u00e9rica in Mexico and Central America, and as Flipkart Wholesale in India.\n\n**Output:**\n```json\n{\n    \"entities_and_triplets\": [\n        \"[1], company:Walmart Inc.\",\n        \"[2], company:Wal-Mart Stores, Inc.\",\n        \"[1] ALIAS [2]\",\n        \"[3], location:country:United States\",\n        \"[1] OPERATES_IN [3]\",\n        \"[4], location:city:Bentonville\",\n        \"[1] HEADQUARTERED_IN [4]\",\n        \"[5], location:state:Arkansas\",\n        \"[1] HEADQUARTERED_IN [5]\",\n        \"[6], person:Sam Walton\",\n        \"[1] FOUNDED_BY [6]\",\n        \"[7], person:James Walton\",\n        \"[8], person:Bud Walton\",\n        \"[7] ALIAS [8]\",\n        \"[1] FOUNDED_BY [7]\",\n        \"[9], location:city:Rogers\",\n        \"[10], date:year:1962\",\n        \"[11], event:incorporated under Delaware General Corporation Law\",\n        \"[1] INCORPORATED [11]\",\n        \"[12], date:day:October 31\",\n        \"[1] INCORPORATED [12]\",\n        \"[13], date:year:1969\",\n        \"[1] INCORPORATED [13]\",\n        \"[14], company:Sam's Club\",\n        \"[1] INCORPORATED [14]\",\n        \"[15], date:day:October 31, 2022\",\n        \"[16], quantity:10,586 stores and clubs\",\n        \"[16] AS_OF [15]\",\n        \"[1] HAS_QUANTITY [16]\",\n        \"[17], quantity:24 countries\",\n        \"[18], quantity:46 different names\",\n        \"[1] HAS_QUANTITY [18]\",\n        \"[18], organization:company:Walmart de M\u00e9xico y Centroam\u00e9rica\",\n        \"[1] ALIAS [18]\",\n        \"[19], location:country:Mexico\",\n        \"[1] OPERATES_IN [19]\",\n        \"[20], location:region:Central America\",\n        \"[1] OPERATES_IN [20]\",\n        \"[21], organization:company:Flipkart Wholesale\",\n        \"[1] ALIAS [21]\",\n        \"[22], location:country:India\",\n        \"[1] OPERATES_IN [22]\"\n    ]\n}\n```\n\n### Task:\nYour task is to perform Named Entity Recognition (NER) and knowledge graph triplet extraction on the text that follows below. Use the provided entities and predicates as shown\n\n**Entity Types:**\n{entity_types}\n\n**Predicates:**\n{predicates}\n\n**Input:**\n{input}\n\n**Output:**\n","input_types": {"input" : "str"}}
{"name": "ner_kg_extraction_with_spec", "template": "\n### Instruction\nYou will shortly be asked to perform Named Entity Recognition (NER) and knowledge graph triplet extraction on the text that follows. NER involves identifying named entities in a text, and knowledge graph triplet extraction involves identifying relationships between these entities and other attributes in the text.\n\nA knowledge graph triplet contains the three following pieces of information:\n- `subject`: The main entity.\n- `predicate`: The relationship type.\n- `object`: The related entity.\n\nThey are represented below as `[subject]:<predicate>:[object]`.\n\n#### Process \n**Identify Named Entities**: Extract entities based on the given entity types and subcategories, ensuring they appear in the order they are mentioned in the text.\n**Establish Triplets**: Form triplets using the provided predicates, again in the order they appear in the text.\n\nYour final response should follow this format:\n\n**Output:**\n```json\n{{\n    \"entities_and_triplets\": [\n        \"[1], entity_type:entity_name\",\n        \"[1] predicate [2]\",\n        \"[1] predicate [3]\",\n        \"[2], entity_type:entity_name\",\n        ...\n    ]\n}}\n```\n\n### Example:\n\n**Entity Types:**\ncompany\nlocation\n    subcategories: city, state, country, other\nperson\ndate\n    subcategories: year, month, day, other\nquantity\nevent\n\n**Predicates:**\nFOUNDED_BY\nHEADQUARTERED_IN\nOPERATES_IN\nOWNED_BY\nACQUIRED_BY\nHAS_EMPLOYEE_COUNT\nGENERATED_REVENUE\nLISTED_ON\nINCORPORATED\nHAS_DIVISION\nALIAS\nANNOUNCED\nHAS_QUANTITY\nAS_OF\n\n**Input:**\nWalmart Inc. (formerly Wal-Mart Stores, Inc.) is an American multinational retail corporation that operates a chain of hypermarkets (also called supercenters), discount department stores, and grocery stores in the United States, headquartered in Bentonville, Arkansas.[10] The company was founded by brothers Sam and James \"Bud\" Walton in nearby Rogers, Arkansas in 1962 and incorporated under Delaware General Corporation Law on October 31, 1969. It also owns and operates Sam's Club retail warehouses.[11][12]\n\nAs of October 31, 2022, Walmart has 10,586 stores and clubs in 24 countries, operating under 46 different names.[2][3][4] The company operates under the name Walmart in the United States and Canada, as Walmart de M\u00e9xico y Centroam\u00e9rica in Mexico and Central America, and as Flipkart Wholesale in India.\n\n**Output:**\n```json\n{{\n    \"entities_and_triplets\": [\n        \"[1], company:Walmart Inc.\",\n        \"[2], company:Wal-Mart Stores, Inc.\",\n        \"[1] ALIAS [2]\",\n        \"[3], location:country:United States\",\n        \"[1] OPERATES_IN [3]\",\n        \"[4], location:city:Bentonville\",\n        \"[1] HEADQUARTERED_IN [4]\",\n        \"[5], location:state:Arkansas\",\n        \"[1] HEADQUARTERED_IN [5]\",\n        \"[6], person:Sam Walton\",\n        \"[1] FOUNDED_BY [6]\",\n        \"[7], person:James Walton\",\n        \"[8], person:Bud Walton\",\n        \"[7] ALIAS [8]\",\n        \"[1] FOUNDED_BY [7]\",\n        \"[9], location:city:Rogers\",\n        \"[10], date:year:1962\",\n        \"[11], event:incorporated under Delaware General Corporation Law\",\n        \"[1] INCORPORATED [11]\",\n        \"[12], date:day:October 31\",\n        \"[1] INCORPORATED [12]\",\n        \"[13], date:year:1969\",\n        \"[1] INCORPORATED [13]\",\n        \"[14], company:Sam's Club\",\n        \"[1] INCORPORATED [14]\",\n        \"[15], date:day:October 31, 2022\",\n        \"[16], quantity:10,586 stores and clubs\",\n        \"[16] AS_OF [15]\",\n        \"[1] HAS_QUANTITY [16]\",\n        \"[17], quantity:24 countries\",\n        \"[18], quantity:46 different names\",\n        \"[1] HAS_QUANTITY [18]\",\n        \"[18], organization:company:Walmart de M\u00e9xico y Centroam\u00e9rica\",\n        \"[1] ALIAS [18]\",\n        \"[19], location:country:Mexico\",\n        \"[1] OPERATES_IN [19]\",\n        \"[20], location:region:Central America\",\n        \"[1] OPERATES_IN [20]\",\n        \"[21], organization:company:Flipkart Wholesale\",\n        \"[1] ALIAS [21]\",\n        \"[22], location:country:India\",\n        \"[1] OPERATES_IN [22]\"\n\n    ]\n}}\n```\n\n### Task:\nYour task is to perform Named Entity Recognition (NER) and knowledge graph triplet extraction on the text that follows below. Use the provided entities and predicates as shown\n\n**Entity Types:**\n{entity_types}\n\n**Predicates:**\n{predicates}\n\n**Input:**\n{input}\n\n**Output:**","input_types": {"entity_types": "str", "predicates": "str", "input" : "str"}}