You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: adoc/articles/javaspektrum-llama3-java.adoc
+5-4
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Jetzt können wir das gerade heruntergeladene Modell ausführen und eine Frage s
64
64
Das kleine Modell ist wie gesagt, nicht besonders gut, oft kommen sehr fragwürdige Antworten.
65
65
Daher sollte auch in kritischen, praktischen Anwendungen nur die Sprachfähigkeiten der LLMs, aber möglichst nicht ihr "Wissen" benutzt werden, sondern dieses aus vertrauenswürdigen Quellen, wie Datenbanken beziehen (mittels Retrieval Augmented Generation - RAG).
66
66
67
-
.Listing {listing}
67
+
.Listing {listing} - Test mit jbang, erste Frage
68
68
[source,shell]
69
69
----
70
70
jbang Llama3.java --model ../$MODEL --prompt "Kurz: Wie funktioniert physikalisch ein Induktionsherd?"
@@ -231,13 +231,14 @@ Zum Glück ist bei GGUF/GGMF das Token-Vokabular direkt in das Modelldatei integ
231
231
232
232
Die Hauptprobleme für Tokenizierung treten bei asiatischen Sprachen z.b. mit Kanji und interessanterweise mit Emoji auf.
233
233
234
-
Die `Tokenizer` Klasse kümmert sich um die Konvertierung zwischen Text und den Token-Ids:
234
+
Die `Tokenizer` Klasse (Listing {counter:listing}) kümmert sich um die Konvertierung zwischen Text und den Token-Ids:
235
235
236
236
* Implementiert den "Byte Pair Encoding" (BPE) Algorithmus
Konfigurierbare Auswahl des nächsten Token aus dem Vektor der Wahrscheinlichkeitsverteilung (Logits) abhänging von Temperatur, Top-P aber auch Grammatik- oder Funktionssignatur-getriebene Auswahl.
399
400
400
-
Es gibt verschiedene Sampling-Strategien:
401
+
Es gibt verschiedene Sampling-Strategien, siehe Listing {counter:listing}:
401
402
402
403
* `Sampler`: Basis Sampler Strategie Interface
403
404
* `CategoricalSampler`: Global nach Wahrscheinlichkeitsverteilung
Copy file name to clipboardexpand all lines: adoc/mcp-neo4j.adoc
+27-17
Original file line number
Diff line number
Diff line change
@@ -394,6 +394,7 @@ MCP follows a https://modelcontextprotocol.io/docs/concepts/architecture[client-
394
394
The protocol layer handles message framing, request/response linking, notificaitons and high-level communication patterns.
395
395
396
396
The MCP allows for different transport protocols, currently supported are HTTPS (with Server-Sent-Events (SSE) for server->client messages and HTTP POST for client->server) and STDIO for local servers where the server is started by the client and can communicate via stdin/stdout.
397
+
The protocol has a lifecycle of initialization, message exchange and termination.
397
398
398
399
All transport messages exchanges are based on a https://spec.modelcontextprotocol.io/specification/[specification^] using JSON-RPC 2.0.
399
400
So it encourages to implement the protocol in other languages or transport layers.
@@ -407,6 +408,15 @@ The based message types are:
407
408
408
409
With additional relevant aspects being configuration, progress tracking, cancellation, error reporting, logging.
409
410
411
+
Message types are:
412
+
413
+
* Client->Server: Requests (expect response) and Notifications with method name and parameters.
414
+
* Server->Client: Notifications, Results (Dictionary), and Errors (code, message, data) with some error codes from the JSON RPC spec and others from the application/SDKs.
415
+
416
+
The MCP site also documents sample client and server implementations in Python and TypeScript to enable implementers to get started quickly.
417
+
Additionally it provides a list of good practices to adhere to for security, error handling and request processing.
418
+
419
+
410
420
The protocol spec is also considering *security and trust*, which is an important aspect when allowing LLMs to access external data sources, because especially with write access to databases and filesystems and servers running locally and the potential for malicious code execution, security is a top priority.
411
421
The foundation models are known to be vulnerable to adversarial attacks and hallucinations.
412
422
Often LLM users are non-technical and might not be aware of the risks involved in allowing an AI model to access their data.
@@ -491,23 +501,23 @@ There is a small check that we only allow read statements in the read tool and v
0 commit comments