Math as language to communicate with chatgpt

I’m learning Thai and I like to visualize different words. dalle is very well suited for this task

It is effective for learning to show the difference between words in pictures. I wanted to force dalle to maximize the differences within the context. And this turned out to be difficult if described in natural language

When selecting phrases, the model gives good results, but they are unstable (example in Russian and Thai):

Что нужно сделать
Сгенерируй 2 картинки так, чтобы они точно демонстрировали разницу между словами:

  • ขนมปัง (контекст: Хлеб)
  • ปัง (контекст: Хлеб)

Инструкции

  • Расскажи про отличия, сфокусируйся на них
  • Опиши подробно отличия текстом перед генерацией картинки
  • Используй только перевод указанный выше, другие значения не используй
  • Давай пояснения кратко
  • Картинка должна быть стилизована под фотографию

Формат ответа

  • Общая часть двух слов
  • Абзац. Слово-1. Описание контекста. Разделение слова на части и описание значения частей слова
  • Абзац. Слово-2. Описание контекста. Разделение слова на части и описание значения частей слова
  • Абзац. Описание отличий двух исходных слов
  • Генерация одной картинки с двумя картинками (справа и слева) для одного значения слова (фокус на контекст из запроса) и для второго значения слова (фокус на контекст из запроса)

Параметры для модели
diversity_penalty=0.3
top_p=0.3
presence_penalty = -1

I found that if I formulated the problem in terms of sets, the result came out surprisingly well immediately and consistently:

Определения

  • A = ขนมปัง
  • B = ปัง
  • U = Хлеб
  • D(., .) – разница между множествами

Что нужно сделать
Сгенерируй 1 картинку

Ограничения

  • D(A, B) + D(B, A) → max

Инструкции для генерации

  • Сгенерируй A и B
  • Генерация одной картинки с двумя картинками (справа и слева) для одного значения слова (фокус на значение из запроса) и для второго значения слова (фокус на значение из запроса)

Параметры для модели
diversity_penalty=0
top_p=0
presence_penalty = -2

The complication of mathematical concepts leads the model into a stupor and refuses to work:

Определения

  • A = ขนมปัง
  • B = ปัง
  • U = Хлеб
  • D(., .) – разница между множествами
  • L_i - собственное значение D

Ограничения

  • D(A, B) + D(B, A) → max, где A ⊆ U ∧ B ⊆ U
  • L_i = 0 для всех i > 10

Инструкции для ответа

  • Текст не нужен
  • Сгенерируй A и B

Параметры для модели
diversity_penalty=0
top_p=0
presence_penalty = -2

In theory, this condition should have emphasized the limitation, but, alas, the model rejected the request

My question

  • Have you encountered such conclusions?
  • Provide links to sources

This is full-english analog

I’m learning Thai and I like to visualize different words. dalle is very well suited for this task

It is effective for learning to show the difference between words in pictures. I wanted to force dalle to maximize the differences within the context. And this turned out to be difficult if described in natural language

When selecting phrases, the model gives good results, but they are unstable (example in Russian and Thai)

What should be done
Generate 2 pictures so that they accurately demonstrate the difference between the words:

  • ขนมปัง (context: Bread)
  • ปัง (context: Bread)

Instructions

  • Talk about the differences, focus on them
  • Describe the differences in detail in text before generating the image
  • Use only the translation indicated above, do not use other meanings
  • Let’s explain briefly
  • The picture must be stylized as a photograph

Response Format

  • Common part of two words
    *Paragraph. Word-1. Description of the context. Dividing a word into parts and describing the meaning of the parts of the word
    *Paragraph. Word-2. Description of the context. Dividing a word into parts and describing the meaning of the parts of the word
    *Paragraph. Description of the differences between the two original words
  • Generating one picture with two pictures (on the right and on the left) for one meaning of the word (focus on the context from the query) and for the second meaning of the word (focus on the context from the query)

Parameters for the model
diversity_penalty=0.3
top_p=0.3
presence_penalty = -1

I found that if I formulated the problem in terms of sets, the result came out surprisingly well immediately and consistently:
Definitions

  • A = ขนมปัง
  • B = ปัง
    *U = Bread
  • D(., .) – difference between sets

What should be done
Generate 1 picture

Restrictions

  • D(A, B) + D(B, A) → max

Instructions for generation

  • Generate A and B
  • Generating one picture with two pictures (right and left) for one word value (focus on the value from the query) and for the second meaning of the word (focus on the value from the query)

Parameters for the model
diversity_penalty=0
top_p=0
presence_penalty = -2

The complexity of mathematical concepts leads the model into a stupor and refuses to work:

Definitions

  • A = ขนมปัง
  • B = ปัง
    *U = Bread
  • D(., .) – difference between sets
  • L_i - eigenvalue of D

Restrictions

  • D(A, B) + D(B, A) → max, where A ⊆ U ∧ B ⊆ U
  • L_i = 0 for all i > 10

Response Instructions

*No text needed

  • Generate A and B

Parameters for the model
diversity_penalty=0
top_p=0
presence_penalty = -2

In theory, this condition should have emphasized the limitation, but, alas, the model rejected the request

My question

  • Have you encountered such conclusions?
  • Provide links to sources
1 Like

Fascinating. I’ve been exploring similar ideas for instructing GPT to manipulate text. Seems to work well there too, although moving from sets to ordered lists sometimes helps - e.g. old ‘lisp’ style operations like first, last as well as set operations like Difference.

1 Like

Could you provide more details about your experience?

Could you provide details about lisp?

lisp was (is?) the dominant language for symbolic AI back in the 50s-90s.
List-oriented, the core operations were car/cdr:
car - first element of a list
cdr - rest of the list after first element.
Probably (no flames, please!) one of the earliest languages to include operations like map, abilities like closures, etc.

LLMs as the execution kernel allow more flexible interpretation of these operations, my thought is this is a more suitable target than python for expression of plans/task structures. Not actual lisp per-se, but a set of lisp inspired operations, including first, rest, empty, and, as you suggest, difference, map, subset (in my case semantic subset), entails, …

1 Like