GraphQueryTranslator
org.llm4s.knowledgegraph.query.GraphQueryTranslator
Translates natural language questions into structured GraphQuery operations using an LLM.
The translator provides the LLM with a summary of the graph's schema (node labels, relationship types, sample properties) so it can generate appropriate query operations.
Value parameters
- graphStore
-
The graph store whose schema is used as context
- llmClient
-
The LLM client to use for translation
Attributes
- Example
-
val translator = new GraphQueryTranslator(llmClient, graphStore) val query = translator.translate("Who are Alice's coworkers?") // query: Right(GraphQuery.FindNeighbors(nodeId = "alice", ...)) - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article