graphragzen.entity_extraction.extract_entities.raw_entities_to_structure
- graphragzen.entity_extraction.extract_entities.raw_entities_to_structure(raw_strings)[source]
When an LLM extracts entities using extract_raw_entities it returns a string. The LLM attempts to make this a valid json string, but that cannot be guarenteed. Thus parsing of some extracted entities might fail.
- Parameters:
raw_string (Union[str, List[str]]) – As returned by graphragzen.entity_extraction.extract_raw_entities
raw_strings (str | List[str])
- Returns:
Each parsed entity (node or edge)
- Return type:
List[dict]