-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Would it be possible to modify the prompt to instruct it to generate shorter responses?
I've noticed that altbot tends to generate rather long text, even exceeding the maximum character length of my instance.
From others I've heard that it's best to generate shorter alt text that accurately summarizes the contents of an image when there is a lot of stuff going on in it.
For example, in this post it gave the following suggested alt text:
The image shows a snippet of code written in a programming language, likely Kotlin, with a dark background and yellow text. The code defines a sealed interface named
ItemPropertywith four data classes:Text,Number,Measure, andEnum. Each data class is annotated with[@]Serializableand includes aval dataproperty, withNumberandMeasurealso having aBigDecimaltype. TheMeasureclass includes aunitproperty and a TODO comment about units of measurement. TheEnumclass has a TODO comment about a better serializer. The code is structured with proper indentation and uses thesealedkeyword to indicate a hierarchy of classes.
―
The image displays a block of SQL code on a dark background, with the text highlighted in various colors for readability. The code is structured into multiple sections, each defining a different table within a database schema. The tables include:
- ITEM_TEXT_PROPERTY: This table has columns for
item,name, andvalue, withitembeing a foreign key referencing theITEMtable. Thenameandvaluecolumns areTEXTandNOT NULL, respectively. The primary key is defined on thenameanditemcolumns.- ITEM_NUMBER_PROPERTY: Similar to
ITEM_TEXT_PROPERTY, this table includesitem,name, andvaluecolumns, withvaluebeingNUMERICandNOT NULL. The primary key is onnameanditem.- ITEM_MEASURE_PROPERTY: This table introduces a new column
unitfor storing units of measurement. It also includesitem,name,amount, andunitcolumns, withamountbeingNUMERICandNOT NULL. The primary key is onnameanditem.- ITEM_PROPERTY_ENUM_TYPE: This table defines an enumeration type with
idandnamecolumns, whereidis a generated identity andnameisTEXTandNOT NULL.- ITEM_PROPERTY_ENUM_VALUE: This table includes
id,type, andvaluecolumns, withidbeing a generated identity andtypereferencingITEM_PROPERTY_ENUM_TYPE. Thevaluecolumn referencesITEM_PROPERTY_ENUM_VALUEand includes a check constraint to ensure the value exists in the referenced table.- ITEM_ENUM_PROPERTY: This table combines the previous tables, with
item,name,type, andvaluecolumns. Thetypecolumn referencesITEM_PROPERTY_ENUM_TYPE, and thevaluecolumn referencesITEM_PROPERTY_ENUM_VALUE. The primary key is onnameanditem, and a check constraint ensures the value exists in the referenced table.The code is well-organized, with comments indicating a temporary solution for representing values in different units. The use of
ON UPDATE CASCADEandON DELETE CASCADEensures that related records are updated or deleted when the referenced records change or are deleted.
the first one is fine I guess, however the second one is almost certainly way too much detail.
The current (english) prompt is (newlines added to aid with reading):
Generate an alt-text description, which is a description for people who can't see the image.
Be sure to talk about the actual contents of it, do not interpret anything.
Start with a general description, then focus on details.
Do it in two steps and show those steps as one text:
perhaps adding something like
If the image is complex or has many different elements, please try to summarize it in around 5 sentences.
could be added on.
Something like this may need to go through a bit of trial and error, but I think that a change to try to get it to generate text that fits into the 5-10 sentences range would be good. (assuming that it uses ~15 words/sentence (it used 16.67 words/sentence in the above text, though this probably isn't representative), 10 sentences is ~750 characters. the top part fits that with only 6 sentences, but the bottom part is 18 sentences)
also perhaps some instructions to get it to avoid using markdown structure like:
- inline code
- bold/italics
- etc.
would be beneficial, as those cannot be included in alt text.