mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-04 21:02:37 +02:00
Template rejig (#48)
* document-rag / graph-rag refactor of templates * Tweaking the docs and categories * Clarify triple store vs RAG * Tweak knowledge graph linkage * Doc embedding for Qdrant * Fix document RAG on Qdrant * Fix templates * Bump version * Updated templates
This commit is contained in:
parent
121f7bb776
commit
208c219962
47 changed files with 1407 additions and 454 deletions
14
templates/patterns/document-rag.jsonnet
Normal file
14
templates/patterns/document-rag.jsonnet
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "document-rag",
|
||||
icon: "🤝😂",
|
||||
title: "Add DocumentRAG processing flow",
|
||||
description: "This pattern adds DocumentRAG components for extracting and querying documents based on document embeddings. You should make sure a vector store is included in your plan.",
|
||||
requires: ["pulsar", "trustgraph", "llm"],
|
||||
features: ["document-rag"],
|
||||
args: [
|
||||
],
|
||||
category: [ "processing" ],
|
||||
},
|
||||
module: "components/document-rag.jsonnet",
|
||||
}
|
||||
26
templates/patterns/embeddings-hf.jsonnet
Normal file
26
templates/patterns/embeddings-hf.jsonnet
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "embeddings-hf",
|
||||
icon: "🤖💬",
|
||||
title: "Add embeddings model which uses HuggingFace models",
|
||||
description: "This pattern integrates an embeddings model based on HuggingFace sentence-transformer library.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["llm"],
|
||||
args: [
|
||||
{
|
||||
name: "embeddings-model",
|
||||
label: "Embeddings model",
|
||||
type: "select",
|
||||
description: "Embeddings model for sentence analysis",
|
||||
options: [
|
||||
{ id: "all-MiniLM-L6-v2", description: "all-MiniLM-L6-v2" },
|
||||
{ id: "mixedbread-ai/mxbai-embed-large-v1", description: "mxbai-embed-large-v1" },
|
||||
],
|
||||
default: "all-MiniLM-L6-v2",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
category: [ "embeddings" ],
|
||||
},
|
||||
module: "components/embeddings-hf.jsonnet",
|
||||
}
|
||||
34
templates/patterns/embeddings-ollama.jsonnet
Normal file
34
templates/patterns/embeddings-ollama.jsonnet
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "embeddings-ollama",
|
||||
icon: "🤖💬",
|
||||
title: "Add embeddings model hosted on Ollama",
|
||||
description: "This pattern integrates an embeddings model based on HuggingFace sentence-transformer library.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["llm"],
|
||||
args: [
|
||||
{
|
||||
name: "embeddings-model",
|
||||
label: "Embeddings model",
|
||||
type: "select",
|
||||
description: "Embeddings model for sentence analysis",
|
||||
options: [
|
||||
{ id: "mxbai-embed-large", description: "mxbai-embed-large" },
|
||||
],
|
||||
default: "mxbai-embed-large",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "ollama-url",
|
||||
label: "URL",
|
||||
type: "text",
|
||||
width: 120,
|
||||
description: "URL of the Ollama service",
|
||||
default: "http://ollama:11434",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
category: [ "embeddings" ],
|
||||
},
|
||||
module: "components/embeddings-hf.jsonnet",
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "graph-rag-cassandra",
|
||||
icon: "🖇️🙋♀️",
|
||||
title: "Add GraphRAG indexing and querying using Cassandra",
|
||||
description: "The core Trustgraph deployment does not include a GraphRag store; this pattern adds the Cassandra store, and adds GraphRAG adapters so that Cassandra is integrated with GraphRag indexing and querying.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["cassandra", "rag"],
|
||||
args: [],
|
||||
category: ["knowledge-graph"],
|
||||
},
|
||||
module: "components/cassandra.jsonnet",
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "graph-rag-neo4j",
|
||||
icon: "🖇️🙋♀️",
|
||||
title: "Deploys GraphRAG indexing and querying using a Neo4j community edition store",
|
||||
description: "The core Trustgraph deployment does not include a GraphRag store; this pattern adds the Neo4j store, and adds GraphRAG adapters so that Neo4j is integrated with GraphRag indexing and querying.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["neo4j", "rag"],
|
||||
args: [],
|
||||
category: [ "knowledge-graph" ],
|
||||
},
|
||||
module: "components/neo4j.jsonnet",
|
||||
}
|
||||
38
templates/patterns/graph-rag.jsonnet
Normal file
38
templates/patterns/graph-rag.jsonnet
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "graph-rag",
|
||||
icon: "🤝😂",
|
||||
title: "Add GraphRAG processing flow",
|
||||
description: "This pattern adds GraphRAG components for extracting and querying graph edges. You should make sure a triple store and vector store are included in your plan.",
|
||||
requires: ["pulsar", "trustgraph", "llm"],
|
||||
features: ["graph-rag"],
|
||||
args: [
|
||||
{
|
||||
name: "graph-rag-entity-limit",
|
||||
label: "GraphRAG entity query limit",
|
||||
type: "integer",
|
||||
description: "Limit on entities to fetch from vector store",
|
||||
default: 50,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "graph-rag-triple-limit",
|
||||
label: "GraphRAG triple query limit",
|
||||
type: "integer",
|
||||
description: "Limit on triples to fetch from triple store",
|
||||
default: 30,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "graph-rag-max-subgraph-size",
|
||||
label: "GraphRAG maximum subgraph size",
|
||||
type: "integer",
|
||||
description: "Limit on size of subgraph to present to text-completion model",
|
||||
default: 3000,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
category: [ "processing" ],
|
||||
},
|
||||
module: "components/trustgraph.jsonnet",
|
||||
}
|
||||
|
|
@ -25,6 +25,15 @@
|
|||
step: 0.05,
|
||||
default: 0.5,
|
||||
},
|
||||
{
|
||||
name: "ollama-url",
|
||||
label: "URL",
|
||||
type: "text",
|
||||
width: 120,
|
||||
description: "URL of the Ollama service",
|
||||
default: "http://ollama:11434",
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
category: [ "llm" ],
|
||||
},
|
||||
|
|
|
|||
13
templates/patterns/triple-store-cassandra.jsonnet
Normal file
13
templates/patterns/triple-store-cassandra.jsonnet
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "triple-store-cassandra",
|
||||
icon: "🖇️🙋♀️",
|
||||
title: "Adds a Cassandra store configured to act as a triple store",
|
||||
description: "GraphRAG processing needs a triple store. This pattern adds a Cassandra store, along with plumbing so that Cassandra is integrated with GraphRag indexing and querying.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["cassandra", "triple-store"],
|
||||
args: [],
|
||||
category: ["knowledge-graph"],
|
||||
},
|
||||
module: "components/cassandra.jsonnet",
|
||||
}
|
||||
13
templates/patterns/triple-store-neo4j.jsonnet
Normal file
13
templates/patterns/triple-store-neo4j.jsonnet
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pattern: {
|
||||
name: "triple-store-neo4j",
|
||||
icon: "🖇️🙋♀️",
|
||||
title: "Adds a Neo4j store configured to act as a triple store.",
|
||||
description: "GraphRAG processing needs a triple store. This pattern adds a Cassandra store, along with plumbing so that Cassandra is integrated with GraphRag indexing and querying.",
|
||||
requires: ["pulsar", "trustgraph"],
|
||||
features: ["neo4j", "triple-store"],
|
||||
args: [],
|
||||
category: [ "knowledge-graph" ],
|
||||
},
|
||||
module: "components/neo4j.jsonnet",
|
||||
}
|
||||
|
|
@ -7,41 +7,6 @@
|
|||
requires: ["pulsar"],
|
||||
features: ["trustgraph"],
|
||||
args: [
|
||||
{
|
||||
name: "embeddings-model",
|
||||
label: "Embeddings model",
|
||||
type: "select",
|
||||
description: "Embeddings model for sentence analysis",
|
||||
options: [
|
||||
{ id: "all-MiniLM-L6-v2", description: "all-MiniLM-L6-v2" },
|
||||
],
|
||||
default: "all-MiniLM-L6-v2",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "graph-rag-entity-limit",
|
||||
label: "GraphRAG entity query limit",
|
||||
type: "integer",
|
||||
description: "Limit on entities to fetch from vector store",
|
||||
default: 50,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "graph-rag-triple-limit",
|
||||
label: "GraphRAG triple query limit",
|
||||
type: "integer",
|
||||
description: "Limit on triples to fetch from triple store",
|
||||
default: 30,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "graph-rag-max-subgraph-size",
|
||||
label: "GraphRAG maximum subgraph size",
|
||||
type: "integer",
|
||||
description: "Limit on size of subgraph to present to text-completion model",
|
||||
default: 3000,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
category: [ "foundation" ],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue