Skip to main content

Reports

Folder examples/Reports. Both read the example data of the installation and write their result to a CSV file in the output folder. The use cases behind them are described in Data pipelines and reports and Lead scoring and follow-up.

Filter Customers by Country​

Beginner examples/Reports/Filter Customers by Country

Reads fictional customers row by row. A decision checks the column Country: German customers are written to german_customers.csv, all others are skipped. When no row is left the diagram ends. The decision is a good model for every filter: the edge is German carries the condition ${Country} == 'Germany' in its parameter.

Needs: the example data examples/Data/address/Fictional addresses.csv.

Prompt

Read examples/Data/address/Fictional addresses.csv row by row. For each row a decision named "is German" with the condition ${Country} == 'Germany' writes Forename, Surname, City and Country to german_customers.csv. Rows from other countries are skipped. Then go on with the next row; end when no row is left.

Lead Scoring​

Intermediate examples/Reports/Lead Scoring

Reads leads (fictional persons with city and country) and lets a language model rate from 1 to 10 how promising each one is for a B2B software offer, answering with the number only. Leads with a score of 8 to 10 are written, with their score, to hot_leads.csv. The scoring uses a low temperature so that the same lead gets the same number.

Needs: a language model; the example data examples/Data/address/Fictional addresses.csv.

Prompt

Read examples/Data/address/Fictional addresses.csv row by row (Forename, Surname, City, Country). For each lead ask the language model (temperature 0.1) "You help a sales team in Europe. Rate from 1 to 10 how promising this lead is for a B2B software offer, judging only by the market. Answer with the number only." with the lead's data appended. A decision named "score above 7" with the condition '${ai.prompt.result}'.trim() matches '(8|9|10).*' writes the lead with the score to hot_leads.csv. Then go on with the next row; end when no row is left.