mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-07 04:12:10 +02:00
Squashed 'ai-context/trustgraph-templates/' content from commit 42a5fd1b
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
This commit is contained in:
commit
74cc8a4685
1216 changed files with 116347 additions and 0 deletions
|
|
@ -0,0 +1,57 @@
|
|||
// Document store module
|
||||
// Infrastructure for document-based RAG using chunk embeddings
|
||||
// Handles document embedding storage, retrieval, and question answering
|
||||
|
||||
local helpers = import "helpers.jsonnet";
|
||||
local flow = helpers.flow;
|
||||
local request = helpers.request;
|
||||
local response = helpers.response;
|
||||
local request_response = helpers.request_response;
|
||||
|
||||
// Import shared services
|
||||
local llm_services = import "llm-services.jsonnet";
|
||||
local embeddings_service = import "embeddings-service.jsonnet";
|
||||
|
||||
// Merge shared services with document store configuration
|
||||
llm_services + embeddings_service + {
|
||||
|
||||
// External interfaces for document store
|
||||
"interfaces" +: {
|
||||
// Document embedding storage and retrieval
|
||||
"document-embeddings-store": flow("document-embeddings-store:{id}"),
|
||||
"document-rag": request_response("document-rag:{id}"),
|
||||
"document-embeddings": request_response("document-embeddings:{id}"),
|
||||
},
|
||||
|
||||
// Flow-level processors for document embedding and storage
|
||||
"flow" +: {
|
||||
"document-embeddings:{id}": {
|
||||
input: flow("chunk-load:{id}"),
|
||||
output: flow("document-embeddings-store:{id}"),
|
||||
"embeddings-request": request("embeddings:{id}"),
|
||||
"embeddings-response": response("embeddings:{id}"),
|
||||
},
|
||||
"doc-embeddings-write:{id}": {
|
||||
input: flow("document-embeddings-store:{id}"),
|
||||
},
|
||||
"document-rag:{id}": {
|
||||
request: request("document-rag:{id}"),
|
||||
response: response("document-rag:{id}"),
|
||||
"embeddings-request": request("embeddings:{id}"),
|
||||
"embeddings-response": response("embeddings:{id}"),
|
||||
"prompt-request": request("prompt-rag:{id}"),
|
||||
"prompt-response": response("prompt-rag:{id}"),
|
||||
"document-embeddings-request": request("document-embeddings:{id}"),
|
||||
"document-embeddings-response": response("document-embeddings:{id}"),
|
||||
explainability: flow("triples-store:{id}"),
|
||||
},
|
||||
"doc-embeddings-query:{id}": {
|
||||
request: request("document-embeddings:{id}"),
|
||||
response: response("document-embeddings:{id}"),
|
||||
},
|
||||
},
|
||||
|
||||
// Blueprint-level processors for document RAG operations
|
||||
"blueprint" +: {
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue