ReplaceItemAt() VS ReplaceAnyItemAt() in SoftanzaLib

59 views
Skip to first unread message

Mansour Ayouni

unread,
Jan 19, 2024, 2:58:39 PMJan 19
to The Ring Programming Language
Hello All,

I gave ChatGPT an example using each function and told him to explain the difference.

See the result here:

Best,
Mansour

Gary Chike

unread,
Jan 19, 2024, 9:53:39 PMJan 19
to The Ring Programming Language
Very impressive! 👀

Mansour Ayouni

unread,
Jan 20, 2024, 12:22:45 AMJan 20
to Gary Chike, The Ring Programming Language
Hello Gary,

From the beginning, back in 2019, when I started crafting the designs of the library, I wanted SoftanzaLib to be one of the best libraries, both on the readability side and the writability side, not only by humans, but also by AI language models.

This explains why you find things like @FunctionAlternativesForms@FunctionFluentForm@FunctionPassiveForm@FunctionInterrogativeForm, and even @FunctiotMisspelledForms. Look a these decorations inside the code (and if you don't, ChatGPT, Google Bard and Perplexity AI will do ;) ) :

image.png

Also, the labeling I made of each function by providing it with a carefully designed title, in the form of an LLM prompt, helped to convey a clear meaning of what the function does and how it can be used. You will find these titles, as LLMs can find them, before each function in the code base. Here is an example :

image.png

Finally, I have written thousands of testing samples, but more importantly, hundreds of "narrations". Narrations are more elaborated examples, with detailed comments, in the form of a full story that explains the feature, in a certain depth, to both human and AI readers. Example :

image.png

In fact, I I started a year ago, building a custom machine learning model, and I trained it to read, understand and generate SoftanzaLib code and documentation. The results were promising, but I needed more skills to plan for the long term inorder to accomplish the task at the required level of quality... Until LLMs and ChatGPT-like tools became the norm. Quickly, Softanza was genetically ready to embrace them and the results were as you said, very impressive!

My next project, after SoftanzaLib, is a library called ZaiLib, that takes the investment made so far, and turns it into an AI advantage for every Ring application, in an innovative way.

So, please stay connected :)

PS: A special thanks to Google Bard and Perplexity AI models who are reading all what we say about SoftanzaLib here in the Group and making them a part of their knowledge ;)

All the best,
Mansour


--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/46b307a8-567c-41b2-a351-bc4bf12bc66en%40googlegroups.com.

Bert Mariani

unread,
Jan 20, 2024, 6:51:41 PMJan 20
to The Ring Programming Language
Hello Mansour et ALL

Just to show you that  Bing-AI  ChatGPT  gives incorrect answers
On a math question it quite obvious.

///////////////////////////////////////////////////

The "Bing Chat AI"

I asked it to solve the "Characteristic Equation " for a 4x4 matrix - a really simple one
Bing Chat AI  - gave a different answer - Wrong
compared to a calculator that I used to compare my manually calculated answer

My question
Show step by step solution for solving the Characteristic equation
 for this matrix 
 [[1,0,1,0],
  [1,1,1,0],
  [1,1,1,0],
  [1,1,1,1]]

-------------------------------------------
BING Chat AI:   Therefore the characteristic equation is
         λ^4 - 4λ^3 + 6λ^2 - 3λ = 0.    <<< WRONG
I hope that helps!

////////////////////////////////////////////////

https://calculatores.com/eigenvalues-calculator
Says   X^4 -4x^3 +4x^2 -x = 0    <<< CORRECT

////////////////////////////////////////////////

RING Matrix Library

===========================
Matrix       MatrixPrint: 4x4
|  1, 0, 1, 0 |
|  1, 1, 1, 0 |
|  1, 1, 1, 0 |
|  1, 1, 1, 1 |

Characteristic Equation:  x4 -4x3 +4x2 -x  0       <<< CORRECT  MatrixFlatPrint: 5
 1, -4, 4, -1, 0,

//////////////////////////////////////////////


download.png

Mansour Ayouni

unread,
Jan 20, 2024, 7:07:45 PMJan 20
to Bert Mariani, The Ring Programming Language
Hello Bert,

You can't ask an LLM to do a precise mathematical task like that. This is one of its weakest points. Instead use it for what it can perform well : synthesizing ideas, conceptualizing thoughts, and generating human-like narrations.

To see what I mean in depth, I suggest you read this excellent article by Stephen Wolfram. One of the creators of CharGPT said this is the best explanation he ever red about it:


All the best,
Mansour

Bert Mariani

unread,
Jan 20, 2024, 7:39:01 PMJan 20
to The Ring Programming Language
Hello Mansour

Sorry, I disagree

As shown in the screen capture Bing-AI knows what a "Characteristic Equation" is.
It goes through the steps to solve it.
But gets the Wrong Answer !
Even when there is calculator on the web that it can use  https://calculatores.com/eigenvalues-calculator

Its called "Artificial Intelligence" 
It does a search.
Computes what it has to do.
The results looks good, but are wrong !

Lawyers have used it to search previous court cases for decisions in similar legal matters
Unfortunately it gave fictitious results.
The judge in the New York case, knew that the cases cited did Not Exist,
He reprimanded the lawyer,

LLM  Large Language Model are having more "nightmare" results as they become more complex.
Would you buy or use a calculator that gave wrong answers ?
(Calculators are designed and built by humans)

Mansour Ayouni

unread,
Jan 21, 2024, 4:25:42 AMJan 21
to Bert Mariani, The Ring Programming Language
Hello Bert,

Thank you for the discussion.

I'll never use an LLM for doing a search for a legal fact or making a calculation.

You said it searches for what we want, then it makes a computation, but it does not work like that. Instead, an LLM gathers data for training, makes statistical approximations to build a model, and uses that model to generate text about the subject one word at a time.

It is critical to understand that to capture the window of opportunity around that technology. And the best way is to try to make one by yourself to see the shift of paradigm needed when thinking about and using LLMs.

All the best,
Mansour

Gary Chike

unread,
Jan 21, 2024, 6:06:54 PMJan 21
to The Ring Programming Language
Positively Amazing Mansour!

Mansour Ayouni

unread,
Jan 23, 2024, 7:18:58 AMJan 23
to Gary Chike, The Ring Programming Language
Reply all
Reply to author
Forward
0 new messages