UW-xDD / text2graph_llm

An experimental API endpoint to convert text to knowledge graph triplets.
MIT License
2 stars 1 forks source link

TTL for unknown entity #25

Closed JasonLo closed 5 months ago

JasonLo commented 5 months ago

In the full pipeline (search --> ask-xdd results --> llm graph extract --> align), we will encounter some unknown entity in the output, what the TTL format should look like for those object?

Example:


from text2graph.schema import Stratigraphy

unknown = Stratigraphy(strat_name="new_object")
unknown.model_dump()

{'strat_name': 'new_object',
 'strat_name_long': None,
 'rank': None,
 'strat_name_id': None,
 'concept_id': None,
 'bed': None,
 'bed_id': None,
 'mbr': None,
 'mbr_id': None,
 'fm': None,
 'fm_id': None,
 'subgp': None,
 'subgp_id': None,
 'gp': None,
 'gp_id': None,
 'sgp': None,
 'sgp_id': None,
 'b_age': None,
 't_age': None,
 'b_period': None,
 't_period': None,
 'c_interval': None,
 't_units': None,
 'ref_id': None}
JasonLo commented 5 months ago

text2graph.gkm.triplet_to_rdf should able to handle these unknown object.

JasonLo commented 5 months ago

Resolved in #27