----------------------
Based on the information provided in the extracts, you can query the
KnowledgeGraphIndex
using the
query_engine
object. The
query_engine
is created from the
index
object using the
as_query_engine
method. The query is then performed using the
query
method of the
query_engine
object.
Here is an example of how to query the index:
query_engine = index.as_query_engine(
include_text=True,
response_mode="tree_summarize",
embedding_mode="hybrid",
similarity_top_k=5,
)
response = query_engine.query(
"Tell me more about what the author worked on at Interleaf",
)
In this example, the query is "Tell me more about what the author worked on at Interleaf". You can replace this with your own query. The
response_mode
is set to "tree_summarize", the
embedding_mode
is set to "hybrid", and the
similarity_top_k
is set to 5. These parameters can be adjusted based on your specific needs.
Please note that the query should be relevant to the data that was used to create the
KnowledgeGraphIndex
.
For more information, you can refer to the
documentation () and the
notebook () provided in the extracts.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------