Hey @Logan M
The note book is at
https://github.com/thekizoch/llama_index/blob/main/dev_notebooks/dev.ipynbBut I don't feel comfortable publishing it at all. The last part ( building with strict=True, with properties) doesn't actually extract properties as is and rejects many valid triplets.
I debugged and there are strange validation errors. here's a snippet:
> Triplet rejected: {'subject': {'type': 'PLANT', 'name': 'stinging nettle', 'properties': {'SOURCE': 'Ethnopharmacological knowledge and metabolites'}}, 'relation': {'type': 'TREATS', 'properties': {'EFFECT_STRENGTH': 'moderate', 'EVIDENCE': 'ethnopharmacological', 'DOSAGE': 'varies'}, 'object': {'type': 'DISEASE', 'name': 'health conditions', 'properties': {'SYNONYMS': 'various health issues'}}}}. Reason: [
> {
> "loc": [
> "object"
> ],
> "msg": "field required",
> "type": "value_error.missing"
> }
> ]
you can see these errors for yourself by forking my repo and running the local forked clone of llama and running
https://github.com/thekizoch/llama_index/blob/main/dev_notebooks/test_new_strict.pyLet me know if you want me to PR, or otherwise move discussion to github/elsewhere
-Michael