Select Page

NETWAYS Blog

OSMC 2023 | Experiments with OpenSearch and AI

Last year’s Open Source Monitoring Conference (OSMC) was a great experience. It was a pleasure to meet attendees from around the world and participate in interesting talks about the current and future state of the monitoring field.

Personally, this was my first time attending OSMC, and I was impressed by the organization, the diverse range of talks covering various aspects of monitoring, and the number of attendees that made this year’s event so special.

If you were unable to attend the congress, we are being covering some of the talks presented by the numerous specialists.
This blog post is dedicated to this year’s Gold Sponsor Eliatra and their wonderful speakers Leanne Lacey-Byrne and Jochen Kressin.

Could we enhance accessibility to technology by utilising large language models?

This question may arise when considering the implementation of artificial intelligence in a search engine such as OpenSearch, which handles large data structures and a complex operational middleware.

This idea can also be seen as the starting point for Eliatra’s experiments and their findings, which is the focus of this talk.

 

Working with OpenSearch Queries

OpenSearch deals with large amounts of data, so it is important to retrieve data efficiently and reproducibly.
To meet this need, OpenSearch provides a DSL which enables users to create advanced filters to define how data is retrieved.

In the global scheme of things, such queries can become very long and therefore increase the complexity of working with them.

What if there would be a way of generating such queries by just providing the data scheme to a LLM (large language model) and populate it with a precise description of what data to query? This would greatly reduce the amount of human workload and would definitely be less time-consuming.

 

Can ChatGPT be the Solution?

As a proof-of-concept, Leanne decided to test ChatGPT’s effectiveness in real-world scenarios, using ChatGPT’s LLM and Elasticsearch instead of OpenSearch because more information was available on the former during ChatGPT’s training.

The data used for the tests were the Kibana sample data sets.

Leanne’s approach was to give the LLM a general data mapping, similar to the one returned by the API provided by Elasticsearch, and then ask it a humanised question about which data it should return. Keeping that in mind, this proof of concept will be considered a success if the answers returned consist of valid search queries with a low failure rate.

 

Performance Analysis

Elasticsearch Queries generated by ChatGPT (Result Overview)

Source: slideshare.net (slide 14)

As we can see, the generated queries achieved only 33% overall correctness. And this level was only possible by feeding the LLM with a number of sample mappings and the queries that were manually generated for them.

Now, this accuracy could be further improved by providing more information about the mapping structures, and by submitting a large number of sample mappings and queries to the ChatGPT instance.
This would however result in much more effort in terms of compiling and providing the sample datasets, and would still have a high chance of failure for any submitted prompts that deviate from the trained sample data.

 

Vector Search: An Abstract Approach

Is there a better solution to this problem? Jochen presents another approach that falls under the category of semantic search.
Large language models can handle various inputs, and the type of input used can significantly impact the results produced by such a model.
With this in mind, we can transform our input information into vectors using transformers.
The transformers are trained LLM models that process specific types of input, for example video, audio, text, and so on.
They generate n-dimensional vectors that can be stored in a vector database.
Illustration about the usage of vector transformers

Source: slideshare.net (slide 20)

When searching a vector-based database, one frequently used algorithm for generating result sets is the ‘K-NN index’
(k-nearest-neighbour index). This algorithm compares stored vectors for similarity and provides an approximation of their relevance to other vectors.
For instance, pictures of cats can be transformed into a vector database. The transformer translates the input into a numeric, vectorized format.
The vector database compares the transformed input to the stored vectors using the K-NN algorithm and returns the most fitting vectors for the input.

 

Are Vectors the Jack of all Trades?

There are some drawbacks to the aforementioned approach. Firstly, the quality of the output heavily depends on the suitability between the transformer and the inputs provided.
Additionally, this method requires significantly more processing power to perform these tasks, which in a dense and highly populated environment could be the bottleneck of such an approach.
It is also difficult to optimize and refine existing models when they only output abstract vectors and are represented as black boxes.
What if we could combine the benefits of both approaches, using lexical and vectorized search?

 

Retrieval Augmented Generation (RAG)

Retrieval Augmented Generation (RAG) was first mentioned in a 2020 paper by Meta. The paper explains how LLMs can be combined with external data sources to improve search results.
This overcomes the problem of stagnating/freezing models, in contrast to normal LLM approaches. Typically, models get pre-trained with a specific set of data.
However, the information provided by this training data can quickly become obsolete and there may be a need to use a model that also incorporates current developments, the latest technology and currently available information.
Augmented generation involves executing a prompt against an information database, which can be of any type (such as the vector database used in the examples above).
The result set is combined with contextual information, for example the latest data available on the Internet or some other external source, like a flight plan database.
This combined set could then be used as a prompt for another large language model, which would produce the final result against the initial prompt.
In conclusion, multiple LLMs could be joined together while using their own strengths and giving them access to current data sources and that could in turn generate more accurate and up to date answers for user prompts.
Overview of the RAG (Retrieval Augmented Generation)

Source: slideshare.net (slide 36)

Noé Costa
Noé Costa
Developer

Noé ist als Schweizer nach Deutschland ausgewandert und unterstützt das Icinga Team seit Oktober 2023 als Developer im Bereich der Webentwicklung. Er wirkt an der Weiterentwicklung der Webmodule von Icinga mit und ist sehr interessiert am Bereich des Monitorings und dessen Zukunft. Neben der Arbeit kocht er gerne, verbringt Zeit mit seiner Partnerin, erweitert sein Wissen in diversen Gebieten und spielt ab und an auch Computerspiele mit Bekanntschaften aus aller Welt.

OSMC 2022 | AI Driven Observability based on Open Source

Observability and monitoring of resources are growing every day and it is inevitable to analyse all the data points to arrive at a solution. At Mercedes-Benz they have developed an Open Source data metric analyzer and drive it with data science to identify anomalies. At OSMC 2022, Satish Karunakaran, a data scientist with 19 years of experience in the field, presented how they established the entire data processing ecosystem based on Open Source.

In the beginning of his talk, Satish immediately questioned how much value can be generated manually out of Big Data, since metrics, logs and traces all provide intelligence. His point was not about scalability, management (manual patching) versus unmanaged (self-healing) here, but how to optimize for prediction and detection of failures.

Following up, the question arose what is normal, and how to determine normality versus abnormality.

 

Especially cases of “looks normal, but not sure” or “better than last week, but something is wrong” could be optimized with a data driven approach.

The idea is the following: 1) Collect lots of functional & correct data (as much as possible, as long as possible). 2a) Use lots of nested if conditions: Check if a value / limit ( 3 < 5 = yes ) has been reached, and if so, get more and more granular ( 3 < 4 =yes ) and split up based on previous choices (3 < 3 = false). This is also called a decision-tree. 2b ) Create labelling tags. 2c) Make this process highly parallel via scalable, distributed, gradient-boosted decision trees (XGBoost).

Boosting comes from the idea of improving single weak models by combining them with other weak models, in order to generate a strong model! Gradient boosting is an improved supervised learning variant if this, which takes labeled training data as input, and tries to correctly predict each training example – to label future data.

TLDR: If we know what is healthy, because if we have lots of healthy data, and are able to labelpredict each next data point to the real world (not necessarily watching what is happening, but predicting what will happen), and suddenly our predictions do not match, then we have an abnormality and should call an alert! Or, if you prefer to watch an AI explain XGBoost:

This morning I came across a cool demo by @LinusEkenstam about creating animated AI-generated characters. I decided to give it a try, and, with slight modifications, this is what I ended up with. pic.twitter.com/e2vx9OP0Ls

— Bojan Tunguz (@tunguz) January 18, 2023

Unfortunately compared to Neural Nets, XGBoost appears slow and memory intense with many decision-branches, wheares Neural Nets allow scalability and optimization – due to being able to optimize and drop for hidden functions. Additionally, one tries to converge for the maximum (XGBoost), and the other tries to converge for the minimum (Neural Nets). So combining both and getting the best possible tag tag-prediction is the art of someone who does this for quite a long time, like Satish!

An example of how Satish and his team implemented this can be seen in this picture, which displays the path of data flow, data orchestration and visualization.

Do you think all monitoring should follow an AI based anomaly approach?

Would you find it cool if all monitoring solutions one day would have predictive models? And how would they deal with statistical outliers? Maybe lots of human time wasted could be saved, if we could focus on “the essentials”? Would you like to hear more about about data science & AI at further NETWAYS Events or like to talk to Icinga developers about this fascinating topic? Please feel free to contact us!

The recording and slides of this talk and all other OSMC talks can be found in our Archives. Check it out! We hope to see you around at OSMC 2023! Stay in touch and subscribe to our Newsletter!

AI – Artificial Intelligence (Was ist das? Ist das Gefährlich?)

Heute mal was anderes:

Da ich mich in letzter Zeit mehr mit dem Thema AI/KI beschäftige, bot es sich für mich an einen kurzen Blogpost über dieses Thema zu schreiben.

Was ist AI/KI?

AI steht für “Artificial Intelligence“, zu deutsch “Künstliche Intelligenz (KI)
Schauen wir uns ein normales Programm an. Nach einer Reihe von Abläufen passiert etwas, dass nicht vorgesehen war und das Programm crasht mit einem Fehlercode, den man dann Googlen muss um in einem Forum auf eine Lösung zu stoßen.
Wenn wir uns jetzt eine KI anschauen, fällt uns schnell die Parallele zum Menschen auf. Die KI lernt nach dem Eintreten dieses unerwarteten Ereignisses, automatisch, wie man dieses vermeidet und den daraus resultierenden Error behebt.
Bill Gates hat das Ausmaß einer KI anhand eines Beispiels erklärt, das ich nun auch verwenden will.
Die Evolution hat uns mit einem sehr fortschrittlichen Algorythmus ausgestattet, der allerdings auf einem sehr langsamen Computer läuft. Limitierter Arbeitsspeicher, die Möglichkeit Informationen über Gestik und Sprache an andere Computer zu versenden und auch die Möglichkeit diese, über die Ohren, zu empfangen. Dieser Menschliche-Algorythmus ist allerdings so gut, dass er Erfahrung in Wissen umwandeln kann. Wenn wir das auf Softwareebene realisieren würden, könnten wir nicht wissen was passiert. Der Mensch ist durch eine langsame Evolution in seiner Weiterentwicklung limitiert, der fortschritt der Technik nicht. Im Gegenteil, der Fortschritt der Technik ist durch den Menschen limitiert. Würde eine KI mit genügend Rechenleistung sich weiterentwickeln, würde der für uns rasante Fortschritt der Technik, noch schneller gehen. Der Computer, bzw. die KI, wäre uns in jeder Art und Weise überlegen. Die Rechenleistung des Computers, auf dem die KI läuft, entscheidet hierbei die Geschwindigkeit, des Lernens, der KI.

Erste Ereignisse, bei denen der Computer den Menschen besiegte:

Deep Blue” war ein von IBM entwickelter Schachroboter, der aus dem vorherigen Projekt “Deep Thought” resultierte. 1996 gelang es Deep Blue den damaligen Schachweltmeister Garri Kasparow nach dem 90. Zug zur Kapitulation zu zwingen.

Google DeepMindsAlphaGo” ist eine weitaus leistungsstärkere KI als die damalige von IBM entwickelte Deep Blue-KI. AlphaGo hat 2016 den amtierenden Champion des Chinesischen Brettspiel “Go” nach einer Runde besiegt.

Warum ist der Erfolg von AlphaGo höher zu werten als der von Deep Blue?

Das Spiel “Go” bietet mehr Spielzüge an als Schach. Bei Go sind mehr Spielzüge möglich als es Atome im Universum gibt, sodass es unmöglich ist jeden möglichen Ausgang vorherzusehen und so eine Niederlage abzuwenden. Schach hat eine limitierte Zahl an Zügen, sodass das Simulieren eines Spielzugs für den Computer kaum ein Problem darstellt.

Warum ist AlphaGo, DeepBlue überlegen?

AlphaGo arbeitet mit dem “Deep Reinforcement Learning” was unserer Menschlichen Art zu lernen sehr nahe kommt. Es ist im Prinzip nur Try-and-Error, Reward-and-Punishment und Raw-Input. Der Computer lernt selber wie er in diesem Spiel gut wird.
Im Internet ist ein Video viral gegangen. In dem Video wird gezeigt wie ein Computer lernt “Super Mario World” zu spielen. Der Twitch-Streamer und Youtuber “SethBling”, schrieb diese KI und nannte sie “MarI/O”. Anders als bei anderen KIs, wurde MarI/O nicht gezeigt wie er das Spiel spielt oder gar wie die Steuerung lautet. Die KI musste selber lernen, wie es dieses Spiel spielt.

Deep Blue ging dagegen, im Spiel gegen Kasparow mit einer ganz banalen Methode vor. Nach jedem Zug, ging er jeden möglichen Ausgang des Spiels durch und errechnete eine Wahrscheinlichkeit um den nächsten Zug vorherzusehen und direkt auszukontern.

Forscher warnen vor Gefahren!

Durch Filme, wie zum Beispiel “Terminator” oder “iRobot”,  wird uns oft auf unterhaltende Art und Weise gezeigt, welche Gefahren beim entwickeln von KIs bestehen. Jedoch ist das ja nur Sci-Fi, oder? Der Astrophysiker Steven Hawking ist der Meinung, dass KI die größte Entwicklung in der Geschichte der Zivilisation sein kann.

“Success in creating AI, could be the biggest event in the History of our Civilization. Alongside the benefits, it brings Dangers, like powerful Atonomous Weapons […] it could bring great distruption to our Economy […] AI could develop a will of its own, that stands in conflict with ours.”
~ Steven Hawking

“But I think, the development of a full Artificial Intelligence, could spell the end of the Human race.”
~ Steven Hawking

Steven Hawking ist nicht der einzige der vor den Gefahren warnt. Tesla und SpaceX CEO Elon Musk ist der Meinung, dass KI der Auslöser für den dritten Weltkrieg sein könnte.

“The pace of progress in artificial intelligence […] is incredibly fast. […] The risk of something seriously dangerous happening is in the five-year timeframe. 10 years at most.”
~ Elon Musk

“There certainly will be job disruption. Because what’s going to happen is robots will be able to do everything better than us. … I mean all of us […] I am not sure exactly what to do about this. This is really the scariest problem to me”
~ Elon Musk

“If you’re not concerned about AI safety, you should be.”
~ Elon Musk

“AI is a rare case where I think we need to be proactive in regulation than be reactive”
~ Elon Musk

Russischer Präsident Vladimir Putin ist der Meinung, dass das Land das als erstes eine vollfunktionsfähige KI besitzt, die Welt regieren werde.

“It comes with colossal opportunities, but also threats that are difficult to predict. Whoever becomes the leader in this sphere will become the ruler of the world.”
~ Vladimir Putin

Meine Meinung

Meiner Meinung nach, ist KI ein sehr wichtiges Thema, wenn es um Technologie geht. Künstliche Intelligenz könnte sehr vieles bedeuten und es liegt in unserer Hand zu entscheiden, ob die Bedeutung nun Negativ oder Positiv ausfällt. Ich hoffe ich konnte einen kleinen Einblick bringen, Informieren und zu Diskussionen anregen.