All quiet on the A.I. front....

I have been asked by more than a few people about my views on A.I. (which does NOT exist btw - there is no Artificial Intelligence, it does not exist yet, get over it) and what I've been doing with it in relation to my work/work.  Well, I cannot tell you that, obviously.


I have though in the past, populated articles on this site that reflect things that I have been doing / investigating for work/work and have made a record of them so that if/when I wish to repeat them I can return here and follow my instructions OR I have posted 'items of interest', things that I think might be interesting to follow up on at a near date/time in the future.

I steer away from all the ChatGPT or Generative AI (again, pi$$ poor name) hype-b*ll*x that has been spewing out from very ignorant and naive people over the past 6-months.  Most of them should know better, as to the rest, well, they are the clueless one's, no change there, and they are just focused on the money $$$$ side of things and how it can benefit them, or, how they can help you or others make more $$$$ from this technology, so long as you grease their palm with coins of silver first.  yes, snake-oil salesman.  again.  We all remember B*ll*x-chain or Blockchain as it was called and we all know about BitCoin, you'd think people would learn?  Well, perhaps they don't want to?

Anyway, there IS one Chain that I do like the look of.

It is called LangChain.  I hope that the author will change that name at some point in the future.


Yes, it has it's alternatives, such as BabyAGI that look cute and do very simple tasks - but are basically task automation with a little sprinkling of "smarts" thrown into the dough-ie-mixture.

What do I like about these tools?  Well, they are 'Task management systems'.  The sort of things that you NEED for robots, but can also be exploited for the occasional Business Process Management system or Decision Making systems - something that I've been involved with for over a decade or so now.


Anyway, back to LangChain - here's the overview from the main website:

LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model via an api, but will also:

  1.  Be data-aware: connect a language model to other sources of data
  2.  Be agentic: Allow a language model to interact with its environment

As such, the LangChain framework is designed with the objective in mind to enable those types of applications.

There are two main value props the LangChain framework provides:

  1. Components: LangChain provides modular abstractions for the components neccessary to work with language models. LangChain also has collections of implementations for all these abstractions. The components are designed to be easy to use, regardless of whether you are using the rest of the LangChain framework or not.
  2. Use-Case Specific Chains: Chains can be thought of as assembling these components in particular ways in order to best accomplish a particular use case. These are intended to be a higher level interface through which people can easily get started with a specific use case. These chains are also designed to be customizable.


So, yes, you can use a Llama, a Vicuna, a GPT4All, an XXXGPT model that is on the internet OR locally contained within your own environment, totally isolated and not available to/for anyone else.  You can even, now using the right hardware, make you OWN model, using your own data to train the base model OR you can take a basically trained existing model (that you trust has not been data poisoned) and add your own content using the grammar and store that data not within the model but to the side, within a vector database - basically a nice big database of numbers; where the numbers relate to words and make it super fast to query them.


Now you have your OWN data ingested, dissected and stored in the same way that the LLMs do, you can query your own data/documents/content in the same manner - except no-one else has access to this information.  Nice huh.  yep.  This starts to become useful now doesn't it.

However, a VAST majority of information on the good old inter-webs, still makes reference to using OpenAIs API (that you really have to pay for - if you can get access to it), as they spent something north of $540m making that tool, they really need to get some money back to pay off those investors - the Microsoft money will only go so far - they need consumers to start paying.... oh, you didn't think that they released ChatGPT for the love of their fellow human being did you?  or the betterment of society?  no, of course not, it was for the money $$$$ 

Along comes the open-source research community and bam! a few weeks/months later, they are able to replicate and improve upon what was released and then make it available for all.  sweet.  love that.

This has now led into an interesting custard-pie throwing contest; where capitalist driven corporations who are driven by money and the empty hole filling desire to make and have more money are competing against people (possibly like moi) who don't really care - they just want to open the tools & techniques up to everyone, in a bid to "see where it goes?" - you don't know, little Jimmy, in the darkened corner of the bedroom may take the seed of that open-source software and start getting it to do interesting things and then start to evolve it to do other things and more things & then release it as an open-source giveback to the world in general and we advance society in a pleasant way.

Obviously, you could re-read that paragraph as Jimmy being a bad actor and inventing bad tools to do "bad things", such as hacking the FBI or breaking into secure servers within Banks (that sort of thing is going to happen anyway), but it's like a kitchen knife, if you use it for making a salad, everyone enjoys the salad, if you use it to stab all the people at the BBQ then it's not so good - we have the option to do either, all of the time.  I am not naive enough to live in a fluffy-bunny world where I think it's all colourful unicorns & fairy dust, I know what human reality is & what it is capable of.  Let's hope that there are more positive little Jimmys out there than negative ones.


Now, if we are armed with open-source grammar models and we have our own local documents that we can "parse" through that model to make the vector database (big bunch of numbers) and we can then store that securly and locally, we can then query it to find out information - we can ask questions about that data, locally, and FAST! and if we add a little bit of "intelligence" (note, I did not state Artificial) via the 'Task Management system' we can then link together multiple different data sources, such as bunches of PDF documents about certain subjects, or a bunch of different databases containing their own sets of data, or a bunch of REST API URLs where you can call out to different websites to gain more data back from them.

Now, add all those things together and when you "ask a question", you don't get some 'search engine' style response that gives you a bunch of website responses for you to go and look at one by one, or a bunch of rambling text from ChatGPT that wants to write you a poem in the middle of the response or pad out the content with complete and utter b*llsh!t (or hallucinations as they stupidly call it, because the coders didn't want it to not return a response if it couldn't provide an answer), but instead you get a 'smart task management system' that YOU have coded and given instruction about and the tooling decides which of your data sources it should query and examine in order to best answer your question.

Now, that is what LangChain allows you to do.  See, we got there in the end, didn't we :-)

As it states here in the LangChain documentation, this is how you can easily code for this.

Okay, as you would expect, it is not as simple as clicking lego-blocks together and voila! all done in 10-minutes and it is NOT all about being a "Prompt Engineer" (yes, you will see that coming up as a job role/description shortly), if you build the tooling correctly you don't need these parasitical people who are again, just a fleeting generation of skills that will be gone overnight (hopefully).

As I stated above, I cannot state what work I am doing in my work/work environment and I would love to write articles about the lessons I have learnt with LangChain, actually I just may write up my experiences and how I evolved from knowing nothing about LLMs and LangChain to now being a very low-level expert (that does NOT use OpenAI or paid-for-services in the 'rip-off' Cloud environments)


You may have detected an under-current of being anti-Cloud and anti-OpenAI in my writings, this is my own personal opinion and I fully stand by it - it baffles me why everyone shifted their critical business systems off their own managed systems & servers (making all those highly skilled people redundant along the way) over to BIG companies who just have the same setup being run by a smaller set of people as well as automated software where they believed they were "saving loads of money" and now they are locked-in, the prices are rising and, oh, they are actually paying more for the Cloud service than they were for their own owned & controlled managed systems, they have been right-royally-f**d and to move back off the Cloud and back on-prem is going to cost them dearly, mostly because the "skilled people" who know how to do it are now fewer... that's a right pickle you got yourself into there isn't it.  Maybe you should have been looking upwards at the horizon rather than the short-sighted money focused cost-cutting that the (now left the company after you paid them a huge bonus) CTO put into place... that cost-cutting/saving was like watering down your petrol, now you've not only run out of petrol, you've got to fix all the engine components that it screwed up - ended up costing you two or three times the "cost savings".  

anyway, enough grumbling about that, what I AM pleased about is the superb work that went into making LangChain and may it be one of the seeds that grows into the forest of future positive possibilities that enhances human kind into a world where computer technology really advances us a race of intelligent beings in the universe.  Well, I can still believe in some fairy stories, can't I?




Before you ask, no, I'm not available for BBQs or B'nai mitzvahs - I don't like making salads.


Comments