Search This Blog

Wednesday, March 6, 2024

Create a prompt to extract information and knowledge from text

 

create a prompt to extract information and knowledge from text.

Prompt Template:

Task: Extract information and knowledge from the following text:

Text: (Insert the text you want to analyze here)

Instructions:

  1. Identify key entities:

    • People: (e.g., names, titles, professions)
    • Places: (e.g., locations, geographical features)
    • Organizations: (e.g., companies, institutions, governments)
    • Events: (e.g., historical events, natural disasters, conferences)
    • Other relevant entities specific to the text domain (e.g., scientific concepts, historical periods)
  2. Identify relationships between entities:

    • Describe the connections and interactions between the identified entities.
    • Use verbs and phrases to express these relationships (e.g., "founded", "discovered", "participated in", "located in").
  3. Extract key facts and concepts:

    • Summarize the main ideas and important details mentioned in the text.
    • Focus on factual statements and avoid subjective opinions.

Output:

  • Present the extracted information in a structured format, such as a list, table, or knowledge graph.
  • Ensure the information is concise, clear, and easy to understand.

Additional Notes:

  • You can modify the specific entities and relationships to suit the type of text you are analyzing.
  • Feel free to add further instructions or examples to guide the model towards the desired output format.

Example:

Task: Extract information and knowledge from the following text about a historical event:

Text: The American Revolution was an ideological and political revolution that occurred in British America between 1765 and 1791. The Thirteen Colonies gained independence from the Kingdom of Great Britain, founding the United States of America.

Output:

  • Entities:
    • People: George Washington, Thomas Jefferson, King George III
    • Places: North America, Thirteen Colonies
    • Organizations: Continental Congress, British Empire
    • Events: American Revolution, Declaration of Independence
  • Relationships:
    • The Thirteen Colonies declared independence from the British Empire.
    • George Washington commanded the Continental Army during the American Revolution.
    • Thomas Jefferson authored the Declaration of Independence.
  • Facts:
    • The American Revolution lasted from 1765 to 1791.
    • The Thirteen Colonies became the United States of America.

This is just a basic example, and you can adapt and expand the prompt depending on the complexity of the text and the specific information you want to extract.

No comments:

Post a Comment

Action Verbs

 To analyize Here's a list of 40 action verbs similar to "analyze": Examine: To inspect closely Investigate: To inquire into...