SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Raku/Perl für
KI-Anwendungen:
Request for Erfahrungsaustausch
@26GPW2024 FfM, Lightning Talk 20240416
Alexander SIGEL (sigel@asigel.de)
v1 20240416 00:27
tl;dr
●
Motivation: Mein Interesse an (textbasierter) KI, ML, Semantik, Raku
●
Ziel: KI-Anwendungen erstellen basierend auf
LLMs, Machine Learning, Semantik, mit/integriert in Raku/Perl
●
Anregung: Ich werde kurz Hinweise geben auf existierende Infrastruktur in Perl/Raku, in
Raku insbesondere die Module von Anton Antonov (https://raku.land/zef:antononcube) -
im Anhang Hinweise auf Semantik
●
Gesucht: Austausch/Vernetzung mit anderen zur Infrastruktur, welche Raku/Perl bietet
für KI/LLMs, Machine Learning, Semantik und zu Erfahrungen im Einsatz. Mein Lernweg ist
noch am Anfang. Huhu? Ist da noch wer?
●
Bousfrage für Call to Action: Warum gibt es da nicht mehr trotz aktuellen Boom, woran liegt
es, was wollen wir daran wie ändern?
s.a. AI Perl committe minutes
Fun: Bilder nach Stichworten generieren
[AAv2] Anton Antonov, "Racoons playing with pearls and onions"
(2023), YouTube/@AAA4Prediction
https://www.youtube.com/watch?v=zlkoNZK8MpU
Allererste Startpunkte ...
Perl:
●
KI für Perl verfügbar machen:
Larry Wall: The Perl Community Roadmap :: The AI Perl Committee: Organizing Perl's Artificially Intelligent Future
https://perlcommunity.org/ai/
●
Existiert seit 8/2023 lt. Meetings. Treffen sich alle zwei Wochen. Offenbar aktuelle Meetings, zuletzt 4.4.2024
●
https://gitlab.com/aiperl/ai-perl-committee/-/tree/main/meetings
●
Grants, monatliche Hackathons, aktuelle Entwicklungen, laufende/angestoßene Projekte, Geldmangel
●
TensorFlow, PerlGPT, ChatGPU Navi (Navi AI) [ Navi v1.5 including LLaMa v2 and TensorFlow v2]
●
Staney Joseph (Nov 6, 2023):
Understanding the Basics of Perl for Text Processing with AI Features
https://medium.com/@staneyjoseph.in/understanding-the-basics-of-perl-for-text-processing-with-ai-features-673e55728db9
(hinter paywall)
●
Perl AI Deep Learning Tutorial
https://en.deeplearning.perlzemi.com/
Perl: AI/ML: Ausgewählte Module (1)
AI::-Module
●
AI::CBR
●
AI::Chat
●
AI::ExpertSystem
●
AI::Image
●
AI-NeuralNet-SOM Perl extension for Kohonen Maps Robert Barta
●
AI::MXNet (MXNet ist veraltet?)
●
AI::Prolog Verbindung mit tolog, Lars-Marius Garshol https://www.garshol.priv.no/download/text/tolog.pdf
https://link.springer.com/chapter/10.1007/11676904_17
●
AI::Categorizer
●
AI::Ollama https://metacpan.org/dist/AI-Ollama-Client Get up and running with large language models
__locally__!
●
AI::PredictionClient Google TensorFlow
●
AI::TensorFlow a fast and lightweight markov engine intended to replace AI::MegaHAL um innerhalb des Perl-
Universums zu bleiben
MegaHAL ist Markov, selbst aber genutzt für Konversationssystem wie Eliza, aber Markov-basiert
Perl: AI/ML: Ausgewählte Module (2)
Hailo https://metacpan.org/pod/Hailo
●
Logic https://metacpan.org/pod/Logic
●
OpenAIGPT4 https://metacpan.org/pod/OpenAIGPT4
Interact with the OpenAI GPT-3,4 API
●
OpenAI::
●
https://gitlab.com/aiperl/perlgpt
●
...
Perl: AI/ML: Ausgewählte Module (3)
●
Algorithm::SVMLight
●
MLPerlMachine Learning in Perl, Using the RPerl Optimizing Compiler
A collection of algorithms and data structures used for building machine learning
applications in Perl. For general info: <http://mlperl.org>
●
Paws::MachineLearning Perl Interface to AWS Amazon Machine Learning
Definition of the public APIs exposed by Amazon Machine Learning For the AWS API doc,
see <https://docs.aws.amazon.com/goto/WebAPI/machinelearning-2014-12-12>..
●
AI::MXNet Perl interface to MXNet machine learning library
●
Perl interface to MXNet machine learning library. MXNet supports the Perl programming
language. The MXNet Perl package brings flexible and efficient GPU computing and
state-of-art deep learning to Perl. It enables you to write seamless tensor/matrix ...
Raku: AI/ML: Ausgewählte Module (1)
●
Gibt es gute technische Integration mit Raku/Perl?
ja, aber begrenzt
●
Anregung: Mit Raku-Modulen von antononcube anfangen
●
Wer kennt Anton Antonov bzw. hat dessen Raku-KI-Module schon gesehen, sich damit
befasst, setzt diese ein?
●
https://github.com/antononcube
●
https://raku.land/zef:antononcube
●
https://rakuforprediction.wordpress.com/ Blog zu Raku mit AI
Folgerichtige Erweiterung von Mathematica, R etc. for Prediction)
●
https://www.youtube.com/@AAA4prediction Videos dazu
●
Ggf. Erfahrungen damit? Mit Jupiter Notebooks?
●
Erfahrungen mit LLM und Perl/Raku-binding?
Raku: AI/ML: Ausgewählte Module (2)
●
z.B.:
●
Data::
●
* Importers fürs Reinschlürfen von Daten. Datentypen: z.B. CSV, HTML, PDF, Text, Bilder
●
* Summarizers fürs Zusammenfassen
●
DSL::English::LatentSemanticAnalysisWorkflows
●
DSL::Entity::MachineLearning
●
* EBNF
●
Jupyter::Chatbook .ipynb
●
pure Raku implementation of a Raku kernel for Jupyter clients.
●
Jupyter notebooks provide a web-based (or console-based) Read Eval Print Loop (REPL) for
running code and serializing input and output.
●
https://github.com/bduggan/raku-jupyter-kernel
Raku: AI/ML: Ausgewählte Module (3)
●
LLM::
●
Containerization, Functions, Prompts
●
Markdown::Grammar
●
ML:: (Machine Learning)
●
ML::FindTextualAnswer Raku package
●
WWW:: (Schnittstellen zu LLM-APIs)
●
Gemini, LLaMA, MermaidInk, MistralAI, OpenAI, PaLM
●
z.B. WWW::MistralAI
●
This Raku package is much "less ambitious" than the official Python package,
[MAIp1], developed by MistralAI's team
Raku/Perl überhaupt geeignet für AI? (1)
●
Welche Programmiersprachen sind denn besonders gut geeignet für AI/LLM?
●
Gehört Raku/Perl dazu? Ich sage ja, aber die Lemminge sehen das nicht so. „Exotenposition“
●
Wer setzt in Deutschland Raku überhaupt professionell ein? Wofür?
●
"[u]nfortunately Perl support for current AI/ML libs does not seem to exist publicly." (2017)
https://blogs.perl.org/users/davehodg/2017/11/perl-and-ai.html
●
Kosta Mitrofanskiy (January 27, 2024): The Top 10 Programming Languages Powering AI and Machine Learning
https://intellisoft.io/best-programming-language-for-ai-and-machine-learning/
Perl/Raku ist nicht darunter ...
●
"A hunch that LLMs and Perl will be best friends and contribute to a renaissance in the popularity of Perl."
"Loose typing and TIMTOWTDI may be (...) good for LLMs. Raku might do it better."
Quelle:
https://www.reddit.com/r/perl/comments/13wb7o3/a_hunch_that_llms_and_perl_will_be_best_friends/?rdt=40188
●
Warum Perl nicht stärker für KI genutzt? Weil mehr Leute (Neulinge) Python können/lernen und günstiger / leichter zu ersetzen sind ...
Philips Jordan (June 8, 2023): Why is perl not used for artificial intelligence?
https://cloud2data.com/why-is-perl-not-used-for-artificial-intelligence/
Thesen halte ich für bestreitbar, aber Fakt ist trotzdem, dass Perl/Raku kaum genutzt für KI im Vergleich zu anderen Sprachen
Raku/Perl überhaupt geeignet für AI? (2)
●
"Python is eating our lunch" in new AI genre in the past 1 year,
this is an opportunity for Perl to get back in the game, if TPF
doesn't have money then we should ask other Perl companies to
help, Python code is just dumb wrappers around text processing
and pre-written prompts, there's no reason why Perl shouldn't be
able to make it happen
●
https://gitlab.com/aiperl/ai-perl-committee/-/blob/main/
meetings/20231019_meeting_agenda_and_minutes.md
Raku/Perl überhaupt geeignet für AI?
●
Welche Programmiersprachen sind denn besonders gut geeignet für AI/LLM?
●
Gehört Raku/Perl dazu? Ich sage ja, aber die Lemminge sehen das nicht so. „Exotenposition“
●
Wer setzt in Deutschland Raku überhaupt professionell ein? Wofür?
●
"[u]nfortunately Perl support for current AI/ML libs does not seem to exist publicly." (2017)
https://blogs.perl.org/users/davehodg/2017/11/perl-and-ai.html
●
Kosta Mitrofanskiy (January 27, 2024): The Top 10 Programming Languages Powering AI and Machine Learning
https://intellisoft.io/best-programming-language-for-ai-and-machine-learning/
Perl/Raku ist nicht darunter ...
●
"A hunch that LLMs and Perl will be best friends and contribute to a renaissance in the popularity of Perl."
"Loose typing and TIMTOWTDI may be (...) good for LLMs. Raku might do it better."
Quelle:
https://www.reddit.com/r/perl/comments/13wb7o3/a_hunch_that_llms_and_perl_will_be_best_friends/?rdt=40188
●
Warum Perl nicht stärker für KI genutzt? Weil mehr Leute (Neulinge) Python können/lernen und günstiger / leichter zu ersetzen sind ...
Philips Jordan (June 8, 2023): Why is perl not used for artificial intelligence?
https://cloud2data.com/why-is-perl-not-used-for-artificial-intelligence/
Thesen halte ich für bestreitbar, aber Fakt ist trotzdem, dass Perl/Raku kaum genutzt für KI im Vergleich zu anderen Sprachen
Call to action: Was wollen wir tun?
●
Hmm, Perl sucks @ marketing
●
Vernetzung der Interessierten
●
Mehr Bindings von aktueller KI-Software in/für Raku/Perl
●
Bestehende Ansätze zusammenbringen
(z.B. in Raku v. antononcube + corion Perl OLLama)
●
Hackathons, um junge Entwickler:innen für Raku/Perl zu gewinnen, z.B. in Gründerhubs
mit AI Bezug (Beispiel: Startplatz Köln)
●
Eigene Session bei nächsten Workshops
●
Mehr Stipendien (grants), um das Gebiet gezielt zu befördern
●
Projekte/Demos, die zeigen, wie mächtig man verschiedene Anwendungen verbinden
kann zu Diensten (services)
●
…
●
Schreibt mir: sigel@asigel.de
Perl: Unterstützung für Semantik
●
Ontologien, SKOS
●
RDF + OWL + SparQL
●
Topic Maps, tolog
●
Inferencing
●
Entity and Relation Extraction
Perl: Ontologien, SKOS (1)
●
OpenCyc - mir kein Werkzeug in Raku/Perl bekannt
https://github.com/asanchez75/opencyc
https://sourceforge.net/projects/opencyc/
https://sourceforge.net/projects/opencyc-backups/
http://linkeddatacatalog.dws.informatik.uni-mannheim.de/de/data
set/opencyc
ResearchCyc > OpenCyc ResearchCyc
Perl: Ontologien, SKOS (2)
Ontology (i.W. Bioinformatik, Medizinische Terminologie)
●
Bio::Ontology
●
FAST::Bio::Ontology
●
ONTO-PERL-1.45 Erick Antezana
●
GO::Ontology Gene Ontology
●
GO-Perl https://metacpan.org/release/CMUNGALL/go-perl-0.15/source/README
●
MOBY::OntologyServer
●
PomBase::Chobo::OntologyData
●
Conclave::OTK Conclave Ontology Toolkit provide an ORM-style API, but for RDF documents, to implement
ontology oriented applications
●
Medical::OPCS4
https://en.wikipedia.org/wiki/OPCS-4
Perl: Ontologien, SKOS (3)
SKOS, Thesauri
●
RDF::SKOS Robert Barta Simple Knowledge Organization System
!!! DEVELOPER RELEASE (THERE MAY BE DRAGONS) !!!
!!! PLEASE SEE THE README FOR LIMITATIONS !!!
SKOS is a model for expressing very basic concept schemes, much simpler than
Topic Maps or RDF. This includes subject headings, taxonomies, folksonomies.
For a primer see SKOS Primer http://www.w3.org/TR/skos-primer/
●
skos2jskos convert SKOS/RDF to JSKOS
●
Biblio-Thesaurus-ModRewrite-0.03 Nuno Carvalho
Perl: RDF (1)
●
Attean Semantic Web Framework
https://metacpan.org/release/GWILLIAMS/Attean-0.033/source/README.md
Attean is a Perl framework for working with RDF data and SPARQL queries.
●
Catmandu::RDF
●
Catmandu, a data toolkit. Provides a command line tools for the conversion of various data formats including: JSON, YAML, RDF, CSV, TSV, XML and even Excel.
●
RDF::AllegroGraph
●
RDF::Core
●
RDF::Closure
●
RDF::Dumper
●
RDF::Endpoint
●
RDF::Helper Provide a consistent, high-level API for working with RDF with Perl
●
RDF::LinkedData
●
RDF::Laces to string together RDF statements from Perl syntax
●
RDF::LinkedData
●
RDF::NLP::SPARQLQuery
●
RDF::Notation3
●
RDF::Redland
Perl: RDF (2)
●
RDF::RDB2RDF::Simple
●
RDF::RDFa
●
RDF::Scutter Perl extension for harvesting distributed RDF resources
●
RDF::Server
●
RDF::Sesame
●
RDF::Simple
●
RDF::TrineAn RDF Framework for Perl
●
RDF::TrineX
●
RDF::TrineX::RuleEngine::Jena
●
RDF::Turtle
●
Syntax::Highlight https://metacpan.org/pod/Syntax::Highlight::RDF
●
Perlrdfcommand line
●
WWW::DataWiki RESTful read-write RDF repository
●
Gwybodaeth - a set of classes and scripts to RDF-ize data
●
Turtle::Writer
Perl: RDF (3)
Robert Barta
●
RDF-AllegroGraph-Easy
●
RDF-Redland-DIG-0.04
●
RDF::Redland::DIG::Tutorial
●
RDF-Trine-AllegroGraph
Perl: OWL
●
Class::OWL
●
OWL::Data
●
OWL::DirectSemantics
●
XML::Atom::OWL
●
OWL::Simple
●
Conclave::OTK::Queries::OW
●
ODO::Ontology::OWL
●
MOBY::RDF::Predicates::OWL
●
RDFStore::Vocabulary::OWL.pm
●
RDF::Cowl https://metacpan.org/pod/RDF::Cowl A lightweight API for working with OWL 2 ontologies
an API for parsing, querying, editing, and writing OWL 2 ontologies
Cowl is a lightweight C/C++ API for working with OWL 2 ontologies
●
OBO::Parser::OWLParser
●
SADI::Simple Module for creating Perl SADI services. SADI (Semantic Automated Discovery and Integration) is a standard for implementing Web services
that natively consume and generate RDF
●
OWL2Perl Perl extension for the automatic generation of perl modules from OWL classes
Perl: SparQL
●
Alien::Tarql Find or build Tarql (SPARQL for Tables)
●
Apache::SPARQL
●
AtteanX::SPARQL
●
AtteanX::Model::SPARQL
●
Catmandu, darin SparQL
●
RDF::NLP::SPARQLQuery
●
ODO::Query::SPARQL
●
RDF::Trine::Store::SPARQL
●
RDQL::Parser A simple top-down LL(1) RDQL and SPARQL parser
●
Wikidata::API
●
WQS::SPARQL auch wdq command-line interface
●
Pluto
https://metacpan.org/release/EKAWAS/PLUTO-0.30/source
This is a pure Perl semantic web library that implements an RDF parser, RDQL, SPARQL
●
query engine, persistent RDF datastore and an ontology framework for OWL and RDFS.
●
RDF::Query SparQL
Perl: Topic Maps, tolog
Topic Maps
●
Apache::TopicMaps Perl extension for serving topic maps. Jan Algermissen [ur-uralt 2004]
●
https://metacpan.org/author/ALPHAZULU
●
Fuse-TM-0.2Accessing Topic Maps as Filesystem
●
TM-View-0.5 Topic Maps, Views and Listlets. Sequencing and styling mechanisms for Topic Map
slide shows or other serialized presentations
●
Robert Barta
●
TM-1.56Robert Barta [alt: 2010-11-08]
●
TM::Ontology::KIF Topic Map KIF Parser
●
TM-Easy-0.03
Perl: Inferencing, Extraction
●
Inferencing s. z.B. Prolog, tolog
●
Entity and Relation Extraction
●
z.B.
●
Extrahiere Struktur aus medizinischen Texten
●
Paws-0.46 Jess Robinson Paws::ComprehendMedical Perl Interface to AWS AWS
Comprehend Medical
●
Amazon Comprehend Medical extracts structured information from unstructured
clinical text. Use these actions to gain insight in your documents.
●
For the AWS API documentation, see
https://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30

Weitere ähnliche Inhalte

Empfohlen

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Empfohlen (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Raku/Perl für KI-Anwendungen: Request for Erfahrungsaustausch

  • 1. Raku/Perl für KI-Anwendungen: Request for Erfahrungsaustausch @26GPW2024 FfM, Lightning Talk 20240416 Alexander SIGEL (sigel@asigel.de) v1 20240416 00:27
  • 2. tl;dr ● Motivation: Mein Interesse an (textbasierter) KI, ML, Semantik, Raku ● Ziel: KI-Anwendungen erstellen basierend auf LLMs, Machine Learning, Semantik, mit/integriert in Raku/Perl ● Anregung: Ich werde kurz Hinweise geben auf existierende Infrastruktur in Perl/Raku, in Raku insbesondere die Module von Anton Antonov (https://raku.land/zef:antononcube) - im Anhang Hinweise auf Semantik ● Gesucht: Austausch/Vernetzung mit anderen zur Infrastruktur, welche Raku/Perl bietet für KI/LLMs, Machine Learning, Semantik und zu Erfahrungen im Einsatz. Mein Lernweg ist noch am Anfang. Huhu? Ist da noch wer? ● Bousfrage für Call to Action: Warum gibt es da nicht mehr trotz aktuellen Boom, woran liegt es, was wollen wir daran wie ändern? s.a. AI Perl committe minutes
  • 3. Fun: Bilder nach Stichworten generieren [AAv2] Anton Antonov, "Racoons playing with pearls and onions" (2023), YouTube/@AAA4Prediction https://www.youtube.com/watch?v=zlkoNZK8MpU
  • 4. Allererste Startpunkte ... Perl: ● KI für Perl verfügbar machen: Larry Wall: The Perl Community Roadmap :: The AI Perl Committee: Organizing Perl's Artificially Intelligent Future https://perlcommunity.org/ai/ ● Existiert seit 8/2023 lt. Meetings. Treffen sich alle zwei Wochen. Offenbar aktuelle Meetings, zuletzt 4.4.2024 ● https://gitlab.com/aiperl/ai-perl-committee/-/tree/main/meetings ● Grants, monatliche Hackathons, aktuelle Entwicklungen, laufende/angestoßene Projekte, Geldmangel ● TensorFlow, PerlGPT, ChatGPU Navi (Navi AI) [ Navi v1.5 including LLaMa v2 and TensorFlow v2] ● Staney Joseph (Nov 6, 2023): Understanding the Basics of Perl for Text Processing with AI Features https://medium.com/@staneyjoseph.in/understanding-the-basics-of-perl-for-text-processing-with-ai-features-673e55728db9 (hinter paywall) ● Perl AI Deep Learning Tutorial https://en.deeplearning.perlzemi.com/
  • 5. Perl: AI/ML: Ausgewählte Module (1) AI::-Module ● AI::CBR ● AI::Chat ● AI::ExpertSystem ● AI::Image ● AI-NeuralNet-SOM Perl extension for Kohonen Maps Robert Barta ● AI::MXNet (MXNet ist veraltet?) ● AI::Prolog Verbindung mit tolog, Lars-Marius Garshol https://www.garshol.priv.no/download/text/tolog.pdf https://link.springer.com/chapter/10.1007/11676904_17 ● AI::Categorizer ● AI::Ollama https://metacpan.org/dist/AI-Ollama-Client Get up and running with large language models __locally__! ● AI::PredictionClient Google TensorFlow ● AI::TensorFlow a fast and lightweight markov engine intended to replace AI::MegaHAL um innerhalb des Perl- Universums zu bleiben MegaHAL ist Markov, selbst aber genutzt für Konversationssystem wie Eliza, aber Markov-basiert
  • 6. Perl: AI/ML: Ausgewählte Module (2) Hailo https://metacpan.org/pod/Hailo ● Logic https://metacpan.org/pod/Logic ● OpenAIGPT4 https://metacpan.org/pod/OpenAIGPT4 Interact with the OpenAI GPT-3,4 API ● OpenAI:: ● https://gitlab.com/aiperl/perlgpt ● ...
  • 7. Perl: AI/ML: Ausgewählte Module (3) ● Algorithm::SVMLight ● MLPerlMachine Learning in Perl, Using the RPerl Optimizing Compiler A collection of algorithms and data structures used for building machine learning applications in Perl. For general info: <http://mlperl.org> ● Paws::MachineLearning Perl Interface to AWS Amazon Machine Learning Definition of the public APIs exposed by Amazon Machine Learning For the AWS API doc, see <https://docs.aws.amazon.com/goto/WebAPI/machinelearning-2014-12-12>.. ● AI::MXNet Perl interface to MXNet machine learning library ● Perl interface to MXNet machine learning library. MXNet supports the Perl programming language. The MXNet Perl package brings flexible and efficient GPU computing and state-of-art deep learning to Perl. It enables you to write seamless tensor/matrix ...
  • 8. Raku: AI/ML: Ausgewählte Module (1) ● Gibt es gute technische Integration mit Raku/Perl? ja, aber begrenzt ● Anregung: Mit Raku-Modulen von antononcube anfangen ● Wer kennt Anton Antonov bzw. hat dessen Raku-KI-Module schon gesehen, sich damit befasst, setzt diese ein? ● https://github.com/antononcube ● https://raku.land/zef:antononcube ● https://rakuforprediction.wordpress.com/ Blog zu Raku mit AI Folgerichtige Erweiterung von Mathematica, R etc. for Prediction) ● https://www.youtube.com/@AAA4prediction Videos dazu ● Ggf. Erfahrungen damit? Mit Jupiter Notebooks? ● Erfahrungen mit LLM und Perl/Raku-binding?
  • 9. Raku: AI/ML: Ausgewählte Module (2) ● z.B.: ● Data:: ● * Importers fürs Reinschlürfen von Daten. Datentypen: z.B. CSV, HTML, PDF, Text, Bilder ● * Summarizers fürs Zusammenfassen ● DSL::English::LatentSemanticAnalysisWorkflows ● DSL::Entity::MachineLearning ● * EBNF ● Jupyter::Chatbook .ipynb ● pure Raku implementation of a Raku kernel for Jupyter clients. ● Jupyter notebooks provide a web-based (or console-based) Read Eval Print Loop (REPL) for running code and serializing input and output. ● https://github.com/bduggan/raku-jupyter-kernel
  • 10. Raku: AI/ML: Ausgewählte Module (3) ● LLM:: ● Containerization, Functions, Prompts ● Markdown::Grammar ● ML:: (Machine Learning) ● ML::FindTextualAnswer Raku package ● WWW:: (Schnittstellen zu LLM-APIs) ● Gemini, LLaMA, MermaidInk, MistralAI, OpenAI, PaLM ● z.B. WWW::MistralAI ● This Raku package is much "less ambitious" than the official Python package, [MAIp1], developed by MistralAI's team
  • 11. Raku/Perl überhaupt geeignet für AI? (1) ● Welche Programmiersprachen sind denn besonders gut geeignet für AI/LLM? ● Gehört Raku/Perl dazu? Ich sage ja, aber die Lemminge sehen das nicht so. „Exotenposition“ ● Wer setzt in Deutschland Raku überhaupt professionell ein? Wofür? ● "[u]nfortunately Perl support for current AI/ML libs does not seem to exist publicly." (2017) https://blogs.perl.org/users/davehodg/2017/11/perl-and-ai.html ● Kosta Mitrofanskiy (January 27, 2024): The Top 10 Programming Languages Powering AI and Machine Learning https://intellisoft.io/best-programming-language-for-ai-and-machine-learning/ Perl/Raku ist nicht darunter ... ● "A hunch that LLMs and Perl will be best friends and contribute to a renaissance in the popularity of Perl." "Loose typing and TIMTOWTDI may be (...) good for LLMs. Raku might do it better." Quelle: https://www.reddit.com/r/perl/comments/13wb7o3/a_hunch_that_llms_and_perl_will_be_best_friends/?rdt=40188 ● Warum Perl nicht stärker für KI genutzt? Weil mehr Leute (Neulinge) Python können/lernen und günstiger / leichter zu ersetzen sind ... Philips Jordan (June 8, 2023): Why is perl not used for artificial intelligence? https://cloud2data.com/why-is-perl-not-used-for-artificial-intelligence/ Thesen halte ich für bestreitbar, aber Fakt ist trotzdem, dass Perl/Raku kaum genutzt für KI im Vergleich zu anderen Sprachen
  • 12. Raku/Perl überhaupt geeignet für AI? (2) ● "Python is eating our lunch" in new AI genre in the past 1 year, this is an opportunity for Perl to get back in the game, if TPF doesn't have money then we should ask other Perl companies to help, Python code is just dumb wrappers around text processing and pre-written prompts, there's no reason why Perl shouldn't be able to make it happen ● https://gitlab.com/aiperl/ai-perl-committee/-/blob/main/ meetings/20231019_meeting_agenda_and_minutes.md
  • 13. Raku/Perl überhaupt geeignet für AI? ● Welche Programmiersprachen sind denn besonders gut geeignet für AI/LLM? ● Gehört Raku/Perl dazu? Ich sage ja, aber die Lemminge sehen das nicht so. „Exotenposition“ ● Wer setzt in Deutschland Raku überhaupt professionell ein? Wofür? ● "[u]nfortunately Perl support for current AI/ML libs does not seem to exist publicly." (2017) https://blogs.perl.org/users/davehodg/2017/11/perl-and-ai.html ● Kosta Mitrofanskiy (January 27, 2024): The Top 10 Programming Languages Powering AI and Machine Learning https://intellisoft.io/best-programming-language-for-ai-and-machine-learning/ Perl/Raku ist nicht darunter ... ● "A hunch that LLMs and Perl will be best friends and contribute to a renaissance in the popularity of Perl." "Loose typing and TIMTOWTDI may be (...) good for LLMs. Raku might do it better." Quelle: https://www.reddit.com/r/perl/comments/13wb7o3/a_hunch_that_llms_and_perl_will_be_best_friends/?rdt=40188 ● Warum Perl nicht stärker für KI genutzt? Weil mehr Leute (Neulinge) Python können/lernen und günstiger / leichter zu ersetzen sind ... Philips Jordan (June 8, 2023): Why is perl not used for artificial intelligence? https://cloud2data.com/why-is-perl-not-used-for-artificial-intelligence/ Thesen halte ich für bestreitbar, aber Fakt ist trotzdem, dass Perl/Raku kaum genutzt für KI im Vergleich zu anderen Sprachen
  • 14. Call to action: Was wollen wir tun? ● Hmm, Perl sucks @ marketing ● Vernetzung der Interessierten ● Mehr Bindings von aktueller KI-Software in/für Raku/Perl ● Bestehende Ansätze zusammenbringen (z.B. in Raku v. antononcube + corion Perl OLLama) ● Hackathons, um junge Entwickler:innen für Raku/Perl zu gewinnen, z.B. in Gründerhubs mit AI Bezug (Beispiel: Startplatz Köln) ● Eigene Session bei nächsten Workshops ● Mehr Stipendien (grants), um das Gebiet gezielt zu befördern ● Projekte/Demos, die zeigen, wie mächtig man verschiedene Anwendungen verbinden kann zu Diensten (services) ● … ● Schreibt mir: sigel@asigel.de
  • 15. Perl: Unterstützung für Semantik ● Ontologien, SKOS ● RDF + OWL + SparQL ● Topic Maps, tolog ● Inferencing ● Entity and Relation Extraction
  • 16. Perl: Ontologien, SKOS (1) ● OpenCyc - mir kein Werkzeug in Raku/Perl bekannt https://github.com/asanchez75/opencyc https://sourceforge.net/projects/opencyc/ https://sourceforge.net/projects/opencyc-backups/ http://linkeddatacatalog.dws.informatik.uni-mannheim.de/de/data set/opencyc ResearchCyc > OpenCyc ResearchCyc
  • 17. Perl: Ontologien, SKOS (2) Ontology (i.W. Bioinformatik, Medizinische Terminologie) ● Bio::Ontology ● FAST::Bio::Ontology ● ONTO-PERL-1.45 Erick Antezana ● GO::Ontology Gene Ontology ● GO-Perl https://metacpan.org/release/CMUNGALL/go-perl-0.15/source/README ● MOBY::OntologyServer ● PomBase::Chobo::OntologyData ● Conclave::OTK Conclave Ontology Toolkit provide an ORM-style API, but for RDF documents, to implement ontology oriented applications ● Medical::OPCS4 https://en.wikipedia.org/wiki/OPCS-4
  • 18. Perl: Ontologien, SKOS (3) SKOS, Thesauri ● RDF::SKOS Robert Barta Simple Knowledge Organization System !!! DEVELOPER RELEASE (THERE MAY BE DRAGONS) !!! !!! PLEASE SEE THE README FOR LIMITATIONS !!! SKOS is a model for expressing very basic concept schemes, much simpler than Topic Maps or RDF. This includes subject headings, taxonomies, folksonomies. For a primer see SKOS Primer http://www.w3.org/TR/skos-primer/ ● skos2jskos convert SKOS/RDF to JSKOS ● Biblio-Thesaurus-ModRewrite-0.03 Nuno Carvalho
  • 19. Perl: RDF (1) ● Attean Semantic Web Framework https://metacpan.org/release/GWILLIAMS/Attean-0.033/source/README.md Attean is a Perl framework for working with RDF data and SPARQL queries. ● Catmandu::RDF ● Catmandu, a data toolkit. Provides a command line tools for the conversion of various data formats including: JSON, YAML, RDF, CSV, TSV, XML and even Excel. ● RDF::AllegroGraph ● RDF::Core ● RDF::Closure ● RDF::Dumper ● RDF::Endpoint ● RDF::Helper Provide a consistent, high-level API for working with RDF with Perl ● RDF::LinkedData ● RDF::Laces to string together RDF statements from Perl syntax ● RDF::LinkedData ● RDF::NLP::SPARQLQuery ● RDF::Notation3 ● RDF::Redland
  • 20. Perl: RDF (2) ● RDF::RDB2RDF::Simple ● RDF::RDFa ● RDF::Scutter Perl extension for harvesting distributed RDF resources ● RDF::Server ● RDF::Sesame ● RDF::Simple ● RDF::TrineAn RDF Framework for Perl ● RDF::TrineX ● RDF::TrineX::RuleEngine::Jena ● RDF::Turtle ● Syntax::Highlight https://metacpan.org/pod/Syntax::Highlight::RDF ● Perlrdfcommand line ● WWW::DataWiki RESTful read-write RDF repository ● Gwybodaeth - a set of classes and scripts to RDF-ize data ● Turtle::Writer
  • 21. Perl: RDF (3) Robert Barta ● RDF-AllegroGraph-Easy ● RDF-Redland-DIG-0.04 ● RDF::Redland::DIG::Tutorial ● RDF-Trine-AllegroGraph
  • 22. Perl: OWL ● Class::OWL ● OWL::Data ● OWL::DirectSemantics ● XML::Atom::OWL ● OWL::Simple ● Conclave::OTK::Queries::OW ● ODO::Ontology::OWL ● MOBY::RDF::Predicates::OWL ● RDFStore::Vocabulary::OWL.pm ● RDF::Cowl https://metacpan.org/pod/RDF::Cowl A lightweight API for working with OWL 2 ontologies an API for parsing, querying, editing, and writing OWL 2 ontologies Cowl is a lightweight C/C++ API for working with OWL 2 ontologies ● OBO::Parser::OWLParser ● SADI::Simple Module for creating Perl SADI services. SADI (Semantic Automated Discovery and Integration) is a standard for implementing Web services that natively consume and generate RDF ● OWL2Perl Perl extension for the automatic generation of perl modules from OWL classes
  • 23. Perl: SparQL ● Alien::Tarql Find or build Tarql (SPARQL for Tables) ● Apache::SPARQL ● AtteanX::SPARQL ● AtteanX::Model::SPARQL ● Catmandu, darin SparQL ● RDF::NLP::SPARQLQuery ● ODO::Query::SPARQL ● RDF::Trine::Store::SPARQL ● RDQL::Parser A simple top-down LL(1) RDQL and SPARQL parser ● Wikidata::API ● WQS::SPARQL auch wdq command-line interface ● Pluto https://metacpan.org/release/EKAWAS/PLUTO-0.30/source This is a pure Perl semantic web library that implements an RDF parser, RDQL, SPARQL ● query engine, persistent RDF datastore and an ontology framework for OWL and RDFS. ● RDF::Query SparQL
  • 24. Perl: Topic Maps, tolog Topic Maps ● Apache::TopicMaps Perl extension for serving topic maps. Jan Algermissen [ur-uralt 2004] ● https://metacpan.org/author/ALPHAZULU ● Fuse-TM-0.2Accessing Topic Maps as Filesystem ● TM-View-0.5 Topic Maps, Views and Listlets. Sequencing and styling mechanisms for Topic Map slide shows or other serialized presentations ● Robert Barta ● TM-1.56Robert Barta [alt: 2010-11-08] ● TM::Ontology::KIF Topic Map KIF Parser ● TM-Easy-0.03
  • 25. Perl: Inferencing, Extraction ● Inferencing s. z.B. Prolog, tolog ● Entity and Relation Extraction ● z.B. ● Extrahiere Struktur aus medizinischen Texten ● Paws-0.46 Jess Robinson Paws::ComprehendMedical Perl Interface to AWS AWS Comprehend Medical ● Amazon Comprehend Medical extracts structured information from unstructured clinical text. Use these actions to gain insight in your documents. ● For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30