Re: [OT] Re: the 'original' string function?

2024-07-14 Thread Emanuel Berg
> Here is the AI script! > > It is all CLI/TUI, all FOSS, and all local execution/storage > as well. [...] I have stored it here: https://dataswamp.org/~incal/ai/ori I'm very happy with this solution and would like to thank everyone for helping me out and making me aware of new concepts and t

Re: [OT] Re: the 'original' string function?

2024-07-14 Thread Emanuel Berg
Here is the AI script! It is all CLI/TUI, all FOSS, and all local execution/storage as well. #! /bin/zsh # # Find the most original sentence in a text file. # # uses: # mistral-7b-instruct-v0.2.Q5_K_M.llamafile # llamafile v0.8.5 # # usage: # $ ori input.txt # outputs to input-ori.txt src=

Re: [OT] Re: the 'original' string function?

2024-07-14 Thread Emanuel Berg
> Anyway, the context is big enough to play around with for > now then. Yes, this method works, I think? I used it again with CONTEXT / QUERY and, as context, had the 5 first parts of this: http://www.scifiscripts.com/scripts/starship_troopers.txt then query: What sentence is the most origina

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
jeremy ardley wrote: > Ask ChatGPT4 . Explain what you are trying to do and get it > to give you a suitable context and prompt I don't know what to ask exactly, maybe I can ask ChatGPT4 ... > localdocs contains text you trust that can be used in > responses in preference to something synthesised

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread jeremy ardley
On 14/7/24 13:52, Emanuel Berg wrote: jeremy ardley wrote: Then create a prompt/context with the search text and instructions to generate a similarity index and report any that meet some threshold. You will have to get the results in some format such as json and post process You may want t

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
jeremy ardley wrote: > Then create a prompt/context with the search text and > instructions to generate a similarity index and report any > that meet some threshold. > > You will have to get the results in some format such as json > and post process > > You may want to get ChatGPT 4 to help you cr

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
> The answer is 1. "Here, in this thread, the context thing > with respect to AI, anyone having any luck knowing what to > do with that?" > > This sentence is original because it starts the discussion > about context in the thread. Ah, there we have the next project: The 'origin' string function!

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
jeremy ardley wrote: > the 2048 is tokens which is approximately the number of > words in a prompt, so not character count. Ah, right. > The context explains how you want it to respond and the > prompt is the actual question. See the other mail, I don't know if the labels should look in a certa

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
So I used a text file mail.txt and fed it to the AI. Well, well! What do you say? I'll let you read the whole file to find out who won - and why! Here is what the mail.txt file looked like: Here is the context: >> Here, in this thread, the context thing with respect to AI, >> anyone having any

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread jeremy ardley
On 14/7/24 12:56, Emanuel Berg wrote: You can, but how much? So this is the context? You mean include it in the prompt? Then it is more easy to find in the llamafile(1) man page, it is probably this -c N, --ctx-size N Set the size of the prompt context. A larger

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
jeremy ardley wrote: >> Here, in this thread, the context thing with respect to AI, >> anyone having any luck knowing what to do with that? It is >> mentioned 14 times in llamafile(1) but not how to actually >> set it up with your own data? > > One way to set context is via the http api which is o

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread jeremy ardley
On 14/7/24 11:41, Emanuel Berg wrote: I've made several improvements, including adding the `string-distance-percentage' that was mentioned. But let's forget about that branch [1] or visit that URL for the latest source on that. Here, in this thread, the context thing with respect to AI, anyon

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
> Okay, let's do it like this, here is the file, maybe > I'm blind. Here is it for download as well if you want to use your own pager: https://dataswamp.org/~incal/tmp/llamafile.1 -- underground experts united https://dataswamp.org/~incal

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
> I yank the source last [...] I've made several improvements, including adding the `string-distance-percentage' that was mentioned. But let's forget about that branch [1] or visit that URL for the latest source on that. Here, in this thread, the context thing with respect to AI, anyone having a

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
tomas wrote: > If you are doing this in Emacs Lisp, after all, there /is/ > a Levenshtein distance function in there. Finding its name > is left as an exercise to the reader, though... (I know of course, `string-distance'.) I thought I was just going to experiment some in Elisp but now I've done

Re: [OT] Re: the 'original' string function?

2024-07-13 Thread Emanuel Berg
jeremy ardley wrote: > In your case, without fully knowing precisely what your aim > is, one possible approach is to put all the text you want to > search into a GPT4All localdocs directory where it will be > indexed on the fly. Then create a prompt/context with the > search text and instructions

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread tomas
On Wed, Jul 10, 2024 at 08:53:40PM +0200, Emanuel Berg wrote: > Here is a piece of code after all wild ideas, but uncoded. [...] > ;;; -*- lexical-binding: t -*- [...] If you are doing this in Emacs Lisp, after all, there /is/ a Levenshtein distance function in there. Finding its name is left a

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread jeremy ardley
On 10/7/24 23:41, Emanuel Berg wrote: jeremy ardley wrote: The modern way would be to use a LLM in API mode and set a context to achieve your aims. Here is the command. Turns out, I used the llamafile method with llava or mistral as LLMs. In the command, we see '-c 2048'. This, says the m

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Here is a piece of code after all wild ideas, but uncoded. I think I can come up with a lot of those! They should compare the data but as close to the way a human thinks as possible. So, the size of something was my initial idea as that is a very human first thing to note. Who has the biggest ho

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
tomas wrote: > Uh -- it was a quote. They aren't supposed to be original. Spoiler alert: This post contains higher-order originality. I mentioned computing the similarity with a bunch of tests. The result can then be expressed as a string of test results. And what happens next? You guessed it,

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread tomas
On Wed, Jul 10, 2024 at 06:03:46PM +0200, Emanuel Berg wrote: > tomas wrote: > > > ChatGPT is bullshit This is not a comment, but the title of an academic article. Worth reading, BTW. Link is in my original post. > Without context then: > > The comment "ChatGPT4 is bullshit" is not original

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Greg Wooledge wrote: > The problem will be something at the PhD level which the OP > somehow believes is a high school level problem. > > I lost all faith when the OP revealed that their initial > problem description was just an *instance* of some > overarching question, and that they really wante

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Nicolas George wrote: > You cannot have a more general basic mechanical algorithm > unless you know what you want it to do. I think one should do a network of nodes that all have computed distances to every other and the one with the longest sum of distances is the most isolated, so, most origina

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Nicolas George wrote: > You still need to define unlike. That's an idea! You define similarity and the least similar to its most similar other item is the most original. Best suggestion yet? Or, did you think it quite, but not exactly like that? -- underground experts united https://dataswam

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Greg Wooledge wrote: > I lost all faith when the OP revealed that their initial > problem description was just an *instance* of some > overarching question, and that they really wanted an > n-dimensional generalization of that already bleeding-edge > research question. Oh, no, don't worry, this i

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
debian-user wrote: >> You can use that: >> >> https://en.wikipedia.org/wiki/Levenshtein_distance > > Levenshtein distance isn't suited to the problem. > It compares the entirety of two strings. Emanuel is > interesting in comparing one string against substrings of > a potentially much larger stri

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
tomas wrote: > ChatGPT is bullshit Without context then: The comment "ChatGPT4 is bullshit" is not original as it is a common expression used to express frustration [...] Not a bad start! I agree that comment would score between 0 and 5 as it doesn't have any originality to it, really. --

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
jeremy ardley wrote: > The modern way would be to use a LLM in API mode and set > a context How do I set the context? That is the backlog file, right? This is the step that is missing from my commands. -- underground experts united https://dataswamp.org/~incal

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
jeremy ardley wrote: > The modern way would be to use a LLM in API mode and set > a context to achieve your aims. Here is the command. Turns out, I used the llamafile method with llava or mistral as LLMs. In the command, we see '-c 2048'. This, says the man file, is to "Set the size of the promp

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Greg Wooledge
On Wed, Jul 10, 2024 at 14:41:30 +0200, Nicolas George wrote: > debian-u...@howorth.org.uk (12024-07-10): > > Levenshtein distance isn't suited to the problem. > > Either your crystal ball is much better than mine or you are trusting > yours too much, because we have not been told what the problem

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
debian-u...@howorth.org.uk (12024-07-10): > Levenshtein distance isn't suited to the problem. Either your crystal ball is much better than mine or you are trusting yours too much, because we have not been told what the problem is. > It compares th

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread debian-user
Nicolas George wrote: > Emanuel Berg (12024-07-10): > > Okay, this is gonna be a challenge to most guys who have been > > processing text for a long time. > > > > So, I would like a command, function or script, 'original', > > that takes a string STR and a text file TXT and outputs > > a score, f

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Nicolas George wrote: >> The modern way would be to use a LLM in API mode and set >> a context to achieve your aims. > > All modern languages have some kind of rand() function. > I assumed the OP wanted to do something useful with > the answers. Yes, of course! /B. A. Original -- underground e

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
Emanuel Berg (12024-07-10): > Indeed, one can have a bunch of such rules and apply them and > award points and stuff. > > But maybe one could also have a more general, basic > mechanical/math/stats inspired algorithm? You cannot have a more general basic mechanical algorithm unless you know what

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
jeremy ardley wrote: > The modern way would be to use a LLM in API mode and set > a context to achieve your aims. > > You can do this locally using a LLM hosted on your computer > or you can use a remote API such as ChatGPT. Okay, great, I already have this installed from the console, all setup j

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Emanuel Berg
Nicolas George wrote: > You can use that: > > https://en.wikipedia.org/wiki/Levenshtein_distance > > But you also need to define what you want with more > precision: > > How do you count the replacement of a word by a synonym? > > How do you count a change in the order of the words? > > How do you

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread tomas
On Wed, Jul 10, 2024 at 12:31:25PM +0200, Nicolas George wrote: > jeremy ardley (12024-07-10): > > The modern way would be to use a LLM in API mode and set a context to > > achieve your aims. > > All modern languages have some kind of rand() function. Which is way more CO2 efficient, at that :-)

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
jeremy ardley (12024-07-10): > The modern way would be to use a LLM in API mode and set a context to > achieve your aims. All modern languages have some kind of rand() function. I assumed the OP wanted to do something useful with the answers. Regards, -- Nicolas George

Re: [OT] Re: the 'original' string function?

2024-07-10 Thread jeremy ardley
On 10/7/24 18:01, Nicolas George wrote: Emanuel Berg (12024-07-10): Okay, this is gonna be a challenge to most guys who have been processing text for a long time. So, I would like a command, function or script, 'original', that takes a string STR and a text file TXT and outputs a score, from

[OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
Emanuel Berg (12024-07-10): > Okay, this is gonna be a challenge to most guys who have been > processing text for a long time. > > So, I would like a command, function or script, 'original', > that takes a string STR and a text file TXT and outputs > a score, from 0 to 100, how _original_ STR is,