mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 23:11:00 +02:00
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
44 lines
No EOL
1.7 KiB
Jsonnet
44 lines
No EOL
1.7 KiB
Jsonnet
// GraphRAG extraction module
|
|
// Extraction method for GraphRAG - extracts definitions and relationships
|
|
// Mutually exclusive with OntologyRAG extraction (both write to graph store)
|
|
|
|
local helpers = import "helpers.jsonnet";
|
|
local flow = helpers.flow;
|
|
local request = helpers.request;
|
|
local response = helpers.response;
|
|
|
|
{
|
|
// No external interfaces - this module provides internal extraction services
|
|
"interfaces" +: {
|
|
},
|
|
|
|
// No configurable parameters for basic KG extraction
|
|
"parameters" +: {
|
|
},
|
|
|
|
// Flow-level processors for knowledge extraction
|
|
"flow" +: {
|
|
// Extracts entity definitions from text chunks
|
|
// Identifies and defines key entities mentioned in the text
|
|
"kg-extract-definitions:{id}": {
|
|
input: flow("chunk-load:{id}"), // Input text chunks
|
|
triples: flow("triples-store:{id}"), // Output definition triples
|
|
"entity-contexts": flow("entity-contexts-load:{id}"), // Entity context information
|
|
"prompt-request": request("prompt:{id}"), // Definition extraction prompts
|
|
"prompt-response": response("prompt:{id}"),
|
|
},
|
|
|
|
// Extracts relationships between entities
|
|
// Identifies how entities are connected and interact
|
|
"kg-extract-relationships:{id}": {
|
|
input: flow("chunk-load:{id}"), // Input text chunks
|
|
triples: flow("triples-store:{id}"), // Output relationship triples
|
|
"prompt-request": request("prompt:{id}"), // Relationship extraction prompts
|
|
"prompt-response": response("prompt:{id}"),
|
|
},
|
|
},
|
|
|
|
// No blueprint-level processors needed
|
|
"blueprint" +: {
|
|
}
|
|
} |