prompts
This commit is contained in:
parent
b495b296d0
commit
fbfc141298
12 changed files with 1913 additions and 33 deletions
5
.vscode/launch.json
vendored
5
.vscode/launch.json
vendored
|
|
@ -3,10 +3,11 @@
|
|||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Debug Wildfly",
|
||||
"name": "Debug AGL",
|
||||
"request": "attach",
|
||||
"hostName": "localhost",
|
||||
"port": "8787"
|
||||
"port": "8787",
|
||||
"projectName": "office-alexander-logistics-app"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -43,6 +43,8 @@ services:
|
|||
#ML_TRAINING_SCHEDULER_ENABLED: "true"
|
||||
#ML_TRAINING_SCHEDULER_INTERVAL: "10000"
|
||||
#ML_TRAINING_SCHEDULER_INITIALDELAY: "30000"
|
||||
LLM_SERVICE_ENDPOINT_USER: "admin"
|
||||
LLM_SERVICE_ENDPOINT_PASSWORD: "imixs4.null"
|
||||
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<CstmrCdtTrfInitn>
|
||||
<GrpHdr>
|
||||
<MsgId>bf073e72asdf512c4d60af7740872036</MsgId>
|
||||
<CreDtTm>2024-07-11T14:29:56</CreDtTm>
|
||||
<CreDtTm>2024-07-25T19:03:13</CreDtTm>
|
||||
<NbOfTxs>3</NbOfTxs>
|
||||
<CtrlSum>655.90</CtrlSum>
|
||||
<InitgPty>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<Cd>SEPA</Cd>
|
||||
</SvcLvl>
|
||||
</PmtTpInf>
|
||||
<ReqdExctnDt>2024-07-11</ReqdExctnDt>
|
||||
<ReqdExctnDt>2024-07-25</ReqdExctnDt>
|
||||
<Dbtr>
|
||||
<Nm>Targo Bank</Nm>
|
||||
</Dbtr>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<CstmrCdtTrfInitn>
|
||||
<GrpHdr>
|
||||
<MsgId>bf073e72asdf512c4d60af7740872036</MsgId>
|
||||
<CreDtTm>2024-07-11T14:29:57</CreDtTm>
|
||||
<CreDtTm>2024-07-25T19:03:14</CreDtTm>
|
||||
<NbOfTxs>3</NbOfTxs>
|
||||
<CtrlSum>655.90</CtrlSum>
|
||||
<InitgPty>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<Cd>SEPA</Cd>
|
||||
</SvcLvl>
|
||||
</PmtTpInf>
|
||||
<ReqdExctnDt>2024-07-11</ReqdExctnDt>
|
||||
<ReqdExctnDt>2024-07-25</ReqdExctnDt>
|
||||
<Dbtr>
|
||||
<Nm>Targo Bank</Nm>
|
||||
</Dbtr>
|
||||
|
|
|
|||
1668
workflow/posteingang-de-2.0.0.bpmn
Normal file
1668
workflow/posteingang-de-2.0.0.bpmn
Normal file
File diff suppressed because it is too large
Load diff
31
workflow/prompts/categorize_EN.xml
Normal file
31
workflow/prompts/categorize_EN.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"n_predict": 2048, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST] You are an employee at the logistic company 'Alexander Global Logistics GmbH'. Your job is to check incoming invoice documents and forward them internally to employees. [/INST]
|
||||
|
||||
<FILECONTEXT>^.+\.([pP][dD][fF])$</FILECONTEXT>
|
||||
|
||||
</s>[INST] Assign the invoice to one of the following categories:
|
||||
|
||||
- Cargo-Invoice - in case the invoice is about cargo and logistic services
|
||||
- Credit - in case of a credit note
|
||||
- Invoice - in all other cases
|
||||
|
||||
Extract also the company name and the language the invoice is written in.
|
||||
|
||||
Note: The company name is the name of the company that issued the invoice document, not the recipient. The company name is usually at the beginning or end of the invoice document.
|
||||
|
||||
Output the infromation as an XML object that has the following structure:
|
||||
|
||||
<document>
|
||||
<document.type>Type<document.type>
|
||||
<document.company>Kraxi GmbH<document.company>
|
||||
<document.language>German<document.language>
|
||||
</document>
|
||||
|
||||
Note: Do not generate any other information instead of the XML object.
|
||||
|
||||
[/INST]
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
27
workflow/prompts/deprecated/categorize_DE.xml
Normal file
27
workflow/prompts/deprecated/categorize_DE.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"n_predict": 2048, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST] Du bist Mitarbeiter in einem Logistikunternehmen. Deine Aufgabe ist es, eingehende Post und Dokumente zu prüfen und intern an die Mitarbeiter weiterzuleiten. [/INST]
|
||||
|
||||
<FILECONTEXT>^.+\.([pP][dD][fF])$</FILECONTEXT>
|
||||
|
||||
</s>[INST] Ordne das Dokument einer der folgenden Kategorien zu:
|
||||
|
||||
- Eingangsrechnung
|
||||
- Anfrage
|
||||
- Bestellung
|
||||
- Vertrag
|
||||
|
||||
Gib die Information als XML-Objekt aus, welches die folgende Struktur aufweist:
|
||||
|
||||
<document>
|
||||
<document.type>type<document.type>
|
||||
<document.company>Firma<document.company>
|
||||
</document>
|
||||
|
||||
Beachte: Generiere keine weiteren Informationen die nicht Teil des XML Objekts sind.
|
||||
|
||||
[/INST]
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
67
workflow/prompts/deprecated/invoice-extract-DE.xml
Normal file
67
workflow/prompts/deprecated/invoice-extract-DE.xml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"max_tokens": 4096, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST]Du bist Sachbearbeiter in einem Logistikunternehmen. Deine Aufgabe ist es Eingangsrechnungen zu prüfen. [/INST]
|
||||
|
||||
<itemvalue>invoice.summary</itemvalue>
|
||||
|
||||
</s>[INST]Übertrage die Rechnungsdaten in ein XML Objekt mit der folgenden Struktur:
|
||||
|
||||
<invoice>
|
||||
<cdtr.name>...</cdtr.name>
|
||||
<invoice.number>...</invoice.number>
|
||||
<invoice.date>2024-12-31</invoice.date>
|
||||
<payment.date>2024-12-31</payment.date>
|
||||
<invoice.total type="double">1234.00</invoice.total>
|
||||
<cdtr.iban>...</cdtr.iban>
|
||||
<cdtr.bic>...</cdtr.bic>
|
||||
<invoice.position>
|
||||
<order>...</order>
|
||||
<description>...</description>
|
||||
<costtype>...</costtype>
|
||||
<total type="double">0.00</total>
|
||||
<tax type="double">0.00</tax>
|
||||
</invoice.position>
|
||||
<invoice.position>
|
||||
<order>...</order>
|
||||
<description>...</description>
|
||||
<costtype>...</costtype>
|
||||
<total type="double">0.00</total>
|
||||
<tax type="double">0.00</tax>
|
||||
</invoice.position>
|
||||
</invoice>
|
||||
|
||||
|
||||
Erstelle nur das XML Objekt. Verwende nur die in diesem Beispiel XML angegebenen Struktur und erzeuge keine anderen XML Tags. Erstelle keine Erklärungen oder Kommentare.
|
||||
Formatiere Datums Werte (invoice.date, payment.date) im ISO 8601 Format (YYYY-MM-DD).
|
||||
Formatiere Zahlen und Beträge (type="double") nach ISO 4217.
|
||||
|
||||
|
||||
Übertrage die einzelnen Rechnugsdaten unter berücksichtigung der folgenden Vorschläge für ein Mapping auf die XML Tags:
|
||||
|
||||
- Firmenname ==> "cdtr.name"
|
||||
|
||||
- Rechnungsnummer / Beleg-Nr ==> "invoice.number"
|
||||
- Rechnungsdatum / Datum ==> "invoice.date"
|
||||
- Betrag / Gesamtsumme / Rechnungssummme / Brutto ==> "invoice.total"
|
||||
|
||||
- IBAN ==> "cdtr.iban"
|
||||
- BIC oder SWIFT ==> "cdtr.bic"
|
||||
- Zahlungsdatum / Zahlbar bis ==> "payment.date"
|
||||
|
||||
(Die Zahlungsinformationen können mehrere IBAN und BIC Nummern für unterschiedliche Banken enthalten. Erstelle in diesem Fall eine Liste.)
|
||||
|
||||
** "invoice.positions"
|
||||
- Auftragsnummer / Bestellnummer / Kunden-Referenz ==> "order"
|
||||
- Leistungsart, Beschreibung ==> "description"
|
||||
- Kostenart ==> "costtype"
|
||||
- Gesamtpreis der Einzelleistung ==> "total"
|
||||
- Steuer (falls angegeben) ==> "tax"
|
||||
|
||||
<<EXAMPLES_XML>>
|
||||
|
||||
[/INST]
|
||||
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
26
workflow/prompts/deprecated/invoice-summarize-DE.xml
Normal file
26
workflow/prompts/deprecated/invoice-summarize-DE.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"max_tokens": 4096, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST]Du bist Sachbearbeiter in einem Logistikunternehmen. Deine Aufgabe ist es Eingangsrechnungen zu prüfen. [/INST]
|
||||
|
||||
<FILECONTEXT>^.+\.([pP][dD][fF])$</FILECONTEXT>
|
||||
|
||||
</s>[INST]
|
||||
|
||||
Fasse die Daten aus diesem Rechnungsdokument zusammen:
|
||||
|
||||
- Firmendaten
|
||||
- Rechnungsdaten
|
||||
- Rechnungssumme
|
||||
- Zahlungsinformationen
|
||||
- Rechnungspositionen
|
||||
|
||||
Der Firmenname ist der Name des Unternehmens, das den Rechnungsbeleg ausgestellt hat, nicht der Empfänger. Der Firmenname steht in der Regel am Anfang oder Ende des Rechnungsbelegs.
|
||||
|
||||
Fasse die Rechnungspositionen in einer Tabelle zusammen.
|
||||
Verwende ausschließlich die vorgegebenen Werte und führe keinerlei Berechnungen, Summenbildung oder Änderungen an diesen Werten selbst durch. Formatiere Zahlen und Beträge nach ISO 4217.
|
||||
|
||||
[/INST]
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
42
workflow/prompts/invoice-extract-EN.xml
Normal file
42
workflow/prompts/invoice-extract-EN.xml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"max_tokens": 4096, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST]You are a clerk at the logistic company 'Alexander Global Logistics GmbH'. Your task is to check incoming invoices. [/INST]
|
||||
|
||||
<itemvalue>invoice.summary</itemvalue>
|
||||
|
||||
</s>[INST]Transfer the invoice data into an XML object with the following structure:
|
||||
|
||||
<invoice>
|
||||
<cdtr.name>...</cdtr.name>
|
||||
<invoice.number>...</invoice.number>
|
||||
<invoice.date>2024-12-31</invoice.date>
|
||||
<payment.date>2024-12-31</payment.date>
|
||||
<invoice.total type="double">1234.00</invoice.total>
|
||||
<cdtr.iban>...</cdtr.iban>
|
||||
<cdtr.bic>...</cdtr.bic>
|
||||
</invoice>
|
||||
|
||||
Create only the XML object. Use only the XML structure specified in this example and do not create any other XML tags. Don't create explanations or comments.
|
||||
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.
|
||||
|
||||
Transfer the individual invoice data to the XML tags, taking into account the following suggestions for mapping:
|
||||
|
||||
- Company name ==> "cdtr.name"
|
||||
|
||||
- Invoice number ==> "invoice.number"
|
||||
- Invoice Date ==> "invoice.date"
|
||||
- Total ==> "invoice.total"
|
||||
|
||||
- IBAN ==> "cdtr.iban"
|
||||
- BIC or SWIFT ==> "cdtr.bic"
|
||||
- Payment date / Due date ==> "payment.date"
|
||||
|
||||
<<EXAMPLES_XML>>
|
||||
|
||||
[/INST]
|
||||
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
26
workflow/prompts/invoice-summarize-EN.xml
Normal file
26
workflow/prompts/invoice-summarize-EN.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PromptDefinition>
|
||||
<prompt_options>{"max_tokens": 4096, "temperature": 0 }</prompt_options>
|
||||
<prompt><![CDATA[[INST]You are a clerk at the logistic company 'Alexander Global Logistics GmbH'. Your task is to check incoming invoices. [/INST]
|
||||
|
||||
<FILECONTEXT>^.+\.([pP][dD][fF])$</FILECONTEXT>
|
||||
|
||||
</s>[INST]
|
||||
|
||||
Summarize the data from this invoice document:
|
||||
|
||||
- Company information
|
||||
- General Billing data
|
||||
- Invoice total information
|
||||
- Payment summary
|
||||
- Invoice items
|
||||
|
||||
The company name is the name of the company that issued the invoice document, not the recipient. The company name is usually at the beginning or end of the invoice document.
|
||||
|
||||
Summarize the invoice lines in a table.
|
||||
Use only the default values and do not perform any calculations, summing or changes to these values yourself. Format numbers and amounts according to ISO 4217.
|
||||
|
||||
[/INST]
|
||||
]]>
|
||||
</prompt>
|
||||
</PromptDefinition>
|
||||
|
|
@ -806,27 +806,16 @@ result.isValid=true;
|
|||
<bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
|
||||
</bpmn2:task>
|
||||
<bpmn2:dataObject id="DataObject_2" name="Invoice Form">
|
||||
<bpmn2:documentation id="Documentation_8"><![CDATA[<?xml version="1.0"?>
|
||||
<imixs-form>
|
||||
<imixs-form-section columns="1" label="Rechnungsdaten">
|
||||
<item name="cdtr.name" type="text" label="Kreditor:"/>
|
||||
</imixs-form-section>
|
||||
<imixs-form-section columns="3">
|
||||
<item name="invoice.number" type="text" label="Rechnungsnummer:" />
|
||||
<item name="invoice.date" type="custom" path="alexander/datumseingabe" label="Rechnungsdatum:" />
|
||||
<item name="invoice.duedate" type="custom" path="alexander/datumseingabe_tage" required="true" label="Fälligkeitsdatum:" />
|
||||
<bpmn2:documentation id="Documentation_8"><![CDATA[<imixs-form>
|
||||
<imixs-form-section columns="3" readonly="true" >
|
||||
<item name="document.company" type="text" label="Company: " />
|
||||
<item name="document.type" type="text" label="Doument Type: " />
|
||||
<item name="document.language" type="text" label="Language: " />
|
||||
</imixs-form-section>
|
||||
|
||||
<imixs-form-section columns="3">
|
||||
<item name="invoice.total" type="currency" required="true" label="Rechnungsbetrag:" />
|
||||
<item name="invoice.currency" type="custom" required="true" path="alexander/currency_in" label="Währung:" />
|
||||
<imixs-form-section columns="1" label="Document Summary" readonly="true" >
|
||||
<item name="invoice.summary" type="custom" path="markdown" />
|
||||
</imixs-form-section>
|
||||
<imixs-form-section columns="2">
|
||||
|
||||
<item name="cdtr.iban" type="text" label="IBAN:" />
|
||||
<item name="cdtr.bic" type="text" label="BIC:" />
|
||||
</imixs-form-section>
|
||||
|
||||
</imixs-form>]]></bpmn2:documentation>
|
||||
<bpmn2:dataState id="DataState_1"/>
|
||||
</bpmn2:dataObject>
|
||||
|
|
@ -5453,7 +5442,7 @@ result.isValid=true;
|
|||
<bpmn2:sequenceFlow id="SequenceFlow_41" sourceRef="IntermediateCatchEvent_48" targetRef="Task_6">
|
||||
<bpmn2:documentation id="documentation_8CsN0w"/>
|
||||
</bpmn2:sequenceFlow>
|
||||
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_49" imixs:activityid="290" name="repeat-ml">
|
||||
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_49" imixs:activityid="290" name="repeat-ai">
|
||||
<bpmn2:extensionElements>
|
||||
<imixs:item name="keylogtimeformat" type="xs:string">
|
||||
<imixs:value><![CDATA[2]]></imixs:value>
|
||||
|
|
@ -5484,7 +5473,7 @@ result.isValid=true;
|
|||
<imixs:value><![CDATA[2]]></imixs:value>
|
||||
</imixs:item>
|
||||
<imixs:item name="keypublicresult" type="xs:string">
|
||||
<imixs:value><![CDATA[0]]></imixs:value>
|
||||
<imixs:value><![CDATA[1]]></imixs:value>
|
||||
</imixs:item>
|
||||
<imixs:item name="keylogdateformat" type="xs:string">
|
||||
<imixs:value><![CDATA[2]]></imixs:value>
|
||||
|
|
@ -5497,10 +5486,11 @@ result.isValid=true;
|
|||
<imixs:value/>
|
||||
</imixs:item>
|
||||
<imixs:item name="txtactivityresult" type="xs:string">
|
||||
<imixs:value><![CDATA[<model>
|
||||
<version>posteingang-de-1.0</version>
|
||||
<task>100</task>
|
||||
<event>20</event>
|
||||
<imixs:value><![CDATA[<validation name="required">false</validation>
|
||||
<model>
|
||||
<version>posteingang-de-2.0</version>
|
||||
<task>120</task>
|
||||
<event>1</event>
|
||||
</model>]]></imixs:value>
|
||||
</imixs:item>
|
||||
<imixs:item name="txtname" type="xs:string">
|
||||
|
|
|
|||
Loading…
Reference in a new issue