GraphQAPipeline
org.llm4s.knowledgegraph.query.GraphQAPipeline
Graph-guided question answering pipeline.
Uses graph structure to provide rich context for LLM answers. The pipeline follows the pattern: identify entities -> traverse for context -> rank entities -> generate answer.
Multi-hop traversal follows relationship chains to gather evidence beyond direct neighbors. Citations track which nodes and edges contributed to the answer.
Value parameters
- config
-
Pipeline configuration
- graphStore
-
The graph store containing the knowledge graph
- llmClient
-
The LLM client for entity identification and answer generation
Attributes
- Example
-
val pipeline = new GraphQAPipeline(llmClient, graphStore) val result: Result[GraphQAResult] = pipeline.ask("Who does Alice work with?") result.foreach { r => println(r.answer) r.citations.foreach(c => println(s"Source: ${c.nodeLabel} ${c.nodeId}")) } - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article