org.llm4s.knowledgegraph.tool
package org.llm4s.knowledgegraph.tool
Members list
Type members
Classlikes
object GraphQueryTool
Agent tool integration for graph-guided question answering.
Agent tool integration for graph-guided question answering.
Wraps GraphQAPipeline as a ToolFunction that an Agent can call to query a knowledge graph using natural language. The tool accepts a question and optional configuration, executes the full QA pipeline, and returns the answer with citations.
Attributes
- Example
-
import org.llm4s.knowledgegraph.tool.GraphQueryTool import org.llm4s.toolapi.ToolRegistry for { tool <- GraphQueryTool.toolSafe(llmClient, graphStore) tools = new ToolRegistry(Seq(tool)) state <- agent.run("Who does Alice work with?", tools) } yield state - Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
GraphQueryTool.type
Result returned by the graph query tool to the agent.
Result returned by the graph query tool to the agent.
Value parameters
- answer
-
The generated answer
- citations
-
Sources that contributed to the answer
- entityCount
-
Number of entities used for context
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
object GraphQueryToolResult
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
GraphQueryToolResult.type
In this article