What the screen shows
On the project screen, under Coding, click Open the coding…. You can click it once the project has its substitution data. Back to the project, at the top right of the coding screen, takes you back.
Each product is a row, the biggest sellers first. Product ID, Product and Sales stay in view as you scroll across. The sales are those of the base version. Then comes a column for each classification. Its heading gives its name and how many of the products have a value.
Where each value came from
A value can come from four places, and its cell shows which:
| A gap | Shaded. No value yet: these are the cells to fill. |
| Plain text | From one of the project's files. |
| Set by hand | In blue. You typed it, and it stands over everything else. |
| Taken from an AI | In green. From an AI's reply that you chose to take. |
| Worked out by a formula | In purple, on a tinted cell. A calculated classification, with the word formula under its name. |
Hover over a cell and its tip says where the value came from. Where you or an AI have set a value over a file's, the tip also says what the file has.
Finding what to code
Type in Find a product to list only the products whose name or ID has that text in it. Tick List only products with gaps to hide the products that are fully coded. Click a heading to sort by it: sorting a classification puts its gaps first.
The other page, Shopper figures, shows the shopper figures that came with your files, and you can type over them there too. This guide is about the Classifications page.
Coding by hand
Your value is the value. Whatever you type stands over a file's value and an AI's, so use it for what you know better than either.
- Double-click a cell, or select it and start typing. A list opens with the values the column already uses.
- Pick a value, or type a new one. Any value is allowed. Type one the column already has, in other capitals, and Grouper writes it the column's way.
- Press Enter to keep it, or Esc to give it up. A value you set turns blue.
To code many products at once, select cells in one column and change one of them: every selected cell takes the value. Ctrl+V pastes one value into every selected cell, and Ctrl+C copies.
Delete takes away what you or an AI set. The cell then has the file's value again, or is a gap. You can't make a cell blank where a file has a value: clearing it gives the file's value back.
Opening a cell and leaving it without a change leaves it as it was. An AI's value stays marked as the AI's.
Add a classification…
Add a classification… asks for a name and adds an empty column of your own. Code it by hand, or have an AI code it (see below). If the coding is in a sheet already, it is usually better to bring the sheet in as a file.
Remove a classification…
Remove a classification… is there once you have a classification you added here, or a calculated one. It lists them. Grouper asks before it removes one, and says how many values coded in it will be lost and which calculated classifications test it. A classification that comes from a file is taken out with that file's settings.
Having an AI fill the gaps
An AI can read the products' names and suggest a value for each gap. Grouper sends nothing anywhere: it writes a text, you paste it into the AI chat you use, and you paste the reply back. The text holds product names and classification values. It never holds product codes or sales in pounds. Using an AI with Grouper tells the whole story.
- Choose Normal or Careful, beside the copy button. Normal is the usual way: see below.
- Click Copy coding gaps for an AI. The text goes on the clipboard: instructions, your notes about the category, each classification that has gaps with the values it uses, products you have coded as examples, and the products to code. Check that you may share the product names with the AI you use.
- Paste the text into the AI chat, and copy the whole of its reply.
- Click Paste the AI's reply. Grouper reads the reply and says what it gave before anything is taken. Choose Take them to fill the gaps, or Not now.
- Look the green values over, and type over any that is wrong.
With many products to code, the text comes in parts, and the button names the next one, such as "Copy part 2 of 3 for an AI". Each part is a message of its own, and can go to a new chat. Grouper keeps the last ten texts it made with the project, so you can paste a reply later, even after closing Grouper.
How far to trust the reply
Grouper hides some values it already knows among the products to code, and checks the AI's answers against them. The first line at the foot of the screen says how many of those the AI got right. Where several classifications were checked, the next lines give the same for each. With only a few to check, it says that is too few to judge by.
It also says how many gaps the AI filled, how many it wasn't sure of, and any new values it made up, with how many products each was given to. Look at the new values first.
Normal and Careful
| Normal | Careful | |
|---|---|---|
| When the AI isn't sure | It gives its best answer. It writes "?" only where the name gives it nothing to go on. | It writes "?", and the gap stays. It is told that a wrong value costs more than a blank. |
| The values it uses | One from the column's list where one fits. Where none does, a new one, worded like the others. | Only values already in the list. Any other answer is refused. |
| A classification with no values yet | Coded from scratch. | Left out of the text, and the screen says so. Code a few products by hand first. |
Normal fills more gaps, and some will be wrong. It is the one to use when products need a value nobody has used yet, such as a new brand or pack size. Careful fills fewer gaps, only with values you already use. The choice is kept with the project.
Overruling an AI
An AI only fills gaps. It never replaces your value or a file's, and if a file later gives the product a value, the file's is used. To overrule a green value:
- Type over it. The value becomes yours, in blue.
- Or press Delete, and the cell is a gap again.
Corrections you take from the coding review, on the grouping screen, are green too. They do stand over a file's value: the tip says what the file has, and Delete gives it back.
What the AI is told about this category
Above the grid, What the AI is told about this category opens a box for your own words. Grouper puts them with the instructions in every text it writes for an AI: the coding gaps here, and the texts on the grouping screen that name the bubbles, review the coding or say how the category is shopped.
Use it for what an AI can't see in the names:
- What the category is, and how it is sold.
- What a classification means: "Segment is how the product is eaten: Everyday, Treat or Lunchbox."
- A rule of yours: "A pack of four or more is Multipack." "Names that start PL are own label."
The notes are kept with the project, and saved when you leave the box. They go to the AI with every text, so write nothing you may not share with it.
When you take a new classification that an AI proposed on the grouping screen, Grouper adds it here as an empty column, and writes what it means into these notes. Read it there, and put it right if it needs it: the AI that codes the column will be told what it says.
Calculated classifications
A calculated classification is worked out for every product by a formula, from its other classifications and its name. Its values are never typed or imported. Use one to band many values into a few, such as brands into Premium and Standard, or to read something from the names, such as which products are multipacks.
It is worked out again whenever a value it rests on changes, whether you or an AI changed it, and for new products when the data is refreshed. So it never has gaps to fill.
Click Calculated classifications… to open the list.
| Add… | Opens the formula window for a new one: see Writing a formula. |
| Change… | The same for the one chosen: change its formula, or its name. Double-clicking a row does the same. If you rename it, the formulas that test it follow. |
| Delete | Takes it away, after asking. Its formula is lost, and Grouper says which formulas test it. |
| Load from a file… | Reads formulas from a text file with one Name|Formula to a line, or from a Spanner settings file. Where you have one of the same name with another formula, choose Take the file's or Keep mine. |
| Save to a file… | Writes the formulas to a text file in the same form, to use in another project. |
Each change is made at once. Click Close when you are done. Formulas that an AI proposes on the grouping screen are added to this list when you take them.
In the grid, a calculated classification is a column like the others, in purple, with the word formula under its name. Point at its heading to see the formula. Its cells can't be typed in: to change a value, change the formula. A product the formula gives nothing to is blank, but it isn't a gap, and it is never sent to an AI to fill.
Anything wrong is said in What it gives: a formula that can't be read, one that tests something the project doesn't have, or two that test each other. A formula that can't be read is kept as it was written, and gives no values until you put it right with Change…. If you remove a classification that a formula tests, the formula is kept, but that test is never true. Grouper says so before it removes it.
Writing a formula
Add… and Change… open the formula window. Type a Name and a Formula. As you type, Grouper reads the formula and says under it what it would give, after It gives:, or why it can't be read. OK works once the name can be used and the formula can be read. At the foot, It can test: lists the classifications a formula can use.
A formula is a list of parts with semicolons between them. Each part is a value in double quotes, the word if, and a rule. Grouper tries the parts in order, and the first rule that is true gives the value. A last part, else and a value, catches every product that met no rule. Without it, those products have no value.
"Premium" if Brand in ("A", "B"); else "Standard"
Brands A and B are Premium, and every other product is Standard. Say you call this classification Tier. More examples:
"Dark" if Name contains "dark chocolate"; "Milk" if Name contains "milk chocolate"; else "Other" | Read from words in the product's name, whatever their capitals. |
"Large" if Weight >= 400; "Small" if Weight < 150; else "Medium" | Bands a classification whose values are numbers. A product with no number for Weight fails both tests and falls through to Medium. Put "Not known" if Weight = "" first if you want to see those products. |
"Treat" if Tier = "Premium" and (Flavour = "Salted caramel" or Name contains "dark chocolate"); else "Everyday" | Tests another calculated classification, Tier. The brackets let and and or be used together. |
The tests a rule can make
| Test | Example |
|---|---|
| Is, is not | Brand = "A", Brand <> "A" |
| Is one of | Brand in ("A", "B", "C") |
| Part of the text | Name contains "caramel", Name starts with "PL", Name ends with "multipack" |
| A number | Weight >= 400, also <, <= and > |
| Joined | Brand = "A" and Flavour = "Caramel", with and, or, not, and brackets |
The rules
- Values go in double quotes.
=,<>andincompare the whole value, capitals and all, so "Caramel" is not "caramel".contains,starts withandends withtake no notice of capitals. Nameis the product's own name, and so isProduct. If the project has a classification called Name, a formula takes that instead, andProductis the product's name. It can test: shows which.- A classification's name can be written in any capitals. Put it in square brackets when it has a bracket, a quote,
=,<or>in it, or one of the formula's own words, such as and, or or in:[Sweet or savoury] = "Sweet". Square brackets are always allowed. - Write the formula's own words in small letters:
if,else,and,or,not,in,contains,starts with,ends with. - To mix
andwithor, use brackets, as in(A or B) and C. Without them the formula can't be read, and the window says so. - A number test reads the classification's value as a number: 400 is a number, 400g isn't. A product with no number fails the test, and still fails it when the test is turned round with
not. Write numbers with a decimal point:1.5. - A formula can test another calculated classification, whatever order they were added in. Two that test each other can't be worked out, and a formula can't test its own classification.
- A test of something the project hasn't got is never true, and the window says so.
- A long formula can run over several lines. Enter in the Formula box starts a new line, and the lines are read as one formula.
Name reads the same in both. To use the formulas you have in Spanner, choose Load from a file… and pick a Spanner settings file: Grouper takes its calculated classifications and nothing else. Grouper has none of Spanner's product properties, such as sizes, so a test of one is never true here. Spanner's guide to formulas is in Classifications and Outlets.
What next
With the gaps filled, open the grouping: Back to the project › Open the grouping…. Grouper finds the bubbles from the switching alone, then measures your coding against them. That shows which classifications follow the bubbles, which products look miscoded, and what your coding lacks. See Step 4, Reading the Grouping.
Expect to come back. On the grouping screen an AI can propose the classifications and formulas your coding lacks. Take them, code the new columns here, and the grouping measures them next time you open it.