diff --git a/doc/RAG_CASSANDRA.md b/doc/RAG_CASSANDRA.md deleted file mode 100644 index bc55ce6..0000000 --- a/doc/RAG_CASSANDRA.md +++ /dev/null @@ -1,275 +0,0 @@ -# Cassandra - The RAG Database - -The retrieval database in the dynamixs.ai RAG system is based on Apache Cassandra which provides a distributed database system with high availability and scalability. - -The schema for the RAG database is created automatically during startup. This includes the Cassandra keyspace as also the data base schema. -The main table has the following definition: - -```sql -CREATE TABLE IF NOT EXISTS document_vectors ( - id text, - chunk_id uuid, - content_chunk text, - content_vector VECTOR , - PRIMARY KEY (id, chunk_id) -); -``` - -The default dimensions for float vector is based on the LLM used for indexing. 'nomic-embed-text-v2-moe' is a sentence-transformers model to map sentences & paragraphs to a 768 dimensional dense vector space. Find more details in the section [RAG](RAG.md). - -The following section explains the schema in more detail. - -## The Chunk Content - -The RAG database stores not only the vectors but also the textual representation of the content chunks. This has several advantages: - -**Context provision for the LLM** - -The vector is only used for similarity searching - it is a numerical representation of text, but not human-readable. Once the most similar documents have been found, the original text (content_chunk) can be used directly as context for a LLM. Note: the LLM cannot work with the vectors, but needs the readable text. - -**Efficiency of Queries** - -The chunk content also allows an immediate access to the context with no need to make a separate query to the Imixs Workflow instance after the vector search to retrieve the original content. This would mean additional latency and complexity. `content_chunk` stores exactly the text section that corresponds to the vector. - -**The typical RAG workflow** - -The typical workflow in RAG system can be separated into 3 phases: - -1. **Search:** Vector similarity search finds relevant content_vector entries. -2. **Retrieval:** The corresponding content_chunk texts are extracted. -3. **Generation:** These texts from the `content_chunk' is sent as context to the LLM. - -Without the stored text, the retrieval part of RAG would not be possible, as you would have no content to provide to the LLM as context. - -## The Content Reference - -Together with the `content_chunk` the RAG system stores also the UniqueID from to the referred business process instance within the workflow instance. This is a hybrid concept that provides several advantages: - -**1. Normalization and Consistency** - -- Single Source of Truth: The main Document with the full data exist only once in the imixs-workflow system. -- Changes to data inside a process instance which is not part of the Vector DB are automatically available without the need to update the Vector DB. -- No full data duplication. - -**2. Better Integration** - -- Easy access not only to text chunks but also the complete business process objects with its metadata for further refinement of a result set. -- Ability to apply additional business logic (permissions, status, etc.). - -**3. Flexibility** - -- The application can decide dynamically if either the content_chunk or other parts of the referred process instance is used as context. -- Easier updates in case of document changes. -- The `content_chunk` still provide fast access to context during the retrieval process. - -## Examples - -The following shows the advantage of the hybrid concept of content_chunks and workitem references in some examples. - -### Retrieval Example - -The user enters the following question: - -_"Show me all service contracts from non-EU countries with a penalty clause of over 1 million EUR."_ - -**The problem with pure text chunks:** - -In this kind of a request the context can be build from the received text chunks like : - -- Chunk 1: _"...in case of breach of contract, contractual penalties of 1.5 million EUR are applicable..."_ -- Chunk 2: _"...Penalty clause: contractual penalties of 2.3 million EUR..."_ -- Chunk 3: _"...penalties of 1.8 million EUR in case of non-fulfillment..."_ - -What is missing here: contract number, date, contracting party, country, contract value, status, etc. - -**The Advantage of reference IDs:** - -But using the id the RAG system can access the full business data from the workflow system. This allows to build more relevant context like : - -``` -Found service contracts: - -1. Contract SVC-2024-001 (ABC Corp Singapore) - - Concluded: 15.03.2024 - - Contract penalty: 1.5 million EUR - - Status: Active - -2. Contract SVC-2024-007 (XYZ Ltd Hong Kong) - - Concluded: 22.01.2024 - - Contract penalty: 2.3 million EUR - - Status: Under negotiation -``` - -Using the combination of content_chunk text and metadata form the process instance allows to build even more complex context. - -So the hybrid approach is clearly more sensible for a Business Process Management System, as it combines both the advantages of RAG (semantic search) and structured business data. - -### Complex Example - -Next we can examine a more complex use case. - -The user enters the following question: - -_"Are there incoming invoices in which service fees have been charged that do not correspond to the underlying contracts?"_ - -This example indeed touches the limits of RAG, but not necessarily insurmountable ones. - -The challenges: - -1. **Cross-Document Reasoning:** - -- RAG finds similar chunks, but the question requires comparisons between different document types (invoices vs. contracts). -- An LLM would need to simultaneously receive invoice chunks AND corresponding contract chunks. - -2. **Structured Data Extraction:** - -- "Service fees" need to be extracted and compared from unstructured text. -- Numbers, prices, and service descriptions must be semantically mapped. - -3. **Relationship Logic:** - -- Which invoice belongs to which contract? -- The LLM needs this connection to make meaningful comparisons. - -#### Possible Solutions - -The following solutions are specific implementations in the RAG workflow: - -**Approach 1:** Enhanced RAG with a Multi-Step Retrieval - -``` -# Pseudo-Code -def complex_query_handler(question): - # Step 1: Finde relevante Rechnungen - invoice_chunks = vector_search("Servicegebühren Rechnungen") - - # Step 2: Extrahiere Vertrags-IDs aus gefundenen Rechnungen - contract_ids = extract_contract_references(invoice_chunks) - - # Step 3: Hole zugehörige Vertrags-Chunks - contract_chunks = get_contract_chunks(contract_ids) - - # Step 4: LLM mit beiden Kontexten - return llm.query(question, context=invoice_chunks + contract_chunks) -``` - -**Approach 2:** Hybrid-System with structured data - -``` -# Pseudo-Code -def intelligent_agent(question): - # Agent entscheidet: "Ich brauche Rechnungs- UND Vertragsdaten" - plan = create_execution_plan(question) - - for step in plan: - if step.type == "find_invoices": - invoices = rag_search(step.query) - elif step.type == "find_contracts": - contracts = rag_search(step.query) - elif step.type == "compare": - result = llm_compare(invoices, contracts) - - return synthesize_answer(result) -``` - -**Recommendation** - -Since we already have a business process management suite, we can follow the hybrid approach: - -1. RAG for content discovery: "Find all documents with service fees" -2. Structured queries: Use your business data for relationships -3. LLM for final analysis: With all relevant data as context. - -``` -# Pseudo-Code -def analyze_service_fee_discrepancies(): - # RAG: Finde relevante Dokumente - relevant_docs = vector_search("Servicegebühren") - - # Business Logic: Hole strukturierte Daten - invoices_with_contracts = get_invoice_contract_pairs(relevant_docs) - - # LLM: Analysiere mit vollem Kontext - return llm.analyze_discrepancies(invoices_with_contracts) -``` - -**Conclusion:** - -A pure RAG solution reaches its limits here, but an intelligent hybrid system consisting of RAG + structured data + multi-step reasoning can certainly answer such complex questions. - -## Chunking Business Documents - -As the content_chunk can only have a small size below 1KB the RAG system includes a split process to split documents into smaller content_chunks. -The split-process breaks down large business processes into logical chunks. Since the data is usually available in markup or can be prepared for the indexing process within the BPMN model, the split is made based on the structure in the markup. This guarantees a clean separation of text parts without the need to compute overlapping. - -## Data Protection - -Also the vector db may contain sensitive business data represented in content chunks. To protect also this kind of data the RAG system is tightly integrated into the security layer of Imixs-Workflow. In the retrieval phase each content_chunk returned by the vector db is immediately validated against the ACL of the corresponding process instance. This avoids the affect that unauthorized uses may receive sensitive data in a retrieval phase. -As the - -## Data Deletion - -TBD - -# Administration - -Aside from internal database logic, the Cassandra cluster can also be managed through the Command Line Console (CLI). - -## Using the Cassandra CLI - -To connect to your cluster you can use the cqlsh tool. -To run cqlsh from your started docker environment run: - -```bash -$ docker exec -it cassandra cqlsh -Connected to dynamixsAiCluster at 127.0.0.1:9042 -[cqlsh 6.2.0 | Cassandra 5.0.4 | CQL spec 3.4.7 | Native protocol v5] -Use HELP for help. -cqlsh> -``` - -## CQL Examples - -The following section contains some basic cqlsh commands. For full description see the [Cassandra CQL refernce](https://docs.datastax.com/en/dse/6.0/cql/). - -**show key spaces:** - -Show all available keyspaces: - - cqlsh> DESC KEYSPACES; - -**Switch to Keysapce:** - -Select a keyspace be name to interact with this keyspace: - - cqlsh> use embeddings; - -**Show tables in a keyspace:** - -Show tables schemas in current keyspace: - - cqlsh:embeddings> DESC TABLES; - -**Select a single row:** - -To select a row by the $UniqueID: - -``` -cqlsh:embeddings> select id,chunk_id,model_version,task_id from document_vectors WHERE id='a0edf8ea-f8a9-48d8-9cd1-adb365a47a0d'; - - id | chunk_id | model_version | task_id ---------------------------------------+--------------------------------------+----------------+--------- - a0edf8ea-f8a9-48d8-9cd1-adb365a47a0d | ef82be60-f6b2-4b38-9bd7-edb88c377cb2 | product-en-1.0 | 1200 - -(1 rows) -``` - -**Drop Keyspace:** - -Drop the keyspace: - - DROP KEYSPACE IF EXISTS ; - -### Create a dev keyspace with cqlsh - - cqlsh> CREATE KEYSPACE WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; diff --git a/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoEventService.java b/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoEventService.java index 6ef46eb..7ab4e78 100644 --- a/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoEventService.java +++ b/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoEventService.java @@ -104,7 +104,7 @@ public class CognitoEventService { Optional serviceEndpoint; /** - * The method lookups for RAG event log entries and updates the RAG index + * The method lookups for cognito prompt event log entries and updates the .... * information *

* Each eventLogEntry provides optional a prompt template diff --git a/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoPlugin.java b/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoPlugin.java index a2e0364..ab155d9 100644 --- a/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoPlugin.java +++ b/dynamixs-ai-app/src/main/java/ai/dynamixs/cognition/CognitoPlugin.java @@ -73,23 +73,25 @@ public class CognitoPlugin extends org.imixs.ai.rag.RAGIndexPlugin { } // read optional configuration form the model or imixs.properties.... - List abstarctAIDefinitions = workflowService.evalWorkflowResultXML(event, "dynamixs-ai", + List cognitoAIDefinitions = workflowService.evalWorkflowResultXML(event, "dynamixs-ai", "COGNITO", workitem, false); - // INDEX Mode? - if (abstarctAIDefinitions != null && abstarctAIDefinitions.size() > 0) { + // COGNITO Mode? + if (cognitoAIDefinitions != null && cognitoAIDefinitions.size() > 0) { logger.info("├── running Dynamixs.AI Cognito Plugin"); // test if the event provides a Prompt template! String promptTemplate = imixsAIPromptService.loadPromptTemplateByModelElement(event); if (promptTemplate != null && !promptTemplate.isBlank()) { - logger.info("│ ├── load custom cognito prompt template from event"); + logger.info("│ ├── loaded custom cognito prompt template from event"); } else { promptTemplate = buildDefaultPromptTemplate(workitem); + logger.info("│ ├── created default cognito prompt template"); } // we create a data object that holds the template ItemCollection promptItemCol = new ItemCollection(); + promptItemCol.setItemValue("category", "cognition"); promptItemCol.setItemValue(CognitoEventService.ITEM_PROMPT_DEFINITION, promptTemplate); eventLogService.createEvent(CognitoEventService.EVENTLOG_TOPIC_COGNITO_PROMPT, workitem.getUniqueID(), promptItemCol); diff --git a/workflow/en/inbox-en-3.0.0.bpmn b/workflow/en/inbox-en-3.0.0.bpmn new file mode 100644 index 0000000..f117071 --- /dev/null +++ b/workflow/en/inbox-en-3.0.0.bpmn @@ -0,0 +1,2418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + BoundaryEvent_1 + Task_4 + IntermediateCatchEvent_2 + Task_2 + IntermediateCatchEvent_3 + StartEvent_1 + EndEvent_1 + + dataObject_FS1r0Q + task_uB6BGQ + textAnnotation_CtU05A + task_PsBytg + event_yQLmNA + task_0YaQ2w + dataObject_HHM58Q + event_xOeBKg + event_pDFoXg + dataObject_ZhBiZg + event_4DNGzg + dataObject_KPUiiw + event_88sCAA + event_T901Jg + event_7rbeVA + event_yvr5AA + gateway_qDAhHw + event_9mJrhQ + gateway_gd9zQQ + gateway_n7fCJg + task_fQzylQ + event_ZAPEXA + event_yDeTiQ + gateway_pKPTOQ + task_1Cou8Q + event_T74r2A + task_0WRQdw + task_sZKNUg + event_b9NNXw + event_uJ1fgA + dataObject_QalZ1A + event_tSLHgg + event_urn9Cg + TextAnnotation_1 + event_kX0ORg + task_VarLQA + event_aW83ZA + dataObject_KCX0jw + event_YWe3Og + task_9CDKdw + event_YdRYKQ + event_mOf5SQ + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + home +Empfang + + + +]]> + + + + + + + + + false + + + + sequenceFlow_4gpPgw + + sequenceFlow_O0kbJg + sequenceFlow_tZj4qQ + + + + sequenceFlow_fRPOrw + + + + + + + + + + + + + + + + + true + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_9 + sequenceFlow_1QjzLw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +X-Tika-OCRLanguage=eng+deu +X-Tika-PDFocrStrategy=OCR_ONLY +(PDF|pdf|eml|msg)$ +20 +]]> + + + + + + + + + + + + false + + + + SequenceFlow_9 + SequenceFlow_2 + + + DataOutput_1 + + + DataOutput_1 + + + sequenceFlow_VlPVJg + + + + + + + + txtlastcomment]]> + + + + + + + + + + + + + + + + + + + + + + + + cdtr.name (invoice.language)]]> + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_12 + sequenceFlow_gXJm0w + + + SequenceFlow_12 + + + + + + + SequenceFlow_2 + + 1000 + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + true + + + + + + + + + sequenceFlow_fN22Gg + sequenceFlow_GAK0SA + sequenceFlow_bh4DIw + + + + + + + + + + + + + + + + + + + + + + + + document.type ⇒ document.company (Import: document.import.type - Language: document.language) ]]> + + + true + + + + + + + + document.type
+Company: document.company
]]>
+
+
+ + sequenceFlow_JpNUKg + sequenceFlow_8SpIiA + sequenceFlow_I8o4DA +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + llm.service.endpoint + XML + true + + + cdtr.name,invoice.number,invoice.date,invoice.total,payment.date,cdtr.iban,cdtr.bic,total + ON + +false + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + + sequenceFlow_aC0skQ + sequenceFlow_YMtfiw + sequenceFlow_PWXjog + + + + + + + + + + + document.type ⇒ document.company (Import: document.import.type - Langauge: document.language) ]]> + + + true + + + + + + + + + sequenceFlow_JpNUKg + sequenceFlow_lmU9IA + sequenceFlow_aC0skQ + sequenceFlow_A62nqQ + sequenceFlow_HNPSUQ + + + + + + + + + + + {"n_predict": 4096, "temperature": 0 } + + ... + ... + 2024-12-31 + 2024-12-31 + 1234.00 + ... + ... + + +Transfer the individual invoice data to the XML tags, taking into account the following suggestions for mapping: + + - Company name ==> "cdtr.name" (the name of the company that issued the invoice document, not the recipient) + - Invoice number ==> "invoice.number" + - Invoice Date ==> "invoice.date" + - Total ==> "invoice.total" (in EUR or if not available in USD or PLN) + - IBAN ==> "cdtr.iban" + - BIC or SWIFT ==> "cdtr.bic" + - Payment date / Due date ==> "payment.date" + +Note: Output only the XML object! Don't add explanations or comments. Use only the XML structure specified in this example and do not create any other XML tags. If you don't have data for some fields, leave the corresponding XML tags blank. Format date values (invoice.date, payment.date) into the ISO 8601 format (YYYY-MM-DD). Format numbers and amounts (type="double") according to ISO 4217. + +<> +]]]]> + + + invoice.summary]]]]> + FINE + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + (^rechnungseingang-[a-z]{2,3}-\d+(?:\.\d+)?$) + 5000 + 990 + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + sequenceFlow_YMtfiw + sequenceFlow_gXJm0w + sequenceFlow_7t6YqQ + sequenceFlow_VO4bhg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + true + llm.service.endpoint + XML + + + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + + sequenceFlow_fN22Gg + sequenceFlow_naZnAA + sequenceFlow_PgyOMw + + + + + {"n_predict": 512, "temperature": 0 } + + DOCUMENT TYPE + SENDER NAME + LANGUAGE + + +Note: Do not generate any other information instead of the XML object. Do not generate more than one XML Object. +]]]]> + + (PDF|pdf|eml|msg)$ + ]]]]> + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + llm.service.endpoint + invoice.summary + true + +false + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + + sequenceFlow_8SpIiA + sequenceFlow_A62nqQ + sequenceFlow_Di4BQA + + + + + + + + + + + {"n_predict": 4096, "temperature": 0} + + + + (PDF|pdf|eml|msg)$]]]]> + FINE + ]]> + + + + + + + + sequenceFlow_PgyOMw + + + + + sequenceFlow_Di4BQA + + + + + + + + + + + sequenceFlow_PWXjog + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + home +false]]> + + + + + + + + + false + + + + sequenceFlow_GAK0SA + + + + + + + sequenceFlow_naZnAA + sequenceFlow_tcjWAA + sequenceFlow_cY0PYg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + adapter.error_code: adapter.error_message]]> + + + false + + + + + + DataOutput_2 + + + DataOutput_2 + + sequenceFlow_tcjWAA + sequenceFlow_gpPDLg + sequenceFlow_d0zSHA + + + + + + + + + + + + + + + sequenceFlow_I8o4DA + sequenceFlow_VlPVJg + sequenceFlow_bh4DIw + sequenceFlow_d0zSHA + + + + + + + + + + + sequenceFlow_4gpPgw + sequenceFlow_1QjzLw + sequenceFlow_7t6YqQ + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_r48dXQ + sequenceFlow_O0kbJg + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + home +false]]> + + + + + + + + + false + + + + + + + sequenceFlow_fRPOrw + sequenceFlow_r48dXQ + + + + + + + + + + sequenceFlow_tZj4qQ + + 10 + + + + + + + + sequenceFlow_I8o4DA + sequenceFlow_cY0PYg + sequenceFlow_I8o4DA + sequenceFlow_Gwxq0g + sequenceFlow_eJbSQQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cdtr.name (invoice.language)]]> + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_gpPDLg + sequenceFlow_VqjGQg + + + + sequenceFlow_VqjGQg + + + + + + + + + + + + + + document.type ⇒ document.company (Import: document.import.type - Language: document.language) ]]> + + + true + + + + + + + + document.type
+Company: document.company
]]>
+
+
+ + sequenceFlow_JpNUKg + sequenceFlow_Gwxq0g + sequenceFlow_LJ5lZw +
+ + + + + + + + txtlastcomment]]> + + + + + + + + + + + + + + + + + + + + + + + + cdtr.name (invoice.language)]]> + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_LZX10Q + sequenceFlow_Lk0V9A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + llm.service.endpoint + contract.summary + true + +false]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + + sequenceFlow_PWXjog + sequenceFlow_LJ5lZw + sequenceFlow_zzvN2Q + sequenceFlow_PSnrnQ + + + + + + + + + + sequenceFlow_LZX10Q + + + + + + + + {"n_predict": 4096, "temperature": 0} + + + ^.+\.([pP][dD][fF])$]]]]> + FINE + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + (^vertrag-[a-z]{2,3}-\d+(?:\.\d+)?$) + 5000 + 990 + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + sequenceFlow_7t6YqQ + sequenceFlow_zzvN2Q + sequenceFlow_Lk0V9A + + + + + + + + sequenceFlow_PSnrnQ + + + + + + For the OCR Adapter the following minimal options should be set: + + * X-Tika-PDFocrStrategy=OCR_AND_TEXT_EXTRACTION + * X-Tika-OCRLanguage=eng+deu + + These options allow OCR and text extraction suporting English and German language. + + Additional Tika Options can be set but are NOT needed in most cases: + + * X-Tika-PDFOcrImageType=RGB (setting the RGB color mode) + * X-Tika-PDFOcrDPI=400 (setting DPI) + + Setting the OcrDPI is only recommended if the DPI is know! + + Possible ImageTypes are: + + * ARGB Alpha, Red, Green, Blue + * BINARY Black or white. + * GRAY Shades of gray + * RGB Red, Green, Blue + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + home +false]]> + + + + + + + + + false + + + + sequenceFlow_HNPSUQ + sequenceFlow_VO4bhg + + + + + + + + + + + + + + + + + + + + document.type ⇒ document.company (Import: document.import.type - Language: document.language) ]]> + + + true + + + + + + + + document.type
+Company: document.company
]]>
+
+
+ + sequenceFlow_JpNUKg + sequenceFlow_eJbSQQ + sequenceFlow_uwuOOQ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + llm.service.endpoint + offer.summary + true + +false + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + + sequenceFlow_Di4BQA + sequenceFlow_uwuOOQ + sequenceFlow_0NYZlg + sequenceFlow_aJ4DSQ + + + + + {"n_predict": 4096, "temperature": 0} + + + (PDF|pdf|eml|msg)$]]]]> + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + (^bedarfsmeldung-[a-z]{2,3}-\d+(?:\.\d+)?$) + 5000 + 990 + +]]> + + + + + + DataOutput_2 + + + DataOutput_2 + + sequenceFlow_7t6YqQ + sequenceFlow_0foIaA + sequenceFlow_0NYZlg + + + + + txtlastcomment]]> + + + + + + + + + + + + + + + + + + + + + + + + cdtr.name (invoice.language)]]> + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_0foIaA + sequenceFlow_fa1mKg + + + + + + + + + + + + + + + + + + + + sequenceFlow_fa1mKg + + + + + + + + sequenceFlow_aJ4DSQ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/workflow/en/offer-en-1.0.1.bpmn b/workflow/en/offer-en-1.0.1.bpmn index c10c12f..c65907c 100644 --- a/workflow/en/offer-en-1.0.1.bpmn +++ b/workflow/en/offer-en-1.0.1.bpmn @@ -72,6 +72,7 @@ event_LHADMg event_d4UiTw dataObject_Nw0oQQ + event_lj360w @@ -153,8 +154,8 @@ Address: customer.country customer.zip $workflowgroup - $workflowstatus]]> - sequenceFlow_UIpo9Q - sequenceFlow_8NDJxA + sequenceFlow_0HTg8g + sequenceFlow_4DWhfA @@ -994,12 +995,9 @@ result.isValid=true; - + - - - @@ -1520,12 +1518,9 @@ Product Details: - sequenceFlow_vd940Q - sequenceFlow_UIpo9Q + sequenceFlow_8NDJxA + sequenceFlow_0HTg8g - - - @@ -1599,9 +1594,10 @@ Product Details: + sequenceFlow_4DWhfA + sequenceFlow_5oxu0g sequenceFlow_4DUFiA - sequenceFlow_vd940Q @@ -2599,6 +2595,20 @@ Created: $created + + + + + + + + + sequenceFlow_5oxu0g + + + + + @@ -2643,9 +2653,9 @@ Create a short briefing (3-5 bullet points): - + - + @@ -2655,12 +2665,12 @@ Create a short briefing (3-5 bullet points): - + - + - + @@ -2748,15 +2758,15 @@ Create a short briefing (3-5 bullet points): - + - + - + - + @@ -2873,11 +2883,17 @@ Create a short briefing (3-5 bullet points): + + + + + + - - - - + + + + @@ -2988,7 +3004,7 @@ Create a short briefing (3-5 bullet points): - + @@ -2996,14 +3012,9 @@ Create a short briefing (3-5 bullet points): - - - - - - - - + + + @@ -3099,10 +3110,6 @@ Create a short briefing (3-5 bullet points): - - - - @@ -3138,8 +3145,8 @@ Create a short briefing (3-5 bullet points): - - + + @@ -3236,10 +3243,24 @@ Create a short briefing (3-5 bullet points): - - + + + + + + + + + + + + + + + + diff --git a/workflow/en/order-en-1.0.0.bpmn b/workflow/en/order-en-1.0.0.bpmn new file mode 100644 index 0000000..0d1db6b --- /dev/null +++ b/workflow/en/order-en-1.0.0.bpmn @@ -0,0 +1,3255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + Task_2 + StartEvent_1 + + DataObject_2 + dataObject_axJA7Q + task_ol2R9A + event_P1MFZQ + event_NLZbsw + task_0THxmg + event_KwpMKw + dataObject_iq4agg + dataObject_g68BvQ + event_8dt92Q + event_z9ZfGA + task_HL0KNA + event_ZdM0Zg + event_sZERLw + dataObject_80W0PA + event_niR0HA + event_LHADMg + event_d4UiTw + dataObject_Nw0oQQ + + + + Task_3 + Task_4 + Task_5 + Task_1 + Task_6 + EndEvent_2 + IntermediateCatchEvent_17 + IntermediateCatchEvent_4 + IntermediateCatchEvent_6 + IntermediateCatchEvent_7 + IntermediateCatchEvent_8 + IntermediateCatchEvent_9 + IntermediateCatchEvent_10 + event_EyDvQQ + EventBasedGateway_1 + ExclusiveGateway_2 + TextAnnotation_4 + dataObject_u4ZytA + event_oOnn8A + event_YGXi9A + task_qvmKNg + task_BRnorw + event_nzILHw + event_tm9U6A + dataObject_gVhkEg + event_20Geow + event_pxwPEw + dataObject_QIYhww + textAnnotation_ASEpEw + event_XQ7hGQ + + + + + sequenceFlow_8NDJxA + + + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +


+]]> + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_UIpo9Q + sequenceFlow_8NDJxA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_42 + sequenceFlow_1TkjsQ + sequenceFlow_HCxYvw + sequenceFlow_RppP5Q + sequenceFlow_ZtZaBQ + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_17 + SequenceFlow_40 + SequenceFlow_19 + SequenceFlow_25 + sequenceFlow_oWlcYg +
+ + + + + + + + + + _name (EAN: _ean) Preis: _price _currency]]> + + + true + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_21 + SequenceFlow_47 +
+ + SequenceFlow_47 + SequenceFlow_22 + + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home + + + Send offer after approval to customer This action moves the offer to the processing stage 'ordered' + offer, order, send, e-mail + Send out offer to customer + Inform customer about our new offer +]]> + + + + + + + + + + + + false + + + + SequenceFlow_56 + sequenceFlow_HCxYvw + + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + SequenceFlow_19 + SequenceFlow_27 + SequenceFlow_21 + + + + + + + + + + + + + + + + + _name (EAN: _ean) Preis: _price _currency]]> + + + true + + + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_26 + SequenceFlow_23 + SequenceFlow_36 +
+ + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + order.delivery]]> + + + false + + + + + + + + + + + + + + + SequenceFlow_25 + SequenceFlow_26 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + SequenceFlow_36 + SequenceFlow_39 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + SequenceFlow_17 + + + + + + + + + + + + + + _name (EAN: _ean) Preis: _price _currency]]> + + + true + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_41 + SequenceFlow_22 +
+ + + + + SequenceFlow_23 + SequenceFlow_27 + SequenceFlow_34 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_34 + SequenceFlow_41 + + + + + + SequenceFlow_56 + SequenceFlow_39 + SequenceFlow_40 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + SequenceFlow_42 + + + + + + + + + + + + + + + + + + {} + request.subject + +^.+\.eml$ +]]]]> + +FINE + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + sequenceFlow_WRPdIA + sequenceFlow_4DUFiA + sequenceFlow_hkBSvg + sequenceFlow_0Q20mA +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://embeddings.llama.cpp.imixs.com/ + customer.ref + 1 + Customer + 1400 + true + + + customer.ref + (^customer\.) + false +]]> + + + + + + + + + + + + false + + + + + sequenceFlow_0Q20mA + sequenceFlow_InfPdQ + sequenceFlow_hZg0iw + + + + + sequenceFlow_InfPdQ + + + + + + + + + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + sequenceFlow_4DUFiA + sequenceFlow_RgZeeQ + sequenceFlow_HfDRCQ + sequenceFlow_BM0t3w + sequenceFlow_ytbNEQ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + llm.service.endpoint + {"n_predict": 4096, "temperature": 0.7} + offer.proposal + true + +false +]]> + + + + + + + + + + + + false + + + + sequenceFlow_AUsmbQ + + sequenceFlow_InfPdQ + sequenceFlow_RppP5Q + + + + + + + + + + + + + + {"n_predict": 2096, "temperature": 0.3, "top_p": 0.9} + customer.firstname +Lastname: customer.lastname +E-Mail: customer.email + +request.description + +## Product Selection + +The following products are relevant for the current request: + + +Product: product.name +Category: product.category / product.subcategory +Price: product.price _currency +Product Details: +product.description + +----------------------------------------------------------------------------- + + +]]]]> + +FINE + ]]> + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + sequenceFlow_ZtZaBQ + sequenceFlow_ytbNEQ + + + + + + + + + + + {"n_predict": 4096, "temperature": 0} + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + false + + + + sequenceFlow_vd940Q + sequenceFlow_UIpo9Q + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +X-Tika-OCRLanguage=eng+deu +X-Tika-PDFocrStrategy=OCR_ONLY +(PDF|pdf)$ +20 +]]> + + + + + + + + + + + + false + + + + sequenceFlow_4DUFiA + + sequenceFlow_vd940Q + + + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + sequenceFlow_WRPdIA + sequenceFlow_hZg0iw + sequenceFlow_kkTZbA + sequenceFlow_VQusBA +
+ + + sequenceFlow_6UcPtw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://embeddings.llama.cpp.imixs.com/ + product.ref + 5 + Product + 1200 + true + +]]> + + + + + + + + + + + + false + + + + sequenceFlow_kkTZbA + sequenceFlow_6UcPtw + sequenceFlow_ELk13Q + + sequenceFlow_InfPdQ + + + + + {} + request.subject + +^.+\.eml$ +]]]]> + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + false + + + + sequenceFlow_HfDRCQ + sequenceFlow_AUsmbQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + sequenceFlow_BM0t3w + sequenceFlow_VQusBA + sequenceFlow_hkBSvg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home + + true +]]> + + + + + + + + + false + + + + sequenceFlow_1TkjsQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://embeddings.llama.cpp.imixs.com/ + true + + +]]> + + + + + + + + + false + + + + sequenceFlow_oWlcYg + sequenceFlow_FFp2sQ + + + + + + + + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+]]>
+
+
+ $workflowgroup - $workflowstatus]]> + SequenceFlow_40 + sequenceFlow_6AvkzQ + SequenceFlow_25 + sequenceFlow_FFp2sQ + sequenceFlow_C79hSw +
+ + + + + + + Customer: customer.name
+E-Mail: customer.email
+Address: customer.country customer.zip-customer.city customer.address
+ +
+ +]]>
+
+ + + + + + + + request.subject]]> + + + true + + + + + + + + + + + + +
+ $workflowgroup - $workflowstatus]]> + sequenceFlow_FFp2sQ + sequenceFlow_zyO0wQ + sequenceFlow_lrFxKQ + sequenceFlow_VtEF4g + sequenceFlow_11vZNA +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + llm.service.endpoint + ai.workflow.summary + true + +false +]]> + + + + + + + + + + + + false + + + + sequenceFlow_C79hSw + sequenceFlow_7s3Yfw + sequenceFlow_zyO0wQ + + sequenceFlow_InfPdQ + + + + + + + + + + sequenceFlow_7s3Yfw + + + + + + + + + + + + {"n_predict": 4096, "temperature": 0.0} + + + + ai.chronicle.summary ]]]]> + + FINE + ]]> + + + + + + + + sequenceFlow_VtEF4g + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + false + + + + + + + sequenceFlow_11vZNA + sequenceFlow_6AvkzQ + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + customer.ref + (^customer\.),sequencenumber|customer.number + false +]]> + + + + + + + + + false + + + + sequenceFlow_lrFxKQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + llm.service.endpoint + {"n_predict": 4096, "temperature": 0.7} + customer.summary + true + +false]]> + + + + sequenceFlow_ELk13Q + sequenceFlow_RgZeeQ + + sequenceFlow_InfPdQ + + + + + + + + {"n_predict": 255, "temperature": 0.2, "top_p": 0.9} + + + + customer.name + +# Recent Project Insights: + + +Created: $created +$workflowabstract + +----------------------------------------------------------------------------- +]]]]> + + ]]> + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workflow/en/product-en-1.0.0.bpmn b/workflow/en/product-en-1.0.0.bpmn index de7e72f..5f233a2 100644 --- a/workflow/en/product-en-1.0.0.bpmn +++ b/workflow/en/product-en-1.0.0.bpmn @@ -208,7 +208,6 @@ Stock: _stock SequenceFlow_42 sequenceFlow_N5KIRQ sequenceFlow_HCxYvw - sequenceFlow_BWWCZQ sequenceFlow_fx1n8g @@ -932,7 +931,7 @@ result.isValid=true; ]]> - + @@ -941,7 +940,6 @@ result.isValid=true; SequenceFlow_0 sequenceFlow_OiqVHg - sequenceFlow_BWWCZQ @@ -1093,7 +1091,7 @@ result.isValid=true; -Vertrieb]]> +]]> @@ -1232,9 +1230,6 @@ Betrag: _amount (Brutto € _amount_brutto - - - @@ -1419,9 +1414,6 @@ Betrag: _amount (Brutto € _amount_brutto - - - @@ -1617,12 +1609,6 @@ Betrag: _amount (Brutto € _amount_brutto - - - - - -