mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 15:01:00 +02:00
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
39 lines
1.3 KiB
Jsonnet
39 lines
1.3 KiB
Jsonnet
// Knowledge Graph Base extraction module
|
|
// Provides basic knowledge extraction capabilities from text chunks
|
|
// Extracts entity definitions and relationships using prompt-based processing
|
|
|
|
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 using ontology definitions
|
|
"kg-extract-ontology:{id}": {
|
|
input: flow("chunk-load:{id}"), // Input text chunks
|
|
triples: flow("triples-store:{id}"), // Output triples
|
|
"entity-contexts": flow("entity-contexts-load:{id}"), // Entity context information
|
|
"prompt-request": request("prompt:{id}"), // Definition
|
|
// extraction prompts
|
|
"prompt-response": response("prompt:{id}"),
|
|
"embeddings-request": request("embeddings:{id}"),
|
|
"embeddings-response": response("embeddings:{id}"),
|
|
},
|
|
|
|
},
|
|
|
|
// No blueprint-level processors needed
|
|
"blueprint" +: {
|
|
}
|
|
}
|
|
|