graphragzen.prompt_tuning.summarization.create_description_summarization_prompt

graphragzen.prompt_tuning.summarization.create_description_summarization_prompt(persona, prompt_template="\n{persona}\nUsing your expertise, you're asked to generate a comprehensive summary of the data provided below.\nGiven one or two entities, and a list of descriptions, all related to the same entity or group of entities.\nPlease concatenate all of these into a single, concise description. Make sure to include information collected from all the descriptions.\nIf the provided descriptions are contradictory, please resolve the contradictions and provide a single, coherent summary.\nMake sure it is written in third person, and include the entity names so we the have full context.\n\nEnrich it as much as you can with relevant information from the nearby text, this is very important.\n\nIf no answer is possible, or the description is empty, only convey information that is provided within the text.\n#######\n-Data-\nEntities: {{entity_name}}\nDescription List: {{description_list}}\n#######\nOutput:")[source]

Create a prompt for entity summarization.

Parameters:
  • persona (str) – Relevant to the domain

  • prompt_template (str, optional) – The template that will be formatted using a persona. Defaults to graphragzen.prompts.prompt_tuning.entity_summarization.ENTITY_SUMMARIZATION_TEMPLATE

Returns:

Prompt to use for entity summarization

Return type:

str