Get Most Relevant Facts for an Arbitrary Query
In this recipe, we demonstrate how to retrieve the most relevant facts from the knowledge graph using an arbitrary search query.
First, we perform a search on the knowledge graph using a sample query:
Then, we get the edges from the search results and construct our fact list with list comprehension:
We demonstrated how to retrieve the most relevant facts for an arbitrary query using the Zep client. Adjust the query and parameters as needed to tailor the search for your specific use case.