Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.sci.electronics > #362622
| From | Volker Bartheld <news2025@bartheld.net> |
|---|---|
| Newsgroups | de.sci.electronics |
| Subject | Re: LLM, hier Gemini |
| Date | 2025-07-20 13:43 +0200 |
| Message-ID | <1678d3d4e10be3b4d125e004c6c7a451873d357d.camel@bartheld.net> (permalink) |
| References | <gg5p7k9unfl17me920lo5mk1v2mf16d22a@4ax.com> |
In meiner einfachen Welt hat Wasser eine Wärmekapazität von 4.2 kJ/kg/K und eine
Dichte von 1kg/L. Um 1kg Wasser um 1K zu erwärmen, brauche ich folglich 4,2kJ.
Bei 6,5kW Heizleistung und 0.062L/s also:
dT = 6500J/s / (0,062kg/s * 4186J/kg*K)
Starten wir bei 11°C, kommen wir mit 100% Wirkungsgrad also bei ungefähr 36°C
an. Mit numerischen Rechnungen und der präzisen Ausführung von Algorithmen tun
sich LLMs relativ schwer, eine seit Erfindung bekannte Tatsache.
Bei ROT13("Fischers Fritz fischt frische Fische") und der Ansage, dass es sich
um eine Cäsar-Verschlüsselung bzw. einfachen Schiebecode handele, half ChatGPT
nur, dass da quasi 4x dasselbe stand, es also bruteforcen konnte. Und selbst da
verkackt das LLM es, denn bei d=13 käme für "svfpur" angeblich nicht "fische"
raus, sondern "fishec".
Für
svfpuref sevgm svfpug sevfpur svfpur
ergäbe sich nach Ansicht von ChatGPT demnach:
fischers futzb fischt fischern fischer
, was natürlich vollkommener Schwachsinn ist und nicht einmal konsistent mit der
Annahme ROT13⁻¹("svfpur")=="fishec", denn jetzt wäre das plötzlich "fischer".
Ist aber immer noch ähnlich genug zur Eingangsphrase, also rät ChatGPT einfach
und bezeichnet das frech als "Now rearranged with proper German spelling:".
Feinheiten wie statistische Worthäufigkeiten der deutschen Sprache haben wir
dabei noch gar nicht beachtet.
Oder das alte Rätsel SEND + MORE = MONEY, jeder Buchstabe entspricht exakt einer
Ziffer. Dass M = 1 ist relativ offensichtlich aus der extremalen Anschauung dass
9999 + 9999 = 19998, dann geht es aber weiter mit der reichlich wohlfeilen
Begründung "Now, we can use the method of trial and error or constraints based
on the values of each letter and check the equation until we find the
solution.", die offen lässt, ob ChatGPT einfach irgendwo schon mal ebendiesem
Rätsel in den Trainingsdaten begegnet ist, also keinen Plan hat, sondern einfach
in den "Erinnerungen" kramt.
Old News also. Wenn ich aber ein C++ Programm will, was (stark vereinfacht) das
tut, was LLMs eben so tun, also etwa Folgendes:
"Wähle Dir ein Startwort, drucke es aus. Nimm einen - idealerweise
riesigen - Text und suche darin alle Treffer des Startworts. Erstelle
Dir eine Liste des einen Zeichen, das jeweils nach diesem Startwort
kommt. Ziehe aus dieser Liste zufällig ein beliebiges Element. Drucke
dieses Zeichen. Hänge das Zeichen ans Startwort an und entferne das
führende Zeichen, sodaß die Länge gleich bleibt. Weiter mit der Suche
wie oben."
, dann kommt man relativ schnell ans Ziel - sogar mit einer stark optimierten
Variante *), die std::map benutzt, auch ohne C++ Entwickler zu sein. Ich habe
dem Code die englische Netzbilbel zum Fraß vorgeworfen und "and god said" als
Startwert verwendet (Gott spricht in der Bibel ja relativ viel, da bietet sich
das an) und bekam:
"and god said, this have i found grace in your eyes for the dead. for as
in the days of his life. the woman saw samuel, she cried with a loud
voice, came out of egypt. wherefore then hast thou seen all their host
shall fall and perish at the rebuking of the north gate, were two
thousand and five hundred in rows round about, saying, who is this that
is written in the land of egypt? and the philistines, and out of the
countries; because it seeth him not, neither understandest thou what
thou readest? and he said unto them, when any man came nigh to the city.
and, behold, one like the similitude of oxen, which could not discern
the signs of the times that are written in the law? jesus said, who hath
raised up the palaces in the land of egypt is before jeshimon, by the
way. but the hand of the priests, the levites after their ways, nor done
after their families, after their ways, and according to the generation
seeketh love; but he that heareth speaketh vanity: his heart is lifted
up, and upon every cornfloor."
Und zwar aus bestenfalls 50 Zeilen funktionalem Code.
Wer das gut findest (Marketinggeblubber wäre vermutlich noch lustiger,
Freiwillige vor!), findet auch ChatGPT Klasse. Hochinteressant übrigens,
wie die Länge des Eingabetextes und des Suchstrings (neudeutsch würde
man inzwischen wohl "Prompt" sagen) mit der Qualität der Ausgabe
korreliert.
Wenn ich statt oben "and god said" nur "god" als Startstring wähle, wird es eher
konfuses Gestammel und bei "a" landen wir endgültig auf lallendem
Kleinkindniveau. Einstellbare Demenz - von Einstein bis Heil!wanger, ist das
nicht geil?
Und zu den primären Herausforderungen denen sich unsere Schüler im modernen
Schulalltag stellen müssen, schaust Du vielleicht ein paar Videos von Prof.
Bernhard Krötz, exemplarisch: https://www.youtube.com/watch?v=VG5QzQ7F8pI
Danach wundert Dich gar nichts mehr.
Einen schönen Sonntag noch,
Volker
On Sun, 2025-07-20 at 09:55 +0200, Thomas Prufer wrote:
> Ich: Ein elektrischer Durchlauferhitzer mit 6,5 kW erhitzt 3,7 Liter/min von
> 11°C auf wieviele Grad?
> [KI-Geschwurbel]
> Ich: Berechne 6500 J/s / (0,062 kg/s * 4186 J/kg*K)
> Gemini: Die Temperaturdifferenz beträgt ungefähr 248 Kelvin.
> Ich: 6500/(0,062*4186)
> Gemini: 6500 / (0,062 * 4186) ˜ 25
> "Was bedeutet dieses Ergebnis im Kontext unserer ursprünglichen Frage?
> In unserer ursprünglichen Berechnung zur Temperaturerhöhung eines
> Durchlauferhitzers haben wir herausgefunden, dass unter idealen Bedingungen
> (keine Wärmeverluste, keine Phasenübergänge) das Wasser um etwa 25 Kelvin
> erwärmt werden könnte."
> [noch mehr KI-Geschwurbel]
> Der Stoff ist wohl achte Klasse Physik. In einer Prüfung/ Schularbeit/
> Leistungskontrolle hätte ein Achtklässler grade noch nen Vierer bekommen,
> oder?
*)
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <csignal> // For signal handling
// Signal handler function
volatile sig_atomic_t flag = 0; // Global flag to indicate if CTRL-C was pressed
void signalHandler(int signum) {
flag = 1; // Set flag to indicate CTRL-C was pressed
}
// Function to load the text file into a provided string reference
bool loadFile(const std::string& filePath, std::string& content) {
std::ifstream file(filePath);
if (!file.is_open()) return false;
content.assign((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
return true; // Return true to indicate success
}
// Create large random value with upper bound
unsigned int largeRand(unsigned int upper) {
unsigned int accumulatedRandomValue = 0;
const unsigned int totalParts = upper / RAND_MAX, remainingPart = upper % RAND_MAX;
for (unsigned int i = 0; i < totalParts; ++i) accumulatedRandomValue += std::rand(); // Generate accumulated random value in parts
accumulatedRandomValue += std::rand() % remainingPart; // Add the remaining part
return accumulatedRandomValue;
}
// Randomly select character from frequencies based on relative frequency
typedef std::map<char, unsigned int> frequenciesT;
char select(const frequenciesT& frequencies) {
unsigned int totalFrequency = 0;
for (const auto& pair : frequencies) totalFrequency += pair.second; // Calculate total frequency
// Select a character based on its frequency
unsigned int cumulativeFrequency = 0;
const unsigned int accumulatedRandomValue = largeRand(totalFrequency);
for (const auto& pair : frequencies) {
cumulativeFrequency += pair.second;
if (accumulatedRandomValue < cumulativeFrequency) return pair.first;
}
// This should not happen if frequencies are correct, but return a default value just in case
return '\0';
}
// Compute frequencies of characters immediately following match in input
typedef std::map<std::string, frequenciesT> stringmapT;
size_t computeFrequencies(const std::string& input, const std::string& match, stringmapT& frequencies) {
if (frequencies.find(match) != frequencies.end()) return 0; // Match already exists in frequencies, no need to compute frequencies again
size_t count = 0;
size_t pos = 0;
while ((pos = input.find(match, pos)) != std::string::npos) {
if (pos + match.size() < input.size()) { // Ensure we don't go out of bounds when fetching the character after the match
char nextChar = input[pos + match.size()];
frequencies[match][nextChar]++; // Update the frequencies map
count++; // Increment match count
}
pos += match.size(); // Move to the next position after the current match
}
return count; // Return the number of matches found
}
int main(int argc, char* argv[]) {
if (argc < 3) {
std::cerr << "Usage: " << argv[0] << " <file_path> <search_string>" << std::endl;
return 1;
}
srand(static_cast<unsigned int>(time(nullptr))); // Seed std::rand
std::string filePath = argv[1];
std::string match = argv[2];
std::string input;
stringmapT frequencies;
if (!loadFile(filePath, input)) return 1; // Exit the program if file loading fails
std::cout << match;
// Register signal and signal handler
signal(SIGINT, signalHandler);
while (!flag) { // Loop until flag is set by the signal handler
computeFrequencies(input, match, frequencies); // Compute frequencies of characters following match in input
char c = select(frequencies[match]); // Randomly select one
if ('\0' == c) return 1;
std::cout << c;
match += c; // Append selected character
match.erase(0, 1); // Remove first one
}
return 0;
}
Back to de.sci.electronics | Previous | Next — Previous in thread | Next in thread | Find similar
LLM, hier Gemini Thomas Prufer <prufer.public@mnet-online.de.invalid> - 2025-07-20 09:55 +0200
Re: LLM, hier Gemini Volker Bartheld <news2025@bartheld.net> - 2025-07-20 13:43 +0200
Re: LLM, hier Gemini Marcel Mueller <news.5.maazl@spamgourmet.org> - 2025-07-20 22:35 +0200
Re: LLM, hier Gemini Volker Bartheld <news2025@bartheld.net> - 2025-07-20 23:40 +0200
Re: LLM, hier Gemini Thomas Prufer <prufer.public@mnet-online.de.invalid> - 2025-07-21 09:14 +0200
Re: LLM, hier Gemini Arno Welzel <usenet@arnowelzel.de> - 2025-07-20 16:26 +0200
Re: LLM, hier Gemini Marcel Mueller <news.5.maazl@spamgourmet.org> - 2025-07-31 23:37 +0200
Re: LLM, hier Gemini Heinz Schmitz <sch@example.invalid> - 2025-08-01 08:21 +0200
csiph-web