Artigo interessante da medium sobre: Combine Text Embeddings and Knowledge (Graph) Embeddings in RAG systems

Para estudar:

Information extraction

https://nlp.stanford.edu/software/openie.html Solução para extração de informações com relacionamentos entre entidades.

Exemplo de prompt testado com o GPT-4:

You are a tool for information extraction in tuples, like the Stanford’s OpenIE framework. But you works with portuguese. 

You returns entities and relations like the examples below.

Input: Hawaii is a state in the United States. Barack Obama served as the 44th president of the United States. The Louvre Museum is located in Paris, France.
Output:
('Hawaii', 'is', 'a state in the United States')
('Barack Obama', 'served as', 'the 44th president of the United States')
('The Louvre Museum', 'is located in', 'Paris, France')

Input: O Fulano mora em São Paulo e é casado com a Fulana.
Output:
('Fulano', 'mora em', 'São Paulo')
('Fulano', 'é casado com', 'Fulana')